diff --git a/README.md b/README.md index a40c2fdf..3f01b4f2 100644 --- a/README.md +++ b/README.md @@ -893,6 +893,7 @@ Namespace | Resource | Operation | HTTP request | **Ontologies** | AttachmentProperty | [**read_attachment**](docs/v2/Ontologies/AttachmentProperty.md#read_attachment) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/content | **Ontologies** | AttachmentProperty | [**read_attachment_by_rid**](docs/v2/Ontologies/AttachmentProperty.md#read_attachment_by_rid) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}/{attachmentRid}/content | **Ontologies** | CipherTextProperty | [**decrypt**](docs/v2/Ontologies/CipherTextProperty.md#decrypt) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/ciphertexts/{property}/decrypt | +**Ontologies** | GeotemporalSeriesProperty | [**load_geotemporal_series_entries**](docs/v2/Ontologies/GeotemporalSeriesProperty.md#load_geotemporal_series_entries) | **POST** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/geotemporalSeries/{property}/loadEntries | **Ontologies** | LinkedObject | [**get_linked_object**](docs/v2/Ontologies/LinkedObject.md#get_linked_object) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/links/{linkType}/{linkedObjectPrimaryKey} | **Ontologies** | LinkedObject | [**list_linked_objects**](docs/v2/Ontologies/LinkedObject.md#list_linked_objects) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/links/{linkType} | **Ontologies** | MediaReferenceProperty | [**get_media_content**](docs/v2/Ontologies/MediaReferenceProperty.md#get_media_content) | **GET** /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/media/{property}/content | @@ -2561,9 +2562,15 @@ Namespace | Name | Import | **Ontologies** | [GetActionTypeByRidBatchRequest](docs/v2/Ontologies/models/GetActionTypeByRidBatchRequest.md) | `from foundry_sdk.v2.ontologies.models import GetActionTypeByRidBatchRequest` | **Ontologies** | [GetActionTypeByRidBatchRequestElement](docs/v2/Ontologies/models/GetActionTypeByRidBatchRequestElement.md) | `from foundry_sdk.v2.ontologies.models import GetActionTypeByRidBatchRequestElement` | **Ontologies** | [GetActionTypeByRidBatchResponse](docs/v2/Ontologies/models/GetActionTypeByRidBatchResponse.md) | `from foundry_sdk.v2.ontologies.models import GetActionTypeByRidBatchResponse` | +**Ontologies** | [GetActionTypeFullMetadataBatchRequest](docs/v2/Ontologies/models/GetActionTypeFullMetadataBatchRequest.md) | `from foundry_sdk.v2.ontologies.models import GetActionTypeFullMetadataBatchRequest` | +**Ontologies** | [GetActionTypeFullMetadataBatchRequestElement](docs/v2/Ontologies/models/GetActionTypeFullMetadataBatchRequestElement.md) | `from foundry_sdk.v2.ontologies.models import GetActionTypeFullMetadataBatchRequestElement` | +**Ontologies** | [GetActionTypeFullMetadataBatchResponse](docs/v2/Ontologies/models/GetActionTypeFullMetadataBatchResponse.md) | `from foundry_sdk.v2.ontologies.models import GetActionTypeFullMetadataBatchResponse` | **Ontologies** | [GetObjectTypeByRidBatchRequest](docs/v2/Ontologies/models/GetObjectTypeByRidBatchRequest.md) | `from foundry_sdk.v2.ontologies.models import GetObjectTypeByRidBatchRequest` | **Ontologies** | [GetObjectTypeByRidBatchRequestElement](docs/v2/Ontologies/models/GetObjectTypeByRidBatchRequestElement.md) | `from foundry_sdk.v2.ontologies.models import GetObjectTypeByRidBatchRequestElement` | **Ontologies** | [GetObjectTypeByRidBatchResponse](docs/v2/Ontologies/models/GetObjectTypeByRidBatchResponse.md) | `from foundry_sdk.v2.ontologies.models import GetObjectTypeByRidBatchResponse` | +**Ontologies** | [GetObjectTypeFullMetadataBatchRequest](docs/v2/Ontologies/models/GetObjectTypeFullMetadataBatchRequest.md) | `from foundry_sdk.v2.ontologies.models import GetObjectTypeFullMetadataBatchRequest` | +**Ontologies** | [GetObjectTypeFullMetadataBatchRequestElement](docs/v2/Ontologies/models/GetObjectTypeFullMetadataBatchRequestElement.md) | `from foundry_sdk.v2.ontologies.models import GetObjectTypeFullMetadataBatchRequestElement` | +**Ontologies** | [GetObjectTypeFullMetadataBatchResponse](docs/v2/Ontologies/models/GetObjectTypeFullMetadataBatchResponse.md) | `from foundry_sdk.v2.ontologies.models import GetObjectTypeFullMetadataBatchResponse` | **Ontologies** | [GetOutgoingLinkTypesByObjectTypeRidBatchRequest](docs/v2/Ontologies/models/GetOutgoingLinkTypesByObjectTypeRidBatchRequest.md) | `from foundry_sdk.v2.ontologies.models import GetOutgoingLinkTypesByObjectTypeRidBatchRequest` | **Ontologies** | [GetOutgoingLinkTypesByObjectTypeRidBatchRequestElement](docs/v2/Ontologies/models/GetOutgoingLinkTypesByObjectTypeRidBatchRequestElement.md) | `from foundry_sdk.v2.ontologies.models import GetOutgoingLinkTypesByObjectTypeRidBatchRequestElement` | **Ontologies** | [GetOutgoingLinkTypesByObjectTypeRidBatchResponse](docs/v2/Ontologies/models/GetOutgoingLinkTypesByObjectTypeRidBatchResponse.md) | `from foundry_sdk.v2.ontologies.models import GetOutgoingLinkTypesByObjectTypeRidBatchResponse` | diff --git a/docs-snippets-npm/package.json b/docs-snippets-npm/package.json index 5e45a1ea..332b58e5 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.1740.1", + "minVersion": "1.1763.0", "maxVersion": "1.x.x", "optional": false } diff --git a/docs-snippets-npm/src/index.ts b/docs-snippets-npm/src/index.ts index 1690689d..67b2f80e 100644 --- a/docs-snippets-npm/src/index.ts +++ b/docs-snippets-npm/src/index.ts @@ -1513,9 +1513,14 @@ export const PYTHON_PLATFORM_SNIPPETS: SdkSnippets str: diff --git a/foundry_sdk/v2/media_sets/__init__.py b/foundry_sdk/v2/media_sets/__init__.py index 7bad3f77..79c99511 100644 --- a/foundry_sdk/v2/media_sets/__init__.py +++ b/foundry_sdk/v2/media_sets/__init__.py @@ -13,8 +13,7 @@ # limitations under the License. -from foundry_sdk.v2.media_sets._client import AsyncMediaSetsClient -from foundry_sdk.v2.media_sets._client import MediaSetsClient +from foundry_sdk.v2.media_sets._client import AsyncMediaSetsClient, MediaSetsClient __all__ = [ "MediaSetsClient", diff --git a/foundry_sdk/v2/media_sets/models.py b/foundry_sdk/v2/media_sets/models.py index 3cea3f92..0c604cfa 100644 --- a/foundry_sdk/v2/media_sets/models.py +++ b/foundry_sdk/v2/media_sets/models.py @@ -1246,6 +1246,7 @@ class MediaAttribution(core.ModelBase): "MULTIMODAL", "SPREADSHEET", "STREAMING_VIDEO", + "TILED_RASTER", "VIDEO", "EMAIL", ] @@ -1848,7 +1849,7 @@ class SlicePdfRangeOperation(core.ModelBase): type: typing.Literal["slicePdfRange"] = "slicePdfRange" -SpreadsheetDecodeFormat: typing_extensions.TypeAlias = typing.Literal["XLSX"] +SpreadsheetDecodeFormat: typing_extensions.TypeAlias = typing.Literal["CSV", "XLSX"] """The format of a spreadsheet media item.""" diff --git a/foundry_sdk/v2/models/__init__.py b/foundry_sdk/v2/models/__init__.py index dce84207..ee73da19 100644 --- a/foundry_sdk/v2/models/__init__.py +++ b/foundry_sdk/v2/models/__init__.py @@ -13,8 +13,7 @@ # limitations under the License. -from foundry_sdk.v2.models._client import AsyncModelsClient -from foundry_sdk.v2.models._client import ModelsClient +from foundry_sdk.v2.models._client import AsyncModelsClient, ModelsClient __all__ = [ "ModelsClient", diff --git a/foundry_sdk/v2/models/_client.py b/foundry_sdk/v2/models/_client.py index 5c0d779c..4179fbdf 100644 --- a/foundry_sdk/v2/models/_client.py +++ b/foundry_sdk/v2/models/_client.py @@ -102,7 +102,9 @@ def __init__( from foundry_sdk.v2.models.live_deployment import AsyncLiveDeploymentClient from foundry_sdk.v2.models.model import AsyncModelClient from foundry_sdk.v2.models.model_studio import AsyncModelStudioClient - from foundry_sdk.v2.models.model_studio_trainer import AsyncModelStudioTrainerClient # NOQA + from foundry_sdk.v2.models.model_studio_trainer import ( + AsyncModelStudioTrainerClient, + ) self.LiveDeployment = AsyncLiveDeploymentClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v2/models/experiment.py b/foundry_sdk/v2/models/experiment.py index de213c38..8f5cdc26 100644 --- a/foundry_sdk/v2/models/experiment.py +++ b/foundry_sdk/v2/models/experiment.py @@ -69,7 +69,7 @@ def Series(self): def ArtifactTable(self): from foundry_sdk.v2.models.experiment_artifact_table import ( ExperimentArtifactTableClient, - ) # NOQA + ) return ExperimentArtifactTableClient( auth=self._auth, @@ -265,7 +265,7 @@ def Series(self): def ArtifactTable(self): from foundry_sdk.v2.models.experiment_artifact_table import ( AsyncExperimentArtifactTableClient, - ) # NOQA + ) return AsyncExperimentArtifactTableClient( auth=self._auth, diff --git a/foundry_sdk/v2/models/model_studio.py b/foundry_sdk/v2/models/model_studio.py index db81f37a..70e92ffc 100644 --- a/foundry_sdk/v2/models/model_studio.py +++ b/foundry_sdk/v2/models/model_studio.py @@ -71,7 +71,7 @@ def Run(self): def ConfigVersion(self): from foundry_sdk.v2.models.model_studio_config_version import ( ModelStudioConfigVersionClient, - ) # NOQA + ) return ModelStudioConfigVersionClient( auth=self._auth, @@ -302,7 +302,7 @@ def Run(self): def ConfigVersion(self): from foundry_sdk.v2.models.model_studio_config_version import ( AsyncModelStudioConfigVersionClient, - ) # NOQA + ) return AsyncModelStudioConfigVersionClient( auth=self._auth, diff --git a/foundry_sdk/v2/ontologies/__init__.py b/foundry_sdk/v2/ontologies/__init__.py index b5ca6a49..0633ff57 100644 --- a/foundry_sdk/v2/ontologies/__init__.py +++ b/foundry_sdk/v2/ontologies/__init__.py @@ -13,8 +13,7 @@ # limitations under the License. -from foundry_sdk.v2.ontologies._client import AsyncOntologiesClient -from foundry_sdk.v2.ontologies._client import OntologiesClient +from foundry_sdk.v2.ontologies._client import AsyncOntologiesClient, OntologiesClient __all__ = [ "OntologiesClient", diff --git a/foundry_sdk/v2/ontologies/_client.py b/foundry_sdk/v2/ontologies/_client.py index e25a9eee..ce287bc3 100644 --- a/foundry_sdk/v2/ontologies/_client.py +++ b/foundry_sdk/v2/ontologies/_client.py @@ -57,7 +57,7 @@ def Action(self): def ActionTypeFullMetadata(self): from foundry_sdk.v2.ontologies.action_type_full_metadata import ( ActionTypeFullMetadataClient, - ) # NOQA + ) return ActionTypeFullMetadataClient( auth=self._auth, @@ -77,7 +77,9 @@ def Attachment(self): @cached_property def AttachmentProperty(self): - from foundry_sdk.v2.ontologies.attachment_property import AttachmentPropertyClient # NOQA + from foundry_sdk.v2.ontologies.attachment_property import ( + AttachmentPropertyClient, + ) return AttachmentPropertyClient( auth=self._auth, @@ -87,7 +89,9 @@ def AttachmentProperty(self): @cached_property def CipherTextProperty(self): - from foundry_sdk.v2.ontologies.cipher_text_property import CipherTextPropertyClient # NOQA + from foundry_sdk.v2.ontologies.cipher_text_property import ( + CipherTextPropertyClient, + ) return CipherTextPropertyClient( auth=self._auth, @@ -99,7 +103,7 @@ def CipherTextProperty(self): def GeotemporalSeriesProperty(self): from foundry_sdk.v2.ontologies.geotemporal_series_property import ( GeotemporalSeriesPropertyClient, - ) # NOQA + ) return GeotemporalSeriesPropertyClient( auth=self._auth, @@ -121,7 +125,7 @@ def LinkedObject(self): def MediaReferenceProperty(self): from foundry_sdk.v2.ontologies.media_reference_property import ( MediaReferencePropertyClient, - ) # NOQA + ) return MediaReferencePropertyClient( auth=self._auth, @@ -161,7 +165,9 @@ def OntologyObject(self): @cached_property def OntologyObjectSet(self): - from foundry_sdk.v2.ontologies.ontology_object_set import OntologyObjectSetClient # NOQA + from foundry_sdk.v2.ontologies.ontology_object_set import ( + OntologyObjectSetClient, + ) return OntologyObjectSetClient( auth=self._auth, @@ -181,7 +187,9 @@ def OntologyScenario(self): @cached_property def OntologyTransaction(self): - from foundry_sdk.v2.ontologies.ontology_transaction import OntologyTransactionClient # NOQA + from foundry_sdk.v2.ontologies.ontology_transaction import ( + OntologyTransactionClient, + ) return OntologyTransactionClient( auth=self._auth, @@ -191,7 +199,9 @@ def OntologyTransaction(self): @cached_property def OntologyValueType(self): - from foundry_sdk.v2.ontologies.ontology_value_type import OntologyValueTypeClient # NOQA + from foundry_sdk.v2.ontologies.ontology_value_type import ( + OntologyValueTypeClient, + ) return OntologyValueTypeClient( auth=self._auth, @@ -213,7 +223,7 @@ def Query(self): def TimeSeriesPropertyV2(self): from foundry_sdk.v2.ontologies.time_series_property_v2 import ( TimeSeriesPropertyV2Client, - ) # NOQA + ) return TimeSeriesPropertyV2Client( auth=self._auth, @@ -225,7 +235,7 @@ def TimeSeriesPropertyV2(self): def TimeSeriesValueBankProperty(self): from foundry_sdk.v2.ontologies.time_series_value_bank_property import ( TimeSeriesValueBankPropertyClient, - ) # NOQA + ) return TimeSeriesValueBankPropertyClient( auth=self._auth, @@ -252,43 +262,45 @@ def __init__( from foundry_sdk.v2.ontologies.action import AsyncActionClient from foundry_sdk.v2.ontologies.action_type_full_metadata import ( AsyncActionTypeFullMetadataClient, - ) # NOQA + ) from foundry_sdk.v2.ontologies.attachment import AsyncAttachmentClient from foundry_sdk.v2.ontologies.attachment_property import ( AsyncAttachmentPropertyClient, - ) # NOQA + ) from foundry_sdk.v2.ontologies.cipher_text_property import ( AsyncCipherTextPropertyClient, - ) # NOQA + ) from foundry_sdk.v2.ontologies.geotemporal_series_property import ( AsyncGeotemporalSeriesPropertyClient, - ) # NOQA + ) from foundry_sdk.v2.ontologies.linked_object import AsyncLinkedObjectClient from foundry_sdk.v2.ontologies.media_reference_property import ( AsyncMediaReferencePropertyClient, - ) # NOQA + ) from foundry_sdk.v2.ontologies.ontology import AsyncOntologyClient from foundry_sdk.v2.ontologies.ontology_interface import ( AsyncOntologyInterfaceClient, - ) # NOQA + ) from foundry_sdk.v2.ontologies.ontology_object import AsyncOntologyObjectClient from foundry_sdk.v2.ontologies.ontology_object_set import ( AsyncOntologyObjectSetClient, - ) # NOQA - from foundry_sdk.v2.ontologies.ontology_scenario import AsyncOntologyScenarioClient # NOQA + ) + from foundry_sdk.v2.ontologies.ontology_scenario import ( + AsyncOntologyScenarioClient, + ) from foundry_sdk.v2.ontologies.ontology_transaction import ( AsyncOntologyTransactionClient, - ) # NOQA + ) from foundry_sdk.v2.ontologies.ontology_value_type import ( AsyncOntologyValueTypeClient, - ) # NOQA + ) from foundry_sdk.v2.ontologies.query import AsyncQueryClient from foundry_sdk.v2.ontologies.time_series_property_v2 import ( AsyncTimeSeriesPropertyV2Client, - ) # NOQA + ) from foundry_sdk.v2.ontologies.time_series_value_bank_property import ( AsyncTimeSeriesValueBankPropertyClient, - ) # NOQA + ) self.Action = AsyncActionClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v2/ontologies/action_type_full_metadata.py b/foundry_sdk/v2/ontologies/action_type_full_metadata.py index 18221bdd..faf05d1e 100644 --- a/foundry_sdk/v2/ontologies/action_type_full_metadata.py +++ b/foundry_sdk/v2/ontologies/action_type_full_metadata.py @@ -15,6 +15,7 @@ import typing +import annotated_types import pydantic import typing_extensions @@ -106,6 +107,71 @@ def get( ), ) + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_full_metadata_batch( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + requests: typing_extensions.Annotated[ + typing.List[ontologies_models.GetActionTypeFullMetadataBatchRequestElement], + annotated_types.Len(min_length=1, max_length=100), + ], + branch: typing.Optional[core_models.FoundryBranch] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.GetActionTypeFullMetadataBatchResponse: + """ + Gets a list of action types with full metadata (parameters and logic rules) by their API names in + bulk. + + Action types are filtered from the response if they don't exist, the requesting token lacks the + required permissions, or any of their logic rules are not supported by this API, so the response may + contain fewer entries than requested. + + The maximum batch size for this endpoint is 100. + + :param ontology: + :type ontology: OntologyIdentifier + :param requests: + :type requests: List[GetActionTypeFullMetadataBatchRequestElement] + :param branch: The Foundry branch to load the action type definitions from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :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: ontologies_models.GetActionTypeFullMetadataBatchResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/actionTypes/getFullMetadataBatch", + query_params={ + "branch": branch, + "preview": preview, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.GetActionTypeFullMetadataBatchRequest( + requests=requests, + ), + response_type=ontologies_models.GetActionTypeFullMetadataBatchResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + @core.maybe_ignore_preview @pydantic.validate_call @errors.handle_unexpected @@ -133,7 +199,7 @@ def list( :type ontology: OntologyIdentifier :param branch: The Foundry branch to list the action types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. :type branch: Optional[FoundryBranch] - :param object_type_api_names: An set of object type api names that can be used to filter which actions are returned. Currently this only works for one object type, specifying more will cause the request to fail. + :param object_type_api_names: A set of object type API names that can be used to filter which actions are returned. :type object_type_api_names: Optional[List[ObjectTypeApiName]] :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. :type page_size: Optional[PageSize] @@ -176,18 +242,30 @@ def list( class _ActionTypeFullMetadataClientRaw: def __init__(self, client: ActionTypeFullMetadataClient) -> None: def get(_: ontologies_models.ActionTypeFullMetadata): ... + def get_full_metadata_batch( + _: ontologies_models.GetActionTypeFullMetadataBatchResponse, + ): ... def list(_: ontologies_models.ListActionTypesFullMetadataResponse): ... self.get = core.with_raw_response(get, client.get) + self.get_full_metadata_batch = core.with_raw_response( + get_full_metadata_batch, client.get_full_metadata_batch + ) self.list = core.with_raw_response(list, client.list) class _ActionTypeFullMetadataClientStreaming: def __init__(self, client: ActionTypeFullMetadataClient) -> None: def get(_: ontologies_models.ActionTypeFullMetadata): ... + def get_full_metadata_batch( + _: ontologies_models.GetActionTypeFullMetadataBatchResponse, + ): ... def list(_: ontologies_models.ListActionTypesFullMetadataResponse): ... self.get = core.with_streaming_response(get, client.get) + self.get_full_metadata_batch = core.with_streaming_response( + get_full_metadata_batch, client.get_full_metadata_batch + ) self.list = core.with_streaming_response(list, client.list) @@ -273,6 +351,71 @@ def get( ), ) + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_full_metadata_batch( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + requests: typing_extensions.Annotated[ + typing.List[ontologies_models.GetActionTypeFullMetadataBatchRequestElement], + annotated_types.Len(min_length=1, max_length=100), + ], + branch: typing.Optional[core_models.FoundryBranch] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.GetActionTypeFullMetadataBatchResponse]: + """ + Gets a list of action types with full metadata (parameters and logic rules) by their API names in + bulk. + + Action types are filtered from the response if they don't exist, the requesting token lacks the + required permissions, or any of their logic rules are not supported by this API, so the response may + contain fewer entries than requested. + + The maximum batch size for this endpoint is 100. + + :param ontology: + :type ontology: OntologyIdentifier + :param requests: + :type requests: List[GetActionTypeFullMetadataBatchRequestElement] + :param branch: The Foundry branch to load the action type definitions from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :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[ontologies_models.GetActionTypeFullMetadataBatchResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/actionTypes/getFullMetadataBatch", + query_params={ + "branch": branch, + "preview": preview, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.GetActionTypeFullMetadataBatchRequest( + requests=requests, + ), + response_type=ontologies_models.GetActionTypeFullMetadataBatchResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + @core.maybe_ignore_preview @pydantic.validate_call @errors.handle_unexpected @@ -300,7 +443,7 @@ def list( :type ontology: OntologyIdentifier :param branch: The Foundry branch to list the action types from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. :type branch: Optional[FoundryBranch] - :param object_type_api_names: An set of object type api names that can be used to filter which actions are returned. Currently this only works for one object type, specifying more will cause the request to fail. + :param object_type_api_names: A set of object type API names that can be used to filter which actions are returned. :type object_type_api_names: Optional[List[ObjectTypeApiName]] :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details. :type page_size: Optional[PageSize] @@ -343,16 +486,28 @@ def list( class _AsyncActionTypeFullMetadataClientRaw: def __init__(self, client: AsyncActionTypeFullMetadataClient) -> None: def get(_: ontologies_models.ActionTypeFullMetadata): ... + def get_full_metadata_batch( + _: ontologies_models.GetActionTypeFullMetadataBatchResponse, + ): ... def list(_: ontologies_models.ListActionTypesFullMetadataResponse): ... self.get = core.async_with_raw_response(get, client.get) + self.get_full_metadata_batch = core.async_with_raw_response( + get_full_metadata_batch, client.get_full_metadata_batch + ) self.list = core.async_with_raw_response(list, client.list) class _AsyncActionTypeFullMetadataClientStreaming: def __init__(self, client: AsyncActionTypeFullMetadataClient) -> None: def get(_: ontologies_models.ActionTypeFullMetadata): ... + def get_full_metadata_batch( + _: ontologies_models.GetActionTypeFullMetadataBatchResponse, + ): ... def list(_: ontologies_models.ListActionTypesFullMetadataResponse): ... self.get = core.async_with_streaming_response(get, client.get) + self.get_full_metadata_batch = core.async_with_streaming_response( + get_full_metadata_batch, client.get_full_metadata_batch + ) self.list = core.async_with_streaming_response(list, client.list) diff --git a/foundry_sdk/v2/ontologies/geotemporal_series_property.py b/foundry_sdk/v2/ontologies/geotemporal_series_property.py index 0082f40c..99124b1b 100644 --- a/foundry_sdk/v2/ontologies/geotemporal_series_property.py +++ b/foundry_sdk/v2/ontologies/geotemporal_series_property.py @@ -84,7 +84,7 @@ def load_geotemporal_series_entries( Results are paginated. Use the `nextPageToken` from the response to retrieve subsequent pages. :::callout{theme=warning title=Warning} - Geotemporal series integrations with only "dataset archive" enabled are not supported. + Geotemporal series integrations with only "cold storage" enabled are not supported. ::: :param ontology: @@ -226,7 +226,7 @@ def load_geotemporal_series_entries( Results are paginated. Use the `nextPageToken` from the response to retrieve subsequent pages. :::callout{theme=warning title=Warning} - Geotemporal series integrations with only "dataset archive" enabled are not supported. + Geotemporal series integrations with only "cold storage" enabled are not supported. ::: :param ontology: diff --git a/foundry_sdk/v2/ontologies/models.py b/foundry_sdk/v2/ontologies/models.py index c5c16ece..9c288d11 100644 --- a/foundry_sdk/v2/ontologies/models.py +++ b/foundry_sdk/v2/ontologies/models.py @@ -100,6 +100,7 @@ class ActionParameterArrayType(core.ModelBase): "OntologyObjectSetType", core_models.GeohashType, core_models.VectorType, + core_models.DecimalType, "OntologyObjectType", core_models.TimestampType, ], @@ -1847,6 +1848,27 @@ class GetActionTypeByRidBatchResponse(core.ModelBase): data: typing.List[ActionTypeV2] +class GetActionTypeFullMetadataBatchRequest(core.ModelBase): + """GetActionTypeFullMetadataBatchRequest""" + + requests: typing_extensions.Annotated[ + typing.List[GetActionTypeFullMetadataBatchRequestElement], + annotated_types.Len(min_length=1, max_length=100), + ] + + +class GetActionTypeFullMetadataBatchRequestElement(core.ModelBase): + """GetActionTypeFullMetadataBatchRequestElement""" + + action_type: ActionTypeApiName = pydantic.Field(alias=str("actionType")) # type: ignore[literal-required] + + +class GetActionTypeFullMetadataBatchResponse(core.ModelBase): + """GetActionTypeFullMetadataBatchResponse""" + + data: typing.List[ActionTypeFullMetadata] + + class GetObjectTypeByRidBatchRequest(core.ModelBase): """GetObjectTypeByRidBatchRequest""" @@ -1868,6 +1890,41 @@ class GetObjectTypeByRidBatchResponse(core.ModelBase): data: typing.List[ObjectTypeV2] +class GetObjectTypeFullMetadataBatchRequest(core.ModelBase): + """GetObjectTypeFullMetadataBatchRequest""" + + requests: typing_extensions.Annotated[ + typing.List[GetObjectTypeFullMetadataBatchRequestElement], + annotated_types.Len(min_length=1, max_length=100), + ] + include_link_types: typing.Optional[bool] = pydantic.Field(alias=str("includeLinkTypes"), default=None) # type: ignore[literal-required] + """ + A flag that will return all outgoing link types for each requested object type in that object type's + `linkTypes`. When false or omitted, `linkTypes` is empty. + """ + + +class GetObjectTypeFullMetadataBatchRequestElement(core.ModelBase): + """GetObjectTypeFullMetadataBatchRequestElement""" + + object_type: ObjectTypeApiName = pydantic.Field(alias=str("objectType")) # type: ignore[literal-required] + + +class GetObjectTypeFullMetadataBatchResponse(core.ModelBase): + """GetObjectTypeFullMetadataBatchResponse""" + + data: typing.List[ObjectTypeFullMetadata] + """ + The requested object types, in the order they were requested. Object types that were not found are + omitted, so this may contain fewer entries than were requested. + + Each object type's `linkTypes` is only populated when the request specifies + `includeLinkTypes=true`, and is ordered by link type API name. It may also be empty if the object + type has no outgoing link types, or if the requesting token cannot see the object types on the + other side of them. + """ + + class GetOutgoingLinkTypesByObjectTypeRidBatchRequest(core.ModelBase): """GetOutgoingLinkTypesByObjectTypeRidBatchRequest""" @@ -3917,6 +3974,7 @@ class ObjectTypeLinkTypeApiNameMapping(core.ModelBase): class ObjectTypeMediaSetViewDatasource(core.ModelBase): """An object type datasource backed by a Foundry media set view, providing media for media reference properties.""" + media_set_rid: core_models.MediaSetRid = pydantic.Field(alias=str("mediaSetRid")) # type: ignore[literal-required] media_set_view_rid: core_models.MediaSetViewRid = pydantic.Field(alias=str("mediaSetViewRid")) # type: ignore[literal-required] properties: typing.List[PropertyApiName] """The set of properties that are bound to the media view.""" @@ -6778,9 +6836,15 @@ class WithinPolygonQuery(core.ModelBase): "GetActionTypeByRidBatchRequest", "GetActionTypeByRidBatchRequestElement", "GetActionTypeByRidBatchResponse", + "GetActionTypeFullMetadataBatchRequest", + "GetActionTypeFullMetadataBatchRequestElement", + "GetActionTypeFullMetadataBatchResponse", "GetObjectTypeByRidBatchRequest", "GetObjectTypeByRidBatchRequestElement", "GetObjectTypeByRidBatchResponse", + "GetObjectTypeFullMetadataBatchRequest", + "GetObjectTypeFullMetadataBatchRequestElement", + "GetObjectTypeFullMetadataBatchResponse", "GetOutgoingLinkTypesByObjectTypeRidBatchRequest", "GetOutgoingLinkTypesByObjectTypeRidBatchRequestElement", "GetOutgoingLinkTypesByObjectTypeRidBatchResponse", diff --git a/foundry_sdk/v2/ontologies/object_type.py b/foundry_sdk/v2/ontologies/object_type.py index 8d364bc1..c8302d4f 100644 --- a/foundry_sdk/v2/ontologies/object_type.py +++ b/foundry_sdk/v2/ontologies/object_type.py @@ -320,6 +320,76 @@ def get_full_metadata( ), ) + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_full_metadata_batch( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + requests: typing_extensions.Annotated[ + typing.List[ontologies_models.GetObjectTypeFullMetadataBatchRequestElement], + annotated_types.Len(min_length=1, max_length=100), + ], + branch: typing.Optional[core_models.FoundryBranch] = None, + include_link_types: typing.Optional[bool] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> ontologies_models.GetObjectTypeFullMetadataBatchResponse: + """ + Gets the full metadata for a batch of object types, identified by their API names. + + Set `includeLinkTypes` to return every outgoing link type for each object type alongside its metadata, + without needing to know the link type API names. Link types are ordered by their API name. + + Object types are returned in the order they were requested. Any that don't exist or that the requesting + token lacks permissions for are silently omitted. + + The maximum batch size for this endpoint is 100. + + :param ontology: + :type ontology: OntologyIdentifier + :param requests: + :type requests: List[GetObjectTypeFullMetadataBatchRequestElement] + :param branch: The Foundry branch to load the object type definitions from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param include_link_types: A flag that will return all outgoing link types for each requested object type in that object type's `linkTypes`. When false or omitted, `linkTypes` is empty. + :type include_link_types: Optional[bool] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :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: ontologies_models.GetObjectTypeFullMetadataBatchResponse + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/objectTypes/getFullMetadataBatch", + query_params={ + "branch": branch, + "preview": preview, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.GetObjectTypeFullMetadataBatchRequest( + requests=requests, + include_link_types=include_link_types, + ), + response_type=ontologies_models.GetObjectTypeFullMetadataBatchResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + @core.maybe_ignore_preview @pydantic.validate_call @errors.handle_unexpected @@ -571,6 +641,9 @@ def get(_: ontologies_models.ObjectTypeV2): ... def get_by_rid_batch(_: ontologies_models.GetObjectTypeByRidBatchResponse): ... def get_edits_history(_: ontologies_models.ObjectTypeEditsHistoryResponse): ... def get_full_metadata(_: ontologies_models.ObjectTypeFullMetadata): ... + def get_full_metadata_batch( + _: ontologies_models.GetObjectTypeFullMetadataBatchResponse, + ): ... def get_outgoing_link_type(_: ontologies_models.LinkTypeSideV2): ... def get_outgoing_link_types_by_object_type_rid_batch( _: ontologies_models.GetOutgoingLinkTypesByObjectTypeRidBatchResponse, @@ -582,6 +655,9 @@ def list_outgoing_link_types(_: ontologies_models.ListOutgoingLinkTypesResponseV self.get_by_rid_batch = core.with_raw_response(get_by_rid_batch, client.get_by_rid_batch) self.get_edits_history = core.with_raw_response(get_edits_history, client.get_edits_history) self.get_full_metadata = core.with_raw_response(get_full_metadata, client.get_full_metadata) + self.get_full_metadata_batch = core.with_raw_response( + get_full_metadata_batch, client.get_full_metadata_batch + ) self.get_outgoing_link_type = core.with_raw_response( get_outgoing_link_type, client.get_outgoing_link_type ) @@ -601,6 +677,9 @@ def get(_: ontologies_models.ObjectTypeV2): ... def get_by_rid_batch(_: ontologies_models.GetObjectTypeByRidBatchResponse): ... def get_edits_history(_: ontologies_models.ObjectTypeEditsHistoryResponse): ... def get_full_metadata(_: ontologies_models.ObjectTypeFullMetadata): ... + def get_full_metadata_batch( + _: ontologies_models.GetObjectTypeFullMetadataBatchResponse, + ): ... def get_outgoing_link_type(_: ontologies_models.LinkTypeSideV2): ... def get_outgoing_link_types_by_object_type_rid_batch( _: ontologies_models.GetOutgoingLinkTypesByObjectTypeRidBatchResponse, @@ -618,6 +697,9 @@ def list_outgoing_link_types(_: ontologies_models.ListOutgoingLinkTypesResponseV self.get_full_metadata = core.with_streaming_response( get_full_metadata, client.get_full_metadata ) + self.get_full_metadata_batch = core.with_streaming_response( + get_full_metadata_batch, client.get_full_metadata_batch + ) self.get_outgoing_link_type = core.with_streaming_response( get_outgoing_link_type, client.get_outgoing_link_type ) @@ -926,6 +1008,76 @@ def get_full_metadata( ), ) + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def get_full_metadata_batch( + self, + ontology: ontologies_models.OntologyIdentifier, + *, + requests: typing_extensions.Annotated[ + typing.List[ontologies_models.GetObjectTypeFullMetadataBatchRequestElement], + annotated_types.Len(min_length=1, max_length=100), + ], + branch: typing.Optional[core_models.FoundryBranch] = None, + include_link_types: typing.Optional[bool] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[ontologies_models.GetObjectTypeFullMetadataBatchResponse]: + """ + Gets the full metadata for a batch of object types, identified by their API names. + + Set `includeLinkTypes` to return every outgoing link type for each object type alongside its metadata, + without needing to know the link type API names. Link types are ordered by their API name. + + Object types are returned in the order they were requested. Any that don't exist or that the requesting + token lacks permissions for are silently omitted. + + The maximum batch size for this endpoint is 100. + + :param ontology: + :type ontology: OntologyIdentifier + :param requests: + :type requests: List[GetObjectTypeFullMetadataBatchRequestElement] + :param branch: The Foundry branch to load the object type definitions from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. + :type branch: Optional[FoundryBranch] + :param include_link_types: A flag that will return all outgoing link types for each requested object type in that object type's `linkTypes`. When false or omitted, `linkTypes` is empty. + :type include_link_types: Optional[bool] + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :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[ontologies_models.GetObjectTypeFullMetadataBatchResponse] + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/ontologies/{ontology}/objectTypes/getFullMetadataBatch", + query_params={ + "branch": branch, + "preview": preview, + }, + path_params={ + "ontology": ontology, + }, + header_params={ + "Content-Type": "application/json", + "Accept": "application/json", + }, + body=ontologies_models.GetObjectTypeFullMetadataBatchRequest( + requests=requests, + include_link_types=include_link_types, + ), + response_type=ontologies_models.GetObjectTypeFullMetadataBatchResponse, + request_timeout=request_timeout, + throwable_errors={}, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + @core.maybe_ignore_preview @pydantic.validate_call @errors.handle_unexpected @@ -1177,6 +1329,9 @@ def get(_: ontologies_models.ObjectTypeV2): ... def get_by_rid_batch(_: ontologies_models.GetObjectTypeByRidBatchResponse): ... def get_edits_history(_: ontologies_models.ObjectTypeEditsHistoryResponse): ... def get_full_metadata(_: ontologies_models.ObjectTypeFullMetadata): ... + def get_full_metadata_batch( + _: ontologies_models.GetObjectTypeFullMetadataBatchResponse, + ): ... def get_outgoing_link_type(_: ontologies_models.LinkTypeSideV2): ... def get_outgoing_link_types_by_object_type_rid_batch( _: ontologies_models.GetOutgoingLinkTypesByObjectTypeRidBatchResponse, @@ -1194,6 +1349,9 @@ def list_outgoing_link_types(_: ontologies_models.ListOutgoingLinkTypesResponseV self.get_full_metadata = core.async_with_raw_response( get_full_metadata, client.get_full_metadata ) + self.get_full_metadata_batch = core.async_with_raw_response( + get_full_metadata_batch, client.get_full_metadata_batch + ) self.get_outgoing_link_type = core.async_with_raw_response( get_outgoing_link_type, client.get_outgoing_link_type ) @@ -1213,6 +1371,9 @@ def get(_: ontologies_models.ObjectTypeV2): ... def get_by_rid_batch(_: ontologies_models.GetObjectTypeByRidBatchResponse): ... def get_edits_history(_: ontologies_models.ObjectTypeEditsHistoryResponse): ... def get_full_metadata(_: ontologies_models.ObjectTypeFullMetadata): ... + def get_full_metadata_batch( + _: ontologies_models.GetObjectTypeFullMetadataBatchResponse, + ): ... def get_outgoing_link_type(_: ontologies_models.LinkTypeSideV2): ... def get_outgoing_link_types_by_object_type_rid_batch( _: ontologies_models.GetOutgoingLinkTypesByObjectTypeRidBatchResponse, @@ -1230,6 +1391,9 @@ def list_outgoing_link_types(_: ontologies_models.ListOutgoingLinkTypesResponseV self.get_full_metadata = core.async_with_streaming_response( get_full_metadata, client.get_full_metadata ) + self.get_full_metadata_batch = core.async_with_streaming_response( + get_full_metadata_batch, client.get_full_metadata_batch + ) self.get_outgoing_link_type = core.async_with_streaming_response( get_outgoing_link_type, client.get_outgoing_link_type ) diff --git a/foundry_sdk/v2/ontologies/ontology_interface.py b/foundry_sdk/v2/ontologies/ontology_interface.py index 51dab8f6..b4299ae1 100644 --- a/foundry_sdk/v2/ontologies/ontology_interface.py +++ b/foundry_sdk/v2/ontologies/ontology_interface.py @@ -615,6 +615,11 @@ def search( Attempting to use an unsupported query will result in a validation error. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`. + The `pageSize` parameter is a maximum. A page may contain fewer objects than requested if the + objects in the page are large enough to reach an internal memory limit; this does not indicate + that there are no more results. As long as the response contains a `nextPageToken`, the remaining + objects can be retrieved by requesting subsequent pages. + :param ontology: :type ontology: OntologyIdentifier :param interface_type: The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**. @@ -1345,6 +1350,11 @@ def search( Attempting to use an unsupported query will result in a validation error. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`. + The `pageSize` parameter is a maximum. A page may contain fewer objects than requested if the + objects in the page are large enough to reach an internal memory limit; this does not indicate + that there are no more results. As long as the response contains a `nextPageToken`, the remaining + objects can be retrieved by requesting subsequent pages. + :param ontology: :type ontology: OntologyIdentifier :param interface_type: The API name of the interface type. To find the API name, use the **List interface types** endpoint or check the **Ontology Manager**. diff --git a/foundry_sdk/v2/ontologies/ontology_object.py b/foundry_sdk/v2/ontologies/ontology_object.py index 9dad7afe..c10161b0 100644 --- a/foundry_sdk/v2/ontologies/ontology_object.py +++ b/foundry_sdk/v2/ontologies/ontology_object.py @@ -403,6 +403,11 @@ def search( Queries can be at most three levels deep. By default, terms are separated by whitespace or punctuation (`?!,:;-[](){}'"~`). Periods (`.`) on their own are ignored. Partial terms are not matched by terms filters except where explicitly noted. + The `pageSize` parameter is a maximum. A page may contain fewer objects than requested if the + objects in the page are large enough to reach an internal memory limit; this does not indicate + that there are no more results. As long as the response contains a `nextPageToken`, the remaining + objects can be retrieved by requesting subsequent pages. + :param ontology: :type ontology: OntologyIdentifier :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. @@ -888,6 +893,11 @@ def search( Queries can be at most three levels deep. By default, terms are separated by whitespace or punctuation (`?!,:;-[](){}'"~`). Periods (`.`) on their own are ignored. Partial terms are not matched by terms filters except where explicitly noted. + The `pageSize` parameter is a maximum. A page may contain fewer objects than requested if the + objects in the page are large enough to reach an internal memory limit; this does not indicate + that there are no more results. As long as the response contains a `nextPageToken`, the remaining + objects can be retrieved by requesting subsequent pages. + :param ontology: :type ontology: OntologyIdentifier :param object_type: The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. diff --git a/foundry_sdk/v2/ontologies/ontology_object_set.py b/foundry_sdk/v2/ontologies/ontology_object_set.py index ebad98ae..f0b0a2bc 100644 --- a/foundry_sdk/v2/ontologies/ontology_object_set.py +++ b/foundry_sdk/v2/ontologies/ontology_object_set.py @@ -311,6 +311,11 @@ def load( Vector properties will not be returned unless included in the `select` parameter. + The `pageSize` parameter is a maximum. A page may contain fewer objects than requested if the + objects in the page are large enough to reach an internal memory limit; this does not indicate + that there are no more results. As long as the response contains a `nextPageToken`, the remaining + objects can be retrieved by requesting subsequent pages. + :param ontology: :type ontology: OntologyIdentifier :param object_set: @@ -553,6 +558,11 @@ def load_multiple_object_types( Vector properties will not be returned unless included in the `select` parameter. + The `pageSize` parameter is a maximum. A page may contain fewer objects than requested if the + objects in the page are large enough to reach an internal memory limit; this does not indicate + that there are no more results. As long as the response contains a `nextPageToken`, the remaining + objects can be retrieved by requesting subsequent pages. + :param ontology: :type ontology: OntologyIdentifier :param object_set: @@ -698,6 +708,11 @@ def load_objects_or_interfaces( Vector properties will not be returned unless included in the `select` parameter. + The `pageSize` parameter is a maximum. A page may contain fewer objects than requested if the + objects in the page are large enough to reach an internal memory limit; this does not indicate + that there are no more results. As long as the response contains a `nextPageToken`, the remaining + objects can be retrieved by requesting subsequent pages. + :param ontology: :type ontology: OntologyIdentifier :param object_set: @@ -1132,6 +1147,11 @@ def load( Vector properties will not be returned unless included in the `select` parameter. + The `pageSize` parameter is a maximum. A page may contain fewer objects than requested if the + objects in the page are large enough to reach an internal memory limit; this does not indicate + that there are no more results. As long as the response contains a `nextPageToken`, the remaining + objects can be retrieved by requesting subsequent pages. + :param ontology: :type ontology: OntologyIdentifier :param object_set: @@ -1374,6 +1394,11 @@ def load_multiple_object_types( Vector properties will not be returned unless included in the `select` parameter. + The `pageSize` parameter is a maximum. A page may contain fewer objects than requested if the + objects in the page are large enough to reach an internal memory limit; this does not indicate + that there are no more results. As long as the response contains a `nextPageToken`, the remaining + objects can be retrieved by requesting subsequent pages. + :param ontology: :type ontology: OntologyIdentifier :param object_set: @@ -1519,6 +1544,11 @@ def load_objects_or_interfaces( Vector properties will not be returned unless included in the `select` parameter. + The `pageSize` parameter is a maximum. A page may contain fewer objects than requested if the + objects in the page are large enough to reach an internal memory limit; this does not indicate + that there are no more results. As long as the response contains a `nextPageToken`, the remaining + objects can be retrieved by requesting subsequent pages. + :param ontology: :type ontology: OntologyIdentifier :param object_set: diff --git a/foundry_sdk/v2/orchestration/__init__.py b/foundry_sdk/v2/orchestration/__init__.py index 2eaef33b..a7756c69 100644 --- a/foundry_sdk/v2/orchestration/__init__.py +++ b/foundry_sdk/v2/orchestration/__init__.py @@ -13,8 +13,10 @@ # limitations under the License. -from foundry_sdk.v2.orchestration._client import AsyncOrchestrationClient -from foundry_sdk.v2.orchestration._client import OrchestrationClient +from foundry_sdk.v2.orchestration._client import ( + AsyncOrchestrationClient, + OrchestrationClient, +) __all__ = [ "OrchestrationClient", diff --git a/foundry_sdk/v2/orchestration/_client.py b/foundry_sdk/v2/orchestration/_client.py index b24617a1..d2bbc08a 100644 --- a/foundry_sdk/v2/orchestration/_client.py +++ b/foundry_sdk/v2/orchestration/_client.py @@ -113,7 +113,9 @@ def __init__( from foundry_sdk.v2.orchestration.job import AsyncJobClient from foundry_sdk.v2.orchestration.schedule import AsyncScheduleClient from foundry_sdk.v2.orchestration.schedule_run import AsyncScheduleRunClient - from foundry_sdk.v2.orchestration.schedule_version import AsyncScheduleVersionClient # NOQA + from foundry_sdk.v2.orchestration.schedule_version import ( + AsyncScheduleVersionClient, + ) self.Build = AsyncBuildClient(auth=auth, hostname=hostname, config=config) diff --git a/foundry_sdk/v2/sql_queries/__init__.py b/foundry_sdk/v2/sql_queries/__init__.py index 80a07c1a..f4a179ea 100644 --- a/foundry_sdk/v2/sql_queries/__init__.py +++ b/foundry_sdk/v2/sql_queries/__init__.py @@ -13,8 +13,7 @@ # limitations under the License. -from foundry_sdk.v2.sql_queries._client import AsyncSqlQueriesClient -from foundry_sdk.v2.sql_queries._client import SqlQueriesClient +from foundry_sdk.v2.sql_queries._client import AsyncSqlQueriesClient, SqlQueriesClient __all__ = [ "SqlQueriesClient", diff --git a/foundry_sdk/v2/streams/__init__.py b/foundry_sdk/v2/streams/__init__.py index 2aef148a..2c72befe 100644 --- a/foundry_sdk/v2/streams/__init__.py +++ b/foundry_sdk/v2/streams/__init__.py @@ -13,8 +13,7 @@ # limitations under the License. -from foundry_sdk.v2.streams._client import AsyncStreamsClient -from foundry_sdk.v2.streams._client import StreamsClient +from foundry_sdk.v2.streams._client import AsyncStreamsClient, StreamsClient __all__ = [ "StreamsClient", diff --git a/foundry_sdk/v2/third_party_applications/__init__.py b/foundry_sdk/v2/third_party_applications/__init__.py index f23d3d13..fcd08a69 100644 --- a/foundry_sdk/v2/third_party_applications/__init__.py +++ b/foundry_sdk/v2/third_party_applications/__init__.py @@ -15,8 +15,8 @@ from foundry_sdk.v2.third_party_applications._client import ( AsyncThirdPartyApplicationsClient, -) # NOQA -from foundry_sdk.v2.third_party_applications._client import ThirdPartyApplicationsClient + ThirdPartyApplicationsClient, +) __all__ = [ "ThirdPartyApplicationsClient", diff --git a/foundry_sdk/v2/third_party_applications/_client.py b/foundry_sdk/v2/third_party_applications/_client.py index 46491321..db24e372 100644 --- a/foundry_sdk/v2/third_party_applications/_client.py +++ b/foundry_sdk/v2/third_party_applications/_client.py @@ -47,7 +47,7 @@ def __init__( def ThirdPartyApplication(self): from foundry_sdk.v2.third_party_applications.third_party_application import ( ThirdPartyApplicationClient, - ) # NOQA + ) return ThirdPartyApplicationClient( auth=self._auth, @@ -73,7 +73,7 @@ def __init__( ): from foundry_sdk.v2.third_party_applications.third_party_application import ( AsyncThirdPartyApplicationClient, - ) # NOQA + ) self.ThirdPartyApplication = AsyncThirdPartyApplicationClient( auth=auth, hostname=hostname, config=config diff --git a/foundry_sdk/v2/widgets/__init__.py b/foundry_sdk/v2/widgets/__init__.py index 6405a46a..8dbc2a85 100644 --- a/foundry_sdk/v2/widgets/__init__.py +++ b/foundry_sdk/v2/widgets/__init__.py @@ -13,8 +13,7 @@ # limitations under the License. -from foundry_sdk.v2.widgets._client import AsyncWidgetsClient -from foundry_sdk.v2.widgets._client import WidgetsClient +from foundry_sdk.v2.widgets._client import AsyncWidgetsClient, WidgetsClient __all__ = [ "WidgetsClient", diff --git a/foundry_sdk/v2/widgets/_client.py b/foundry_sdk/v2/widgets/_client.py index 1c9155c3..109035c5 100644 --- a/foundry_sdk/v2/widgets/_client.py +++ b/foundry_sdk/v2/widgets/_client.py @@ -100,7 +100,9 @@ def __init__( config: typing.Optional[core.Config] = None, ): from foundry_sdk.v2.widgets.dev_mode_settings import AsyncDevModeSettingsClient - from foundry_sdk.v2.widgets.dev_mode_settings_v2 import AsyncDevModeSettingsV2Client # NOQA + from foundry_sdk.v2.widgets.dev_mode_settings_v2 import ( + AsyncDevModeSettingsV2Client, + ) from foundry_sdk.v2.widgets.repository import AsyncRepositoryClient from foundry_sdk.v2.widgets.widget_set import AsyncWidgetSetClient diff --git a/tests/language_models/test_utils.py b/tests/language_models/test_utils.py index 85193304..389cb16e 100644 --- a/tests/language_models/test_utils.py +++ b/tests/language_models/test_utils.py @@ -15,16 +15,16 @@ import pytest -from foundry_sdk._core.context_and_environment_vars import HOSTNAME_VAR -from foundry_sdk._core.context_and_environment_vars import TOKEN_VAR -from foundry_sdk._core.http_client import AsyncHttpClient -from foundry_sdk._core.http_client import HttpClient -from foundry_sdk.v2.language_models import get_anthropic_base_url -from foundry_sdk.v2.language_models import get_async_http_client -from foundry_sdk.v2.language_models import get_foundry_token -from foundry_sdk.v2.language_models import get_google_base_url -from foundry_sdk.v2.language_models import get_http_client -from foundry_sdk.v2.language_models import get_openai_base_url +from foundry_sdk._core.context_and_environment_vars import HOSTNAME_VAR, TOKEN_VAR +from foundry_sdk._core.http_client import AsyncHttpClient, HttpClient +from foundry_sdk.v2.language_models import ( + get_anthropic_base_url, + get_async_http_client, + get_foundry_token, + get_google_base_url, + get_http_client, + get_openai_base_url, +) from foundry_sdk.v2.language_models.utils import _get_api_gateway_base_url diff --git a/tests/server.py b/tests/server.py index a407b705..cbc0c45f 100644 --- a/tests/server.py +++ b/tests/server.py @@ -14,15 +14,11 @@ import time -from typing import List -from typing import Optional +from typing import List, Optional -from fastapi import APIRouter -from fastapi import FastAPI -from fastapi import HTTPException +from fastapi import APIRouter, FastAPI, HTTPException from fastapi.responses import StreamingResponse -from pydantic import BaseModel -from pydantic import Field +from pydantic import BaseModel, Field app = FastAPI() router = APIRouter() diff --git a/tests/test_auth_parameterization.py b/tests/test_auth_parameterization.py index e73ea795..e2c8e2c4 100644 --- a/tests/test_auth_parameterization.py +++ b/tests/test_auth_parameterization.py @@ -15,9 +15,7 @@ import os -from foundry_sdk import ConfidentialClientAuth -from foundry_sdk import Config -from foundry_sdk import FoundryClient +from foundry_sdk import ConfidentialClientAuth, Config, FoundryClient from foundry_sdk._core.hostname_supplier import StaticHostnameSupplier diff --git a/tests/test_resource_import.py b/tests/test_resource_import.py index 1df77937..b4526c55 100644 --- a/tests/test_resource_import.py +++ b/tests/test_resource_import.py @@ -86,7 +86,9 @@ def test_ontologies_v1_query_type_import(): def test_admin_v2_authentication_provider_import(): - from foundry_sdk.v2.admin.authentication_provider import AuthenticationProviderClient # NOQA + from foundry_sdk.v2.admin.authentication_provider import ( + AuthenticationProviderClient, + ) assert AuthenticationProviderClient is not None @@ -98,7 +100,9 @@ def test_admin_v2_cbac_banner_import(): def test_admin_v2_cbac_marking_restrictions_import(): - from foundry_sdk.v2.admin.cbac_marking_restrictions import CbacMarkingRestrictionsClient # NOQA + from foundry_sdk.v2.admin.cbac_marking_restrictions import ( + CbacMarkingRestrictionsClient, + ) assert CbacMarkingRestrictionsClient is not None @@ -112,7 +116,7 @@ def test_admin_v2_enrollment_import(): def test_admin_v2_enrollment_role_assignment_import(): from foundry_sdk.v2.admin.enrollment_role_assignment import ( EnrollmentRoleAssignmentClient, - ) # NOQA + ) assert EnrollmentRoleAssignmentClient is not None @@ -138,7 +142,7 @@ def test_admin_v2_group_membership_import(): def test_admin_v2_group_membership_expiration_policy_import(): from foundry_sdk.v2.admin.group_membership_expiration_policy import ( GroupMembershipExpirationPolicyClient, - ) # NOQA + ) assert GroupMembershipExpirationPolicyClient is not None @@ -170,7 +174,7 @@ def test_admin_v2_marking_category_import(): def test_admin_v2_marking_category_permissions_import(): from foundry_sdk.v2.admin.marking_category_permissions import ( MarkingCategoryPermissionsClient, - ) # NOQA + ) assert MarkingCategoryPermissionsClient is not None @@ -194,7 +198,9 @@ def test_admin_v2_organization_import(): def test_admin_v2_organization_guest_member_import(): - from foundry_sdk.v2.admin.organization_guest_member import OrganizationGuestMemberClient # NOQA + from foundry_sdk.v2.admin.organization_guest_member import ( + OrganizationGuestMemberClient, + ) assert OrganizationGuestMemberClient is not None @@ -202,7 +208,7 @@ def test_admin_v2_organization_guest_member_import(): def test_admin_v2_organization_role_assignment_import(): from foundry_sdk.v2.admin.organization_role_assignment import ( OrganizationRoleAssignmentClient, - ) # NOQA + ) assert OrganizationRoleAssignmentClient is not None @@ -354,7 +360,7 @@ def test_filesystem_v2_project_import(): def test_filesystem_v2_project_resource_reference_import(): from foundry_sdk.v2.filesystem.project_resource_reference import ( ProjectResourceReferenceClient, - ) # NOQA + ) assert ProjectResourceReferenceClient is not None @@ -434,7 +440,7 @@ def test_models_v2_experiment_import(): def test_models_v2_experiment_artifact_table_import(): from foundry_sdk.v2.models.experiment_artifact_table import ( ExperimentArtifactTableClient, - ) # NOQA + ) assert ExperimentArtifactTableClient is not None @@ -472,7 +478,7 @@ def test_models_v2_model_studio_import(): def test_models_v2_model_studio_config_version_import(): from foundry_sdk.v2.models.model_studio_config_version import ( ModelStudioConfigVersionClient, - ) # NOQA + ) assert ModelStudioConfigVersionClient is not None @@ -510,7 +516,7 @@ def test_ontologies_v2_action_type_import(): def test_ontologies_v2_action_type_full_metadata_import(): from foundry_sdk.v2.ontologies.action_type_full_metadata import ( ActionTypeFullMetadataClient, - ) # NOQA + ) assert ActionTypeFullMetadataClient is not None @@ -536,7 +542,7 @@ def test_ontologies_v2_cipher_text_property_import(): def test_ontologies_v2_geotemporal_series_property_import(): from foundry_sdk.v2.ontologies.geotemporal_series_property import ( GeotemporalSeriesPropertyClient, - ) # NOQA + ) assert GeotemporalSeriesPropertyClient is not None @@ -550,7 +556,7 @@ def test_ontologies_v2_linked_object_import(): def test_ontologies_v2_media_reference_property_import(): from foundry_sdk.v2.ontologies.media_reference_property import ( MediaReferencePropertyClient, - ) # NOQA + ) assert MediaReferencePropertyClient is not None @@ -616,7 +622,9 @@ def test_ontologies_v2_query_type_import(): def test_ontologies_v2_time_series_property_v2_import(): - from foundry_sdk.v2.ontologies.time_series_property_v2 import TimeSeriesPropertyV2Client # NOQA + from foundry_sdk.v2.ontologies.time_series_property_v2 import ( + TimeSeriesPropertyV2Client, + ) assert TimeSeriesPropertyV2Client is not None @@ -624,7 +632,7 @@ def test_ontologies_v2_time_series_property_v2_import(): def test_ontologies_v2_time_series_value_bank_property_import(): from foundry_sdk.v2.ontologies.time_series_value_bank_property import ( TimeSeriesValueBankPropertyClient, - ) # NOQA + ) assert TimeSeriesValueBankPropertyClient is not None @@ -686,7 +694,7 @@ def test_streams_v2_subscriber_import(): def test_third_party_applications_v2_third_party_application_import(): from foundry_sdk.v2.third_party_applications.third_party_application import ( ThirdPartyApplicationClient, - ) # NOQA + ) assert ThirdPartyApplicationClient is not None