diff --git a/README.md b/README.md index d7ecfded..d2a08d47 100644 --- a/README.md +++ b/README.md @@ -1023,6 +1023,7 @@ Namespace | Name | Import | **Admin** | [ListMarkingMembersResponse](docs/v2/Admin/models/ListMarkingMembersResponse.md) | `from foundry_sdk.v2.admin.models import ListMarkingMembersResponse` | **Admin** | [ListMarkingRoleAssignmentsResponse](docs/v2/Admin/models/ListMarkingRoleAssignmentsResponse.md) | `from foundry_sdk.v2.admin.models import ListMarkingRoleAssignmentsResponse` | **Admin** | [ListMarkingsResponse](docs/v2/Admin/models/ListMarkingsResponse.md) | `from foundry_sdk.v2.admin.models import ListMarkingsResponse` | +**Admin** | [ListOrganizationGuestMembersResponse](docs/v2/Admin/models/ListOrganizationGuestMembersResponse.md) | `from foundry_sdk.v2.admin.models import ListOrganizationGuestMembersResponse` | **Admin** | [ListOrganizationRoleAssignmentsResponse](docs/v2/Admin/models/ListOrganizationRoleAssignmentsResponse.md) | `from foundry_sdk.v2.admin.models import ListOrganizationRoleAssignmentsResponse` | **Admin** | [ListUsersResponse](docs/v2/Admin/models/ListUsersResponse.md) | `from foundry_sdk.v2.admin.models import ListUsersResponse` | **Admin** | [Marking](docs/v2/Admin/models/Marking.md) | `from foundry_sdk.v2.admin.models import Marking` | @@ -1043,6 +1044,7 @@ Namespace | Name | Import | **Admin** | [MarkingType](docs/v2/Admin/models/MarkingType.md) | `from foundry_sdk.v2.admin.models import MarkingType` | **Admin** | [OidcAuthenticationProtocol](docs/v2/Admin/models/OidcAuthenticationProtocol.md) | `from foundry_sdk.v2.admin.models import OidcAuthenticationProtocol` | **Admin** | [Organization](docs/v2/Admin/models/Organization.md) | `from foundry_sdk.v2.admin.models import Organization` | +**Admin** | [OrganizationGuestMember](docs/v2/Admin/models/OrganizationGuestMember.md) | `from foundry_sdk.v2.admin.models import OrganizationGuestMember` | **Admin** | [OrganizationName](docs/v2/Admin/models/OrganizationName.md) | `from foundry_sdk.v2.admin.models import OrganizationName` | **Admin** | [OrganizationRoleAssignment](docs/v2/Admin/models/OrganizationRoleAssignment.md) | `from foundry_sdk.v2.admin.models import OrganizationRoleAssignment` | **Admin** | [PreregisterGroupRequest](docs/v2/Admin/models/PreregisterGroupRequest.md) | `from foundry_sdk.v2.admin.models import PreregisterGroupRequest` | @@ -3198,6 +3200,7 @@ Namespace | Name | Import | **Admin** | ListHostsPermissionDenied | `from foundry_sdk.v2.admin.errors import ListHostsPermissionDenied` | **Admin** | ListMarkingMembersPermissionDenied | `from foundry_sdk.v2.admin.errors import ListMarkingMembersPermissionDenied` | **Admin** | ListMarkingRoleAssignmentsPermissionDenied | `from foundry_sdk.v2.admin.errors import ListMarkingRoleAssignmentsPermissionDenied` | +**Admin** | ListOrganizationGuestMembersPermissionDenied | `from foundry_sdk.v2.admin.errors import ListOrganizationGuestMembersPermissionDenied` | **Admin** | ListOrganizationRoleAssignmentsPermissionDenied | `from foundry_sdk.v2.admin.errors import ListOrganizationRoleAssignmentsPermissionDenied` | **Admin** | MarkingCategoryNotFound | `from foundry_sdk.v2.admin.errors import MarkingCategoryNotFound` | **Admin** | MarkingNameInCategoryAlreadyExists | `from foundry_sdk.v2.admin.errors import MarkingNameInCategoryAlreadyExists` | diff --git a/docs-snippets-npm/package.json b/docs-snippets-npm/package.json index f0ea4372..54352798 100644 --- a/docs-snippets-npm/package.json +++ b/docs-snippets-npm/package.json @@ -24,7 +24,7 @@ "sls": { "dependencies": { "com.palantir.foundry.api:api-gateway": { - "minVersion": "1.1497.0", + "minVersion": "1.1501.0", "maxVersion": "1.x.x", "optional": false } diff --git a/docs-snippets-npm/src/index.ts b/docs-snippets-npm/src/index.ts index 0db49fce..75490805 100644 --- a/docs-snippets-npm/src/index.ts +++ b/docs-snippets-npm/src/index.ts @@ -448,6 +448,11 @@ export const PYTHON_PLATFORM_SNIPPETS: SdkSnippets admin_models.ListOrganizationGuestMembersResponse: + """ + Lists all guest members of an Organization. + + :param organization_rid: + :type organization_rid: OrganizationRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: admin_models.ListOrganizationGuestMembersResponse + + :raises ListOrganizationGuestMembersPermissionDenied: The provided token does not have permission to list guest members for this organization. + :raises OrganizationNotFound: The given Organization could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/organizations/{organizationRid}/guestMembers", + query_params={ + "preview": preview, + }, + path_params={ + "organizationRid": organization_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.ListOrganizationGuestMembersResponse, + request_timeout=request_timeout, + throwable_errors={ + "ListOrganizationGuestMembersPermissionDenied": admin_errors.ListOrganizationGuestMembersPermissionDenied, + "OrganizationNotFound": admin_errors.OrganizationNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _OrganizationGuestMemberClientRaw: + def __init__(self, client: OrganizationGuestMemberClient) -> None: + def list(_: admin_models.ListOrganizationGuestMembersResponse): ... + + self.list = core.with_raw_response(list, client.list) + + +class _OrganizationGuestMemberClientStreaming: + def __init__(self, client: OrganizationGuestMemberClient) -> None: + def list(_: admin_models.ListOrganizationGuestMembersResponse): ... + + self.list = core.with_streaming_response(list, client.list) + + +class AsyncOrganizationGuestMemberClient: + """ + The API client for the OrganizationGuestMember Resource. + + :param auth: Your auth configuration. + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). This can also include your API gateway service URI. + :param config: Optionally specify the configuration for the HTTP session. + """ + + def __init__( + self, + auth: core.Auth, + hostname: str, + config: typing.Optional[core.Config] = None, + ): + self._auth = auth + self._hostname = hostname + self._config = config + self._api_client = core.AsyncApiClient(auth=auth, hostname=hostname, config=config) + + self.with_streaming_response = _AsyncOrganizationGuestMemberClientStreaming(self) + self.with_raw_response = _AsyncOrganizationGuestMemberClientRaw(self) + + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def list( + self, + organization_rid: core_models.OrganizationRid, + *, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[admin_models.ListOrganizationGuestMembersResponse]: + """ + Lists all guest members of an Organization. + + :param organization_rid: + :type organization_rid: OrganizationRid + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[admin_models.ListOrganizationGuestMembersResponse] + + :raises ListOrganizationGuestMembersPermissionDenied: The provided token does not have permission to list guest members for this organization. + :raises OrganizationNotFound: The given Organization could not be found. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="GET", + resource_path="/v2/admin/organizations/{organizationRid}/guestMembers", + query_params={ + "preview": preview, + }, + path_params={ + "organizationRid": organization_rid, + }, + header_params={ + "Accept": "application/json", + }, + body=None, + response_type=admin_models.ListOrganizationGuestMembersResponse, + request_timeout=request_timeout, + throwable_errors={ + "ListOrganizationGuestMembersPermissionDenied": admin_errors.ListOrganizationGuestMembersPermissionDenied, + "OrganizationNotFound": admin_errors.OrganizationNotFound, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + + +class _AsyncOrganizationGuestMemberClientRaw: + def __init__(self, client: AsyncOrganizationGuestMemberClient) -> None: + def list(_: admin_models.ListOrganizationGuestMembersResponse): ... + + self.list = core.async_with_raw_response(list, client.list) + + +class _AsyncOrganizationGuestMemberClientStreaming: + def __init__(self, client: AsyncOrganizationGuestMemberClient) -> None: + def list(_: admin_models.ListOrganizationGuestMembersResponse): ... + + self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/admin/user.py b/foundry_sdk/v2/admin/user.py index 5aa58154..1c1cb640 100644 --- a/foundry_sdk/v2/admin/user.py +++ b/foundry_sdk/v2/admin/user.py @@ -474,7 +474,8 @@ def search( _sdk_internal: core.SdkInternal = {}, ) -> admin_models.SearchUsersResponse: """ - Perform a case-insensitive prefix search for users based on username, given name and family name. + Perform a case-insensitive prefix search for active users based on username, given name and family name. + Deleted users are not included in results. To list deleted users, use the `list` endpoint with `include=DELETED`. :param where: :type where: UserSearchFilter @@ -1005,7 +1006,8 @@ def search( _sdk_internal: core.SdkInternal = {}, ) -> typing.Awaitable[admin_models.SearchUsersResponse]: """ - Perform a case-insensitive prefix search for users based on username, given name and family name. + Perform a case-insensitive prefix search for active users based on username, given name and family name. + Deleted users are not included in results. To list deleted users, use the `list` endpoint with `include=DELETED`. :param where: :type where: UserSearchFilter diff --git a/foundry_sdk/v2/cli.py b/foundry_sdk/v2/cli.py index 91c88add..3b7c917a 100644 --- a/foundry_sdk/v2/cli.py +++ b/foundry_sdk/v2/cli.py @@ -231,7 +231,8 @@ def admin_user_op_search( page_token: typing.Optional[str], ): """ - Perform a case-insensitive prefix search for users based on username, given name and family name. + Perform a case-insensitive prefix search for active users based on username, given name and family name. + Deleted users are not included in results. To list deleted users, use the `list` endpoint with `include=DELETED`. """ result = client.admin.User.search( @@ -542,6 +543,33 @@ def admin_organization_op_replace( click.echo(repr(result)) +@admin_organization.group("organization_guest_member") +def admin_organization_organization_guest_member(): + pass + + +@admin_organization_organization_guest_member.command("list") +@click.argument("organization_rid", type=str, required=True) +@click.option( + "--preview", type=bool, required=False, help="""Enables the use of preview functionality.""" +) +@click.pass_obj +def admin_organization_organization_guest_member_op_list( + client: FoundryClient, + organization_rid: str, + preview: typing.Optional[bool], +): + """ + Lists all guest members of an Organization. + + """ + result = client.admin.Organization.OrganizationGuestMember.list( + organization_rid=organization_rid, + preview=preview, + ) + click.echo(repr(result)) + + @admin_organization.group("organization_role_assignment") def admin_organization_organization_role_assignment(): pass diff --git a/foundry_sdk/v2/media_sets/models.py b/foundry_sdk/v2/media_sets/models.py index f2413c78..bd46a790 100644 --- a/foundry_sdk/v2/media_sets/models.py +++ b/foundry_sdk/v2/media_sets/models.py @@ -492,7 +492,7 @@ class Dimensions(core.ModelBase): """The height of the image in pixels.""" -DocumentDecodeFormat = typing.Literal["PDF", "DOCX", "TXT", "PPTX"] +DocumentDecodeFormat = typing.Literal["PDF", "DOC", "DOCX", "TXT", "PPTX", "RTF"] """The format of a document media item.""" @@ -1207,6 +1207,7 @@ class MediaAttribution(core.ModelBase): "MODEL_3D", "MULTIMODAL", "SPREADSHEET", + "STREAMING_VIDEO", "VIDEO", "EMAIL", ] diff --git a/foundry_sdk/v2/models/models.py b/foundry_sdk/v2/models/models.py index dbbfe5e5..cf309ec0 100644 --- a/foundry_sdk/v2/models/models.py +++ b/foundry_sdk/v2/models/models.py @@ -23,6 +23,7 @@ from foundry_sdk import _core as core from foundry_sdk.v2.core import models as core_models from foundry_sdk.v2.filesystem import models as filesystem_models +from foundry_sdk.v2.orchestration import models as orchestration_models class BooleanParameter(core.ModelBase): @@ -540,6 +541,9 @@ class ModelStudioRun(core.ModelBase): started_time: core_models.CreatedTime = pydantic.Field(alias=str("startedTime")) # type: ignore[literal-required] """When this run was started.""" + build_status: typing.Optional[orchestration_models.BuildStatus] = pydantic.Field(alias=str("buildStatus"), default=None) # type: ignore[literal-required] + """Status of the build.""" + resolved_outputs: typing.Dict[OutputAlias, ModelStudioRunOutput] = pydantic.Field(alias=str("resolvedOutputs")) # type: ignore[literal-required] """Map of alias to resolved output details (e.g., for models, contains the version RID and experiment).""" diff --git a/foundry_sdk/v2/ontologies/models.py b/foundry_sdk/v2/ontologies/models.py index 8b2dcb35..591407f9 100644 --- a/foundry_sdk/v2/ontologies/models.py +++ b/foundry_sdk/v2/ontologies/models.py @@ -274,18 +274,24 @@ class AggregationDurationGroupingV2(core.ModelBase): """ Divides objects into groups according to an interval. Note that this grouping applies only on date and timestamp types. When grouping by `YEARS`, `QUARTERS`, `MONTHS`, or `WEEKS`, the `value` must be set to `1`. + Either `field` or `propertyIdentifier` must be supplied, but not both. """ - field: PropertyApiName + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] value: int unit: TimeUnit type: typing.Literal["duration"] = "duration" class AggregationExactGroupingV2(core.ModelBase): - """Divides objects into groups according to an exact value.""" + """ + Divides objects into groups according to an exact value. + Either `field` or `propertyIdentifier` must be supplied, but not both. + """ - field: PropertyApiName + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] max_group_count: typing.Optional[int] = pydantic.Field(alias=str("maxGroupCount"), default=None) # type: ignore[literal-required] """ The maximum number of groups to return. If omitted, defaults to 10,000. @@ -317,9 +323,13 @@ class AggregationExactGroupingV2(core.ModelBase): class AggregationFixedWidthGroupingV2(core.ModelBase): - """Divides objects into groups with the specified width.""" + """ + Divides objects into groups with the specified width. + Either `field` or `propertyIdentifier` must be supplied, but not both. + """ - field: PropertyApiName + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] fixed_width: int = pydantic.Field(alias=str("fixedWidth")) # type: ignore[literal-required] type: typing.Literal["fixedWidth"] = "fixedWidth" @@ -370,9 +380,13 @@ class AggregationRangeV2(core.ModelBase): class AggregationRangesGroupingV2(core.ModelBase): - """Divides objects into groups according to specified ranges.""" + """ + Divides objects into groups according to specified ranges. + Either `field` or `propertyIdentifier` must be supplied, but not both. + """ - field: PropertyApiName + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] ranges: typing.List[AggregationRangeV2] type: typing.Literal["ranges"] = "ranges" @@ -465,18 +479,26 @@ class ApplyReducersLoadLevel(core.ModelBase): class ApproximateDistinctAggregationV2(core.ModelBase): - """Computes an approximate number of distinct values for the provided field.""" + """ + Computes an approximate number of distinct values for the provided field. + Either `field` or `propertyIdentifier` must be supplied, but not both. + """ - field: PropertyApiName + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] name: typing.Optional[AggregationMetricName] = None direction: typing.Optional[OrderByDirection] = None type: typing.Literal["approximateDistinct"] = "approximateDistinct" class ApproximatePercentileAggregationV2(core.ModelBase): - """Computes the approximate percentile value for the provided field. Requires Object Storage V2.""" + """ + Computes the approximate percentile value for the provided field. Requires Object Storage V2. + Either `field` or `propertyIdentifier` must be supplied, but not both. + """ - field: PropertyApiName + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] name: typing.Optional[AggregationMetricName] = None approximate_percentile: float = pydantic.Field(alias=str("approximatePercentile")) # type: ignore[literal-required] direction: typing.Optional[OrderByDirection] = None @@ -550,9 +572,13 @@ class AttachmentV2(core.ModelBase): class AvgAggregationV2(core.ModelBase): - """Computes the average value for the provided field.""" + """ + Computes the average value for the provided field. + Either `field` or `propertyIdentifier` must be supplied, but not both. + """ - field: PropertyApiName + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] name: typing.Optional[AggregationMetricName] = None direction: typing.Optional[OrderByDirection] = None type: typing.Literal["avg"] = "avg" @@ -1280,9 +1306,14 @@ class ErrorComputingSecurity(core.ModelBase): class ExactDistinctAggregationV2(core.ModelBase): - """Computes an exact number of distinct values for the provided field. May be slower than an approximate distinct aggregation. Requires Object Storage V2.""" + """ + Computes an exact number of distinct values for the provided field. May be slower than an approximate + distinct aggregation. Requires Object Storage V2. + Either `field` or `propertyIdentifier` must be supplied, but not both. + """ - field: PropertyApiName + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] name: typing.Optional[AggregationMetricName] = None direction: typing.Optional[OrderByDirection] = None type: typing.Literal["exactDistinct"] = "exactDistinct" @@ -2333,9 +2364,13 @@ class MatchRule(core.ModelBase): class MaxAggregationV2(core.ModelBase): - """Computes the maximum value for the provided field.""" + """ + Computes the maximum value for the provided field. + Either `field` or `propertyIdentifier` must be supplied, but not both. + """ - field: PropertyApiName + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] name: typing.Optional[AggregationMetricName] = None direction: typing.Optional[OrderByDirection] = None type: typing.Literal["max"] = "max" @@ -2350,9 +2385,13 @@ class MediaMetadata(core.ModelBase): class MinAggregationV2(core.ModelBase): - """Computes the minimum value for the provided field.""" + """ + Computes the minimum value for the provided field. + Either `field` or `propertyIdentifier` must be supplied, but not both. + """ - field: PropertyApiName + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] name: typing.Optional[AggregationMetricName] = None direction: typing.Optional[OrderByDirection] = None type: typing.Literal["min"] = "min" @@ -4786,9 +4825,13 @@ class SubtractPropertyExpression(core.ModelBase): class SumAggregationV2(core.ModelBase): - """Computes the sum of values for the provided field.""" + """ + Computes the sum of values for the provided field. + Either `field` or `propertyIdentifier` must be supplied, but not both. + """ - field: PropertyApiName + field: typing.Optional[PropertyApiName] = None + property_identifier: typing.Optional[PropertyIdentifier] = pydantic.Field(alias=str("propertyIdentifier"), default=None) # type: ignore[literal-required] name: typing.Optional[AggregationMetricName] = None direction: typing.Optional[OrderByDirection] = None type: typing.Literal["sum"] = "sum" diff --git a/tests/test_resource_import.py b/tests/test_resource_import.py index 46d57f10..61ce4cc9 100644 --- a/tests/test_resource_import.py +++ b/tests/test_resource_import.py @@ -181,6 +181,12 @@ def test_admin_v2_organization_import(): assert OrganizationClient is not None +def test_admin_v2_organization_guest_member_import(): + from foundry_sdk.v2.admin.organization_guest_member import OrganizationGuestMemberClient # NOQA + + assert OrganizationGuestMemberClient is not None + + def test_admin_v2_organization_role_assignment_import(): from foundry_sdk.v2.admin.organization_role_assignment import ( OrganizationRoleAssignmentClient,