From f0572000e98ff462b9eba62a7714d0e05a4b915b Mon Sep 17 00:00:00 2001 From: svc-excavator-bot Date: Thu, 13 Nov 2025 00:33:02 +0000 Subject: [PATCH] Excavator: Upgrade API Version --- README.md | 21 +- docs-snippets-npm/package.json | 2 +- docs-snippets-npm/src/index.ts | 7 +- .../models/StructFieldEvaluatedConstraint.md | 2 + .../models/ConnectionConfiguration.md | 1 + ...onnectionRequestConnectionConfiguration.md | 1 + .../models/CreateConnectionRequestSmbAuth.md | 11 + ...ectionRequestSmbConnectionConfiguration.md | 18 ++ ...onnectionRequestSmbUsernamePasswordAuth.md | 14 ++ docs/v2/Connectivity/models/SmbAuth.md | 11 + .../models/SmbConnectionConfiguration.md | 18 ++ .../models/SmbProxyConfiguration.md | 13 + docs/v2/Connectivity/models/SmbProxyType.md | 11 + .../models/SmbUsernamePasswordAuth.md | 14 ++ docs/v2/Functions/Query.md | 108 ++++++++- .../models/StreamingExecuteQueryRequest.md | 13 + docs/v2/MediaSets/MediaSet.md | 6 +- docs/v2/Ontologies/OntologyTransaction.md | 10 +- docs/v2/Ontologies/models/ActionTypeV2.md | 1 + docs/v2/Ontologies/models/AddObjectEdit.md | 1 - ...sactionRid.md => OntologyTransactionId.md} | 4 +- .../models/StructFieldEvaluatedConstraint.md | 2 + foundry_sdk/_versions.py | 2 +- foundry_sdk/v1/ontologies/errors.py | 21 ++ foundry_sdk/v1/ontologies/models.py | 7 +- foundry_sdk/v2/cli.py | 88 ++++++- foundry_sdk/v2/connectivity/errors.py | 32 +++ foundry_sdk/v2/connectivity/models.py | 122 ++++++++++ foundry_sdk/v2/functions/errors.py | 16 ++ foundry_sdk/v2/functions/models.py | 15 ++ foundry_sdk/v2/functions/query.py | 227 +++++++++++++++++- foundry_sdk/v2/media_sets/media_set.py | 12 +- foundry_sdk/v2/ontologies/errors.py | 21 ++ foundry_sdk/v2/ontologies/models.py | 14 +- .../v2/ontologies/ontology_transaction.py | 20 +- foundry_sdk/v2/widgets/errors.py | 88 +++++++ 36 files changed, 932 insertions(+), 42 deletions(-) create mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestSmbAuth.md create mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestSmbConnectionConfiguration.md create mode 100644 docs/v2/Connectivity/models/CreateConnectionRequestSmbUsernamePasswordAuth.md create mode 100644 docs/v2/Connectivity/models/SmbAuth.md create mode 100644 docs/v2/Connectivity/models/SmbConnectionConfiguration.md create mode 100644 docs/v2/Connectivity/models/SmbProxyConfiguration.md create mode 100644 docs/v2/Connectivity/models/SmbProxyType.md create mode 100644 docs/v2/Connectivity/models/SmbUsernamePasswordAuth.md create mode 100644 docs/v2/Functions/models/StreamingExecuteQueryRequest.md rename docs/v2/Ontologies/models/{OntologyTransactionRid.md => OntologyTransactionId.md} (88%) diff --git a/README.md b/README.md index 15c5d6a16..b4ddbc4eb 100644 --- a/README.md +++ b/README.md @@ -1133,6 +1133,9 @@ Namespace | Name | Import | **Connectivity** | [CreateConnectionRequestPersonalAccessToken](docs/v2/Connectivity/models/CreateConnectionRequestPersonalAccessToken.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestPersonalAccessToken` | **Connectivity** | [CreateConnectionRequestRestConnectionConfiguration](docs/v2/Connectivity/models/CreateConnectionRequestRestConnectionConfiguration.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestRestConnectionConfiguration` | **Connectivity** | [CreateConnectionRequestS3ConnectionConfiguration](docs/v2/Connectivity/models/CreateConnectionRequestS3ConnectionConfiguration.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestS3ConnectionConfiguration` | +**Connectivity** | [CreateConnectionRequestSmbAuth](docs/v2/Connectivity/models/CreateConnectionRequestSmbAuth.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestSmbAuth` | +**Connectivity** | [CreateConnectionRequestSmbConnectionConfiguration](docs/v2/Connectivity/models/CreateConnectionRequestSmbConnectionConfiguration.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestSmbConnectionConfiguration` | +**Connectivity** | [CreateConnectionRequestSmbUsernamePasswordAuth](docs/v2/Connectivity/models/CreateConnectionRequestSmbUsernamePasswordAuth.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestSmbUsernamePasswordAuth` | **Connectivity** | [CreateConnectionRequestSnowflakeAuthenticationMode](docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeAuthenticationMode.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestSnowflakeAuthenticationMode` | **Connectivity** | [CreateConnectionRequestSnowflakeConnectionConfiguration](docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeConnectionConfiguration.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestSnowflakeConnectionConfiguration` | **Connectivity** | [CreateConnectionRequestSnowflakeExternalOauth](docs/v2/Connectivity/models/CreateConnectionRequestSnowflakeExternalOauth.md) | `from foundry_sdk.v2.connectivity.models import CreateConnectionRequestSnowflakeExternalOauth` | @@ -1221,6 +1224,11 @@ Namespace | Name | Import | **Connectivity** | [SecretName](docs/v2/Connectivity/models/SecretName.md) | `from foundry_sdk.v2.connectivity.models import SecretName` | **Connectivity** | [SecretsNames](docs/v2/Connectivity/models/SecretsNames.md) | `from foundry_sdk.v2.connectivity.models import SecretsNames` | **Connectivity** | [SecretsWithPlaintextValues](docs/v2/Connectivity/models/SecretsWithPlaintextValues.md) | `from foundry_sdk.v2.connectivity.models import SecretsWithPlaintextValues` | +**Connectivity** | [SmbAuth](docs/v2/Connectivity/models/SmbAuth.md) | `from foundry_sdk.v2.connectivity.models import SmbAuth` | +**Connectivity** | [SmbConnectionConfiguration](docs/v2/Connectivity/models/SmbConnectionConfiguration.md) | `from foundry_sdk.v2.connectivity.models import SmbConnectionConfiguration` | +**Connectivity** | [SmbProxyConfiguration](docs/v2/Connectivity/models/SmbProxyConfiguration.md) | `from foundry_sdk.v2.connectivity.models import SmbProxyConfiguration` | +**Connectivity** | [SmbProxyType](docs/v2/Connectivity/models/SmbProxyType.md) | `from foundry_sdk.v2.connectivity.models import SmbProxyType` | +**Connectivity** | [SmbUsernamePasswordAuth](docs/v2/Connectivity/models/SmbUsernamePasswordAuth.md) | `from foundry_sdk.v2.connectivity.models import SmbUsernamePasswordAuth` | **Connectivity** | [SnowflakeAuthenticationMode](docs/v2/Connectivity/models/SnowflakeAuthenticationMode.md) | `from foundry_sdk.v2.connectivity.models import SnowflakeAuthenticationMode` | **Connectivity** | [SnowflakeConnectionConfiguration](docs/v2/Connectivity/models/SnowflakeConnectionConfiguration.md) | `from foundry_sdk.v2.connectivity.models import SnowflakeConnectionConfiguration` | **Connectivity** | [SnowflakeExternalOauth](docs/v2/Connectivity/models/SnowflakeExternalOauth.md) | `from foundry_sdk.v2.connectivity.models import SnowflakeExternalOauth` | @@ -1569,6 +1577,7 @@ Namespace | Name | Import | **Functions** | [RangesConstraint](docs/v2/Functions/models/RangesConstraint.md) | `from foundry_sdk.v2.functions.models import RangesConstraint` | **Functions** | [RegexConstraint](docs/v2/Functions/models/RegexConstraint.md) | `from foundry_sdk.v2.functions.models import RegexConstraint` | **Functions** | [RidConstraint](docs/v2/Functions/models/RidConstraint.md) | `from foundry_sdk.v2.functions.models import RidConstraint` | +**Functions** | [StreamingExecuteQueryRequest](docs/v2/Functions/models/StreamingExecuteQueryRequest.md) | `from foundry_sdk.v2.functions.models import StreamingExecuteQueryRequest` | **Functions** | [StructConstraint](docs/v2/Functions/models/StructConstraint.md) | `from foundry_sdk.v2.functions.models import StructConstraint` | **Functions** | [StructFieldApiName](docs/v2/Functions/models/StructFieldApiName.md) | `from foundry_sdk.v2.functions.models import StructFieldApiName` | **Functions** | [StructFieldName](docs/v2/Functions/models/StructFieldName.md) | `from foundry_sdk.v2.functions.models import StructFieldName` | @@ -1956,7 +1965,7 @@ Namespace | Name | Import | **Ontologies** | [OntologySetType](docs/v2/Ontologies/models/OntologySetType.md) | `from foundry_sdk.v2.ontologies.models import OntologySetType` | **Ontologies** | [OntologyStructField](docs/v2/Ontologies/models/OntologyStructField.md) | `from foundry_sdk.v2.ontologies.models import OntologyStructField` | **Ontologies** | [OntologyStructType](docs/v2/Ontologies/models/OntologyStructType.md) | `from foundry_sdk.v2.ontologies.models import OntologyStructType` | -**Ontologies** | [OntologyTransactionRid](docs/v2/Ontologies/models/OntologyTransactionRid.md) | `from foundry_sdk.v2.ontologies.models import OntologyTransactionRid` | +**Ontologies** | [OntologyTransactionId](docs/v2/Ontologies/models/OntologyTransactionId.md) | `from foundry_sdk.v2.ontologies.models import OntologyTransactionId` | **Ontologies** | [OntologyV2](docs/v2/Ontologies/models/OntologyV2.md) | `from foundry_sdk.v2.ontologies.models import OntologyV2` | **Ontologies** | [OntologyValueType](docs/v2/Ontologies/models/OntologyValueType.md) | `from foundry_sdk.v2.ontologies.models import OntologyValueType` | **Ontologies** | [OrderBy](docs/v2/Ontologies/models/OrderBy.md) | `from foundry_sdk.v2.ontologies.models import OrderBy` | @@ -2616,8 +2625,10 @@ Namespace | Name | Import | **Connectivity** | FileSizeFilterMissingGreaterThanAndLessThan | `from foundry_sdk.v2.connectivity.errors import FileSizeFilterMissingGreaterThanAndLessThan` | **Connectivity** | GetConfigurationPermissionDenied | `from foundry_sdk.v2.connectivity.errors import GetConfigurationPermissionDenied` | **Connectivity** | HostNameCannotHaveProtocolOrPort | `from foundry_sdk.v2.connectivity.errors import HostNameCannotHaveProtocolOrPort` | +**Connectivity** | InvalidShareName | `from foundry_sdk.v2.connectivity.errors import InvalidShareName` | **Connectivity** | InvalidVirtualTableConnection | `from foundry_sdk.v2.connectivity.errors import InvalidVirtualTableConnection` | **Connectivity** | ParentFolderNotFoundForConnection | `from foundry_sdk.v2.connectivity.errors import ParentFolderNotFoundForConnection` | +**Connectivity** | PortNotInRange | `from foundry_sdk.v2.connectivity.errors import PortNotInRange` | **Connectivity** | PropertyCannotBeBlank | `from foundry_sdk.v2.connectivity.errors import PropertyCannotBeBlank` | **Connectivity** | PropertyCannotBeEmpty | `from foundry_sdk.v2.connectivity.errors import PropertyCannotBeEmpty` | **Connectivity** | ReplaceFileImportPermissionDenied | `from foundry_sdk.v2.connectivity.errors import ReplaceFileImportPermissionDenied` | @@ -2805,6 +2816,7 @@ Namespace | Name | Import | **Functions** | QueryRuntimeError | `from foundry_sdk.v2.functions.errors import QueryRuntimeError` | **Functions** | QueryTimeExceededLimit | `from foundry_sdk.v2.functions.errors import QueryTimeExceededLimit` | **Functions** | QueryVersionNotFound | `from foundry_sdk.v2.functions.errors import QueryVersionNotFound` | +**Functions** | StreamingExecuteQueryPermissionDenied | `from foundry_sdk.v2.functions.errors import StreamingExecuteQueryPermissionDenied` | **Functions** | UnknownParameter | `from foundry_sdk.v2.functions.errors import UnknownParameter` | **Functions** | ValueTypeNotFound | `from foundry_sdk.v2.functions.errors import ValueTypeNotFound` | **Functions** | VersionIdNotFound | `from foundry_sdk.v2.functions.errors import VersionIdNotFound` | @@ -2881,6 +2893,7 @@ Namespace | Name | Import | **Ontologies** | InvalidRangeQuery | `from foundry_sdk.v2.ontologies.errors import InvalidRangeQuery` | **Ontologies** | InvalidSortOrder | `from foundry_sdk.v2.ontologies.errors import InvalidSortOrder` | **Ontologies** | InvalidSortType | `from foundry_sdk.v2.ontologies.errors import InvalidSortType` | +**Ontologies** | InvalidTransactionEditPropertyValue | `from foundry_sdk.v2.ontologies.errors import InvalidTransactionEditPropertyValue` | **Ontologies** | InvalidUserId | `from foundry_sdk.v2.ontologies.errors import InvalidUserId` | **Ontologies** | InvalidVectorDimension | `from foundry_sdk.v2.ontologies.errors import InvalidVectorDimension` | **Ontologies** | LinkAlreadyExists | `from foundry_sdk.v2.ontologies.errors import LinkAlreadyExists` | @@ -3042,9 +3055,14 @@ Namespace | Name | Import | **Widgets** | InvalidEventCount | `from foundry_sdk.v2.widgets.errors import InvalidEventCount` | **Widgets** | InvalidEventDisplayName | `from foundry_sdk.v2.widgets.errors import InvalidEventDisplayName` | **Widgets** | InvalidEventId | `from foundry_sdk.v2.widgets.errors import InvalidEventId` | +**Widgets** | InvalidEventParameter | `from foundry_sdk.v2.widgets.errors import InvalidEventParameter` | +**Widgets** | InvalidEventParameterCount | `from foundry_sdk.v2.widgets.errors import InvalidEventParameterCount` | +**Widgets** | InvalidEventParameterId | `from foundry_sdk.v2.widgets.errors import InvalidEventParameterId` | **Widgets** | InvalidEventParameterUpdateId | `from foundry_sdk.v2.widgets.errors import InvalidEventParameterUpdateId` | **Widgets** | InvalidFilePath | `from foundry_sdk.v2.widgets.errors import InvalidFilePath` | **Widgets** | InvalidManifest | `from foundry_sdk.v2.widgets.errors import InvalidManifest` | +**Widgets** | InvalidObjectSetEventParameterType | `from foundry_sdk.v2.widgets.errors import InvalidObjectSetEventParameterType` | +**Widgets** | InvalidObjectSetParameterType | `from foundry_sdk.v2.widgets.errors import InvalidObjectSetParameterType` | **Widgets** | InvalidParameterCount | `from foundry_sdk.v2.widgets.errors import InvalidParameterCount` | **Widgets** | InvalidParameterDisplayName | `from foundry_sdk.v2.widgets.errors import InvalidParameterDisplayName` | **Widgets** | InvalidParameterId | `from foundry_sdk.v2.widgets.errors import InvalidParameterId` | @@ -3162,6 +3180,7 @@ Namespace | Name | Import | **Ontologies** | InvalidRangeQuery | `from foundry_sdk.v1.ontologies.errors import InvalidRangeQuery` | **Ontologies** | InvalidSortOrder | `from foundry_sdk.v1.ontologies.errors import InvalidSortOrder` | **Ontologies** | InvalidSortType | `from foundry_sdk.v1.ontologies.errors import InvalidSortType` | +**Ontologies** | InvalidTransactionEditPropertyValue | `from foundry_sdk.v1.ontologies.errors import InvalidTransactionEditPropertyValue` | **Ontologies** | InvalidUserId | `from foundry_sdk.v1.ontologies.errors import InvalidUserId` | **Ontologies** | InvalidVectorDimension | `from foundry_sdk.v1.ontologies.errors import InvalidVectorDimension` | **Ontologies** | LinkAlreadyExists | `from foundry_sdk.v1.ontologies.errors import LinkAlreadyExists` | diff --git a/docs-snippets-npm/package.json b/docs-snippets-npm/package.json index 3df3e87cc..d79541e3a 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.1350.0", + "minVersion": "1.1367.0", "maxVersion": "1.x.x", "optional": false } diff --git a/docs-snippets-npm/src/index.ts b/docs-snippets-npm/src/index.ts index e94a4e013..dd54846dc 100644 --- a/docs-snippets-npm/src/index.ts +++ b/docs-snippets-npm/src/index.ts @@ -1038,6 +1038,11 @@ export const PYTHON_PLATFORM_SNIPPETS: SdkSnippets |""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + shareName: str + + +@dataclass +class InvalidShareName(errors.BadRequestError): + name: typing.Literal["InvalidShareName"] + parameters: InvalidShareNameParameters + error_instance_id: str + + class InvalidVirtualTableConnectionParameters(typing_extensions.TypedDict): """The specified connection is invalid or inaccessible.""" @@ -471,6 +486,21 @@ class ParentFolderNotFoundForConnection(errors.NotFoundError): error_instance_id: str +class PortNotInRangeParameters(typing_extensions.TypedDict): + """The specified port is not in the valid range (1-65535).""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + port: int + + +@dataclass +class PortNotInRange(errors.BadRequestError): + name: typing.Literal["PortNotInRange"] + parameters: PortNotInRangeParameters + error_instance_id: str + + class PropertyCannotBeBlankParameters(typing_extensions.TypedDict): """The specified property cannot be blank.""" @@ -728,8 +758,10 @@ class VirtualTableRegisterFromSourcePermissionDenied(errors.PermissionDeniedErro "FilesCountLimitFilterInvalidLimit", "GetConfigurationPermissionDenied", "HostNameCannotHaveProtocolOrPort", + "InvalidShareName", "InvalidVirtualTableConnection", "ParentFolderNotFoundForConnection", + "PortNotInRange", "PropertyCannotBeBlank", "PropertyCannotBeEmpty", "ReplaceFileImportPermissionDenied", diff --git a/foundry_sdk/v2/connectivity/models.py b/foundry_sdk/v2/connectivity/models.py index f92d0cff9..197e90c8a 100644 --- a/foundry_sdk/v2/connectivity/models.py +++ b/foundry_sdk/v2/connectivity/models.py @@ -152,6 +152,7 @@ class Connection(core.ModelBase): "RestConnectionConfiguration", "SnowflakeConnectionConfiguration", "DatabricksConnectionConfiguration", + "SmbConnectionConfiguration", "JdbcConnectionConfiguration", ], pydantic.Field(discriminator="type"), @@ -230,6 +231,7 @@ class CreateConnectionRequestBasicCredentials(core.ModelBase): "CreateConnectionRequestRestConnectionConfiguration", "CreateConnectionRequestSnowflakeConnectionConfiguration", "CreateConnectionRequestDatabricksConnectionConfiguration", + "CreateConnectionRequestSmbConnectionConfiguration", "CreateConnectionRequestJdbcConnectionConfiguration", ], pydantic.Field(discriminator="type"), @@ -438,6 +440,52 @@ class CreateConnectionRequestS3ConnectionConfiguration(core.ModelBase): type: typing.Literal["s3"] = "s3" +class CreateConnectionRequestSmbConnectionConfiguration(core.ModelBase): + """CreateConnectionRequestSmbConnectionConfiguration""" + + proxy: typing.Optional[SmbProxyConfiguration] = None + hostname: str + """ + Any identifier that can resolve to a server hosting an SMB share. This includes IP addresses, local + network names (e.g. FS-SERVER-01) or FQDNs. Should not include any protocol information like https://, smb://, etc + """ + + port: typing.Optional[int] = None + """445 by default""" + + auth: CreateConnectionRequestSmbAuth + share: str + """ + Must be a valid SMB share name. + https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/dc9978d7-6299-4c5a-a22d-a039cdc716ea + """ + + base_directory: typing.Optional[str] = pydantic.Field(alias=str("baseDirectory"), default=None) # type: ignore[literal-required] + """All reads and writes in this source will happen in this subdirectory""" + + require_message_signing: typing.Optional[bool] = pydantic.Field(alias=str("requireMessageSigning"), default=None) # type: ignore[literal-required] + """ + If true, the client will request that the server sign all messages. If the server does not support + message signing, the connection will fail. Defaults to true. + """ + + type: typing.Literal["smb"] = "smb" + + +class CreateConnectionRequestSmbUsernamePasswordAuth(core.ModelBase): + """CreateConnectionRequestSmbUsernamePasswordAuth""" + + password: CreateConnectionRequestEncryptedProperty + domain: typing.Optional[str] = None + """ + Optionally specify a Windows domain to use when authenticating. Normal DNS domain restrictions apply + but the top-level domain might be something non-standard like .local. Defaults to WORKGROUP + """ + + username: str + type: typing.Literal["usernamePassword"] = "usernamePassword" + + CreateConnectionRequestSnowflakeAuthenticationMode = typing_extensions.Annotated[ typing.Union[ "CreateConnectionRequestSnowflakeExternalOauth", @@ -1569,6 +1617,64 @@ class SecretsWithPlaintextValues(core.ModelBase): type: typing.Literal["asSecretsWithPlaintextValues"] = "asSecretsWithPlaintextValues" +class SmbConnectionConfiguration(core.ModelBase): + """SmbConnectionConfiguration""" + + hostname: str + """ + Any identifier that can resolve to a server hosting an SMB share. This includes IP addresses, local + network names (e.g. FS-SERVER-01) or FQDNs. Should not include any protocol information like https://, smb://, etc + """ + + port: typing.Optional[int] = None + """445 by default""" + + proxy: typing.Optional[SmbProxyConfiguration] = None + share: str + """ + Must be a valid SMB share name. + https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/dc9978d7-6299-4c5a-a22d-a039cdc716ea + """ + + base_directory: typing.Optional[str] = pydantic.Field(alias=str("baseDirectory"), default=None) # type: ignore[literal-required] + """All reads and writes in this source will happen in this subdirectory""" + + auth: SmbAuth + require_message_signing: typing.Optional[bool] = pydantic.Field(alias=str("requireMessageSigning"), default=None) # type: ignore[literal-required] + """ + If true, the client will request that the server sign all messages. If the server does not support + message signing, the connection will fail. Defaults to true. + """ + + type: typing.Literal["smb"] = "smb" + + +class SmbProxyConfiguration(core.ModelBase): + """Egress proxy to pass all traffic through.""" + + hostname: str + port: int + protocol: SmbProxyType + + +SmbProxyType = typing.Literal["HTTP", "SOCKS"] +"""SmbProxyType""" + + +class SmbUsernamePasswordAuth(core.ModelBase): + """SmbUsernamePasswordAuth""" + + username: str + password: EncryptedProperty + domain: typing.Optional[str] = None + """ + Optionally specify a Windows domain to use when authenticating. Normal DNS domain restrictions apply + but the top-level domain might be something non-standard like .local. Defaults to WORKGROUP + """ + + type: typing.Literal["usernamePassword"] = "usernamePassword" + + SnowflakeAuthenticationMode = typing_extensions.Annotated[ typing.Union["SnowflakeExternalOauth", "SnowflakeKeyPairAuthentication", BasicCredentials], pydantic.Field(discriminator="type"), @@ -1942,6 +2048,14 @@ class WorkflowIdentityFederation(core.ModelBase): type: typing.Literal["workflowIdentityFederation"] = "workflowIdentityFederation" +CreateConnectionRequestSmbAuth = CreateConnectionRequestSmbUsernamePasswordAuth +"""CreateConnectionRequestSmbAuth""" + + +SmbAuth = SmbUsernamePasswordAuth +"""SmbAuth""" + + core.resolve_forward_references(ConnectionConfiguration, globalns=globals(), localns=locals()) core.resolve_forward_references(ConnectionWorker, globalns=globals(), localns=locals()) core.resolve_forward_references( @@ -2014,6 +2128,9 @@ class WorkflowIdentityFederation(core.ModelBase): "CreateConnectionRequestPersonalAccessToken", "CreateConnectionRequestRestConnectionConfiguration", "CreateConnectionRequestS3ConnectionConfiguration", + "CreateConnectionRequestSmbAuth", + "CreateConnectionRequestSmbConnectionConfiguration", + "CreateConnectionRequestSmbUsernamePasswordAuth", "CreateConnectionRequestSnowflakeAuthenticationMode", "CreateConnectionRequestSnowflakeConnectionConfiguration", "CreateConnectionRequestSnowflakeExternalOauth", @@ -2102,6 +2219,11 @@ class WorkflowIdentityFederation(core.ModelBase): "SecretName", "SecretsNames", "SecretsWithPlaintextValues", + "SmbAuth", + "SmbConnectionConfiguration", + "SmbProxyConfiguration", + "SmbProxyType", + "SmbUsernamePasswordAuth", "SnowflakeAuthenticationMode", "SnowflakeConnectionConfiguration", "SnowflakeExternalOauth", diff --git a/foundry_sdk/v2/functions/errors.py b/foundry_sdk/v2/functions/errors.py index 1e47325ac..5472e653d 100644 --- a/foundry_sdk/v2/functions/errors.py +++ b/foundry_sdk/v2/functions/errors.py @@ -211,6 +211,21 @@ class QueryVersionNotFound(errors.NotFoundError): error_instance_id: str +class StreamingExecuteQueryPermissionDeniedParameters(typing_extensions.TypedDict): + """Could not streamingExecute the Query.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + queryApiName: functions_models.QueryApiName + + +@dataclass +class StreamingExecuteQueryPermissionDenied(errors.PermissionDeniedError): + name: typing.Literal["StreamingExecuteQueryPermissionDenied"] + parameters: StreamingExecuteQueryPermissionDeniedParameters + error_instance_id: str + + class UnknownParameterParameters(typing_extensions.TypedDict): """ The provided parameters were not found. Please look at the `knownParameters` field @@ -273,6 +288,7 @@ class VersionIdNotFound(errors.NotFoundError): "QueryRuntimeError", "QueryTimeExceededLimit", "QueryVersionNotFound", + "StreamingExecuteQueryPermissionDenied", "UnknownParameter", "ValueTypeNotFound", "VersionIdNotFound", diff --git a/foundry_sdk/v2/functions/models.py b/foundry_sdk/v2/functions/models.py index 63a1c040c..9a7f07ae7 100644 --- a/foundry_sdk/v2/functions/models.py +++ b/foundry_sdk/v2/functions/models.py @@ -22,6 +22,7 @@ from foundry_sdk import _core as core from foundry_sdk.v2.core import models as core_models +from foundry_sdk.v2.ontologies import models as ontologies_models class ArrayConstraint(core.ModelBase): @@ -285,6 +286,19 @@ class RidConstraint(core.ModelBase): type: typing.Literal["rid"] = "rid" +class StreamingExecuteQueryRequest(core.ModelBase): + """StreamingExecuteQueryRequest""" + + ontology: typing.Optional[ontologies_models.OntologyIdentifier] = None + """ + Optional ontology identifier (RID or API name). When provided, executes an ontology-scoped + function. When omitted, executes a global function. + """ + + parameters: typing.Dict[ParameterId, typing.Optional[DataValue]] + version: typing.Optional[FunctionVersion] = None + + class StructConstraint(core.ModelBase): """StructConstraint""" @@ -593,6 +607,7 @@ class VersionId(core.ModelBase): "RangesConstraint", "RegexConstraint", "RidConstraint", + "StreamingExecuteQueryRequest", "StructConstraint", "StructFieldApiName", "StructFieldName", diff --git a/foundry_sdk/v2/functions/query.py b/foundry_sdk/v2/functions/query.py index c63202cde..40b67402f 100644 --- a/foundry_sdk/v2/functions/query.py +++ b/foundry_sdk/v2/functions/query.py @@ -23,6 +23,7 @@ from foundry_sdk.v2.core import models as core_models from foundry_sdk.v2.functions import errors as functions_errors from foundry_sdk.v2.functions import models as functions_models +from foundry_sdk.v2.ontologies import models as ontologies_models class QueryClient: @@ -69,7 +70,10 @@ def execute( """ Executes a Query using the given parameters. By default, this executes the latest version of the query. - Optional parameters do not need to be supplied. + This endpoint is maintained for backward compatibility only. + + For all new implementations, use the `streamingExecute` endpoint, which supports all function types + and provides enhanced functionality. :param query_api_name: :type query_api_name: QueryApiName @@ -230,16 +234,119 @@ def get_by_rid( ), ) + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def streaming_execute( + self, + query_api_name: functions_models.QueryApiName, + *, + parameters: typing.Dict[ + functions_models.ParameterId, typing.Optional[functions_models.DataValue] + ], + attribution: typing.Optional[core_models.Attribution] = None, + ontology: typing.Optional[ontologies_models.OntologyIdentifier] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + trace_parent: typing.Optional[core_models.TraceParent] = None, + trace_state: typing.Optional[core_models.TraceState] = None, + version: typing.Optional[functions_models.FunctionVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> bytes: + """ + Executes a Query using the given parameters, returning results as an NDJSON stream. By default, this executes the latest version of the query. + + This endpoint supports all Query functions. The endpoint name 'streamingExecute' refers to the NDJSON + streaming response format. Both streaming and non-streaming functions can use this endpoint. + Non-streaming functions return a single-line NDJSON response, while streaming functions return multi-line NDJSON responses. + This is the recommended endpoint for all query execution. + + The response is returned as a binary stream in NDJSON (Newline Delimited JSON) format, where each line + is a StreamingExecuteQueryResponse containing either a data batch or an error. + + For a function returning a list of 5 records with a batch size of 3, the response stream would contain + two lines. The first line contains the first 3 items, and the second line contains the remaining 2 items: + + ``` + {"type":"data","value":[{"productId":"SKU-001","price":29.99},{"productId":"SKU-002","price":49.99},{"productId":"SKU-003","price":19.99}]} + {"type":"data","value":[{"productId":"SKU-004","price":39.99},{"productId":"SKU-005","price":59.99}]} + ``` + + Each line is a separate JSON object followed by a newline character. Clients should parse the stream + line-by-line to process results as they arrive. If an error occurs during execution, the stream will + contain an error line: + + ``` + {"type":"error","errorCode":"INVALID_ARGUMENT","errorName":"QueryRuntimeError","errorInstanceId":"3f8a9c7b-2e4d-4a1f-9b8c-7d6e5f4a3b2c","errorDescription":"Division by zero","parameters":{}} + ``` + + :param query_api_name: + :type query_api_name: QueryApiName + :param parameters: + :type parameters: Dict[ParameterId, Optional[DataValue]] + :param attribution: + :type attribution: Optional[Attribution] + :param ontology: Optional ontology identifier (RID or API name). When provided, executes an ontology-scoped function. When omitted, executes a global function. + :type ontology: Optional[OntologyIdentifier] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param trace_parent: + :type trace_parent: Optional[TraceParent] + :param trace_state: + :type trace_state: Optional[TraceState] + :param version: + :type version: Optional[FunctionVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: bytes + + :raises StreamingExecuteQueryPermissionDenied: Could not streamingExecute the Query. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/functions/queries/{queryApiName}/streamingExecute", + query_params={ + "preview": preview, + }, + path_params={ + "queryApiName": query_api_name, + }, + header_params={ + "attribution": attribution, + "traceParent": trace_parent, + "traceState": trace_state, + "Content-Type": "application/json", + "Accept": "application/octet-stream", + }, + body=functions_models.StreamingExecuteQueryRequest( + ontology=ontology, + parameters=parameters, + version=version, + ), + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={ + "StreamingExecuteQueryPermissionDenied": functions_errors.StreamingExecuteQueryPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + class _QueryClientRaw: def __init__(self, client: QueryClient) -> None: def execute(_: functions_models.ExecuteQueryResponse): ... def get(_: functions_models.Query): ... def get_by_rid(_: functions_models.Query): ... + def streaming_execute(_: bytes): ... self.execute = core.with_raw_response(execute, client.execute) self.get = core.with_raw_response(get, client.get) self.get_by_rid = core.with_raw_response(get_by_rid, client.get_by_rid) + self.streaming_execute = core.with_raw_response(streaming_execute, client.streaming_execute) class _QueryClientStreaming: @@ -247,10 +354,14 @@ def __init__(self, client: QueryClient) -> None: def execute(_: functions_models.ExecuteQueryResponse): ... def get(_: functions_models.Query): ... def get_by_rid(_: functions_models.Query): ... + def streaming_execute(_: bytes): ... self.execute = core.with_streaming_response(execute, client.execute) self.get = core.with_streaming_response(get, client.get) self.get_by_rid = core.with_streaming_response(get_by_rid, client.get_by_rid) + self.streaming_execute = core.with_streaming_response( + streaming_execute, client.streaming_execute + ) class AsyncQueryClient: @@ -297,7 +408,10 @@ def execute( """ Executes a Query using the given parameters. By default, this executes the latest version of the query. - Optional parameters do not need to be supplied. + This endpoint is maintained for backward compatibility only. + + For all new implementations, use the `streamingExecute` endpoint, which supports all function types + and provides enhanced functionality. :param query_api_name: :type query_api_name: QueryApiName @@ -458,16 +572,121 @@ def get_by_rid( ), ) + @core.maybe_ignore_preview + @pydantic.validate_call + @errors.handle_unexpected + def streaming_execute( + self, + query_api_name: functions_models.QueryApiName, + *, + parameters: typing.Dict[ + functions_models.ParameterId, typing.Optional[functions_models.DataValue] + ], + attribution: typing.Optional[core_models.Attribution] = None, + ontology: typing.Optional[ontologies_models.OntologyIdentifier] = None, + preview: typing.Optional[core_models.PreviewMode] = None, + trace_parent: typing.Optional[core_models.TraceParent] = None, + trace_state: typing.Optional[core_models.TraceState] = None, + version: typing.Optional[functions_models.FunctionVersion] = None, + request_timeout: typing.Optional[core.Timeout] = None, + _sdk_internal: core.SdkInternal = {}, + ) -> typing.Awaitable[bytes]: + """ + Executes a Query using the given parameters, returning results as an NDJSON stream. By default, this executes the latest version of the query. + + This endpoint supports all Query functions. The endpoint name 'streamingExecute' refers to the NDJSON + streaming response format. Both streaming and non-streaming functions can use this endpoint. + Non-streaming functions return a single-line NDJSON response, while streaming functions return multi-line NDJSON responses. + This is the recommended endpoint for all query execution. + + The response is returned as a binary stream in NDJSON (Newline Delimited JSON) format, where each line + is a StreamingExecuteQueryResponse containing either a data batch or an error. + + For a function returning a list of 5 records with a batch size of 3, the response stream would contain + two lines. The first line contains the first 3 items, and the second line contains the remaining 2 items: + + ``` + {"type":"data","value":[{"productId":"SKU-001","price":29.99},{"productId":"SKU-002","price":49.99},{"productId":"SKU-003","price":19.99}]} + {"type":"data","value":[{"productId":"SKU-004","price":39.99},{"productId":"SKU-005","price":59.99}]} + ``` + + Each line is a separate JSON object followed by a newline character. Clients should parse the stream + line-by-line to process results as they arrive. If an error occurs during execution, the stream will + contain an error line: + + ``` + {"type":"error","errorCode":"INVALID_ARGUMENT","errorName":"QueryRuntimeError","errorInstanceId":"3f8a9c7b-2e4d-4a1f-9b8c-7d6e5f4a3b2c","errorDescription":"Division by zero","parameters":{}} + ``` + + :param query_api_name: + :type query_api_name: QueryApiName + :param parameters: + :type parameters: Dict[ParameterId, Optional[DataValue]] + :param attribution: + :type attribution: Optional[Attribution] + :param ontology: Optional ontology identifier (RID or API name). When provided, executes an ontology-scoped function. When omitted, executes a global function. + :type ontology: Optional[OntologyIdentifier] + :param preview: Enables the use of preview functionality. + :type preview: Optional[PreviewMode] + :param trace_parent: + :type trace_parent: Optional[TraceParent] + :param trace_state: + :type trace_state: Optional[TraceState] + :param version: + :type version: Optional[FunctionVersion] + :param request_timeout: timeout setting for this request in seconds. + :type request_timeout: Optional[int] + :return: Returns the result object. + :rtype: typing.Awaitable[bytes] + + :raises StreamingExecuteQueryPermissionDenied: Could not streamingExecute the Query. + """ + + return self._api_client.call_api( + core.RequestInfo( + method="POST", + resource_path="/v2/functions/queries/{queryApiName}/streamingExecute", + query_params={ + "preview": preview, + }, + path_params={ + "queryApiName": query_api_name, + }, + header_params={ + "attribution": attribution, + "traceParent": trace_parent, + "traceState": trace_state, + "Content-Type": "application/json", + "Accept": "application/octet-stream", + }, + body=functions_models.StreamingExecuteQueryRequest( + ontology=ontology, + parameters=parameters, + version=version, + ), + response_type=bytes, + request_timeout=request_timeout, + throwable_errors={ + "StreamingExecuteQueryPermissionDenied": functions_errors.StreamingExecuteQueryPermissionDenied, + }, + response_mode=_sdk_internal.get("response_mode"), + ), + ) + class _AsyncQueryClientRaw: def __init__(self, client: AsyncQueryClient) -> None: def execute(_: functions_models.ExecuteQueryResponse): ... def get(_: functions_models.Query): ... def get_by_rid(_: functions_models.Query): ... + def streaming_execute(_: bytes): ... self.execute = core.async_with_raw_response(execute, client.execute) self.get = core.async_with_raw_response(get, client.get) self.get_by_rid = core.async_with_raw_response(get_by_rid, client.get_by_rid) + self.streaming_execute = core.async_with_raw_response( + streaming_execute, client.streaming_execute + ) class _AsyncQueryClientStreaming: @@ -475,7 +694,11 @@ def __init__(self, client: AsyncQueryClient) -> None: def execute(_: functions_models.ExecuteQueryResponse): ... def get(_: functions_models.Query): ... def get_by_rid(_: functions_models.Query): ... + def streaming_execute(_: bytes): ... self.execute = core.async_with_streaming_response(execute, client.execute) self.get = core.async_with_streaming_response(get, client.get) self.get_by_rid = core.async_with_streaming_response(get_by_rid, client.get_by_rid) + self.streaming_execute = core.async_with_streaming_response( + streaming_execute, client.streaming_execute + ) diff --git a/foundry_sdk/v2/media_sets/media_set.py b/foundry_sdk/v2/media_sets/media_set.py index 6143319b6..c568f66d6 100644 --- a/foundry_sdk/v2/media_sets/media_set.py +++ b/foundry_sdk/v2/media_sets/media_set.py @@ -656,10 +656,12 @@ def upload_media( _sdk_internal: core.SdkInternal = {}, ) -> core_models.MediaReference: """ - "Uploads a temporary media item. If the media item isn't persisted within 1 hour, the item will be deleted. + Uploads a temporary media item. If the media item isn't persisted within 1 hour, the item will be deleted. + + If multiple resources are attributed to, usage will be attributed to the first one in the list. The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. - Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:ontologies-read api:ontologies-write`." + Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:ontologies-read api:ontologies-write`. :param body: Body of the request :type body: bytes @@ -1384,10 +1386,12 @@ def upload_media( _sdk_internal: core.SdkInternal = {}, ) -> typing.Awaitable[core_models.MediaReference]: """ - "Uploads a temporary media item. If the media item isn't persisted within 1 hour, the item will be deleted. + Uploads a temporary media item. If the media item isn't persisted within 1 hour, the item will be deleted. + + If multiple resources are attributed to, usage will be attributed to the first one in the list. The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. - Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:ontologies-read api:ontologies-write`." + Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:ontologies-read api:ontologies-write`. :param body: Body of the request :type body: bytes diff --git a/foundry_sdk/v2/ontologies/errors.py b/foundry_sdk/v2/ontologies/errors.py index ccae14c67..24ccc6c50 100644 --- a/foundry_sdk/v2/ontologies/errors.py +++ b/foundry_sdk/v2/ontologies/errors.py @@ -926,6 +926,26 @@ class InvalidSortType(errors.BadRequestError): error_instance_id: str +class InvalidTransactionEditPropertyValueParameters(typing_extensions.TypedDict): + """ + The value of the given property is invalid. See the documentation of `DataValue` for details on + how properties are represented for transaction edits. + """ + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + propertyApiName: ontologies_models.PropertyApiName + propertyBaseType: ontologies_models.ValueType + propertyValue: ontologies_models.DataValue + + +@dataclass +class InvalidTransactionEditPropertyValue(errors.BadRequestError): + name: typing.Literal["InvalidTransactionEditPropertyValue"] + parameters: InvalidTransactionEditPropertyValueParameters + error_instance_id: str + + class InvalidUserIdParameters(typing_extensions.TypedDict): """The provided value for a user id must be a UUID.""" @@ -2167,6 +2187,7 @@ class ViewObjectPermissionDenied(errors.PermissionDeniedError): "InvalidRangeQuery", "InvalidSortOrder", "InvalidSortType", + "InvalidTransactionEditPropertyValue", "InvalidUserId", "InvalidVectorDimension", "LinkAlreadyExists", diff --git a/foundry_sdk/v2/ontologies/models.py b/foundry_sdk/v2/ontologies/models.py index d0ee47744..dd74062e2 100644 --- a/foundry_sdk/v2/ontologies/models.py +++ b/foundry_sdk/v2/ontologies/models.py @@ -142,6 +142,8 @@ class ActionTypeV2(core.ModelBase): parameters: typing.Dict[ParameterId, ActionParameterV2] rid: ActionTypeRid operations: typing.List[LogicRule] + tool_description: typing.Optional[str] = pydantic.Field(alias=str("toolDescription"), default=None) # type: ignore[literal-required] + """Optional description intended for tool use contexts, such as AI agents.""" class ActivePropertyTypeStatus(core.ModelBase): @@ -185,7 +187,6 @@ class AddObjectEdit(core.ModelBase): """AddObjectEdit""" object_type: ObjectTypeApiName = pydantic.Field(alias=str("objectType")) # type: ignore[literal-required] - primary_key: PropertyValue = pydantic.Field(alias=str("primaryKey")) # type: ignore[literal-required] properties: typing.Dict[PropertyApiName, DataValue] type: typing.Literal["addObject"] = "addObject" @@ -2540,7 +2541,7 @@ class OntologyStructType(core.ModelBase): type: typing.Literal["struct"] = "struct" -OntologyTransactionRid = core.RID +OntologyTransactionId = str """The RID identifying a transaction.""" @@ -3579,7 +3580,11 @@ class StructEvaluatedConstraint(core.ModelBase): StructFieldEvaluatedConstraint = typing_extensions.Annotated[ typing.Union[ - OneOfConstraint, RangeConstraint, StringLengthConstraint, StringRegexMatchConstraint + OneOfConstraint, + RangeConstraint, + ObjectQueryResultConstraint, + StringLengthConstraint, + StringRegexMatchConstraint, ], pydantic.Field(discriminator="type"), ] @@ -3596,6 +3601,7 @@ class StructEvaluatedConstraint(core.ModelBase): | `range` | The struct parameter field value must be within the defined range. | | `stringLength` | The struct parameter field value must have a length within the defined range. | | `stringRegexMatch` | The struct parameter field value must match a predefined regular expression. | +| `objectQueryResult` | The struct parameter field value must be the primary key of an object found within an object set. | """ @@ -4453,7 +4459,7 @@ class WithinPolygonQuery(core.ModelBase): "OntologySetType", "OntologyStructField", "OntologyStructType", - "OntologyTransactionRid", + "OntologyTransactionId", "OntologyV2", "OntologyValueType", "OrQueryV2", diff --git a/foundry_sdk/v2/ontologies/ontology_transaction.py b/foundry_sdk/v2/ontologies/ontology_transaction.py index 49c08f027..e80d3bfd6 100644 --- a/foundry_sdk/v2/ontologies/ontology_transaction.py +++ b/foundry_sdk/v2/ontologies/ontology_transaction.py @@ -53,7 +53,7 @@ def __init__( def post_edits( self, ontology: ontologies_models.OntologyIdentifier, - transaction_rid: ontologies_models.OntologyTransactionRid, + transaction_id: ontologies_models.OntologyTransactionId, *, edits: typing.List[ontologies_models.TransactionEdit], preview: typing.Optional[core_models.PreviewMode] = None, @@ -65,8 +65,8 @@ def post_edits( :param ontology: :type ontology: OntologyIdentifier - :param transaction_rid: The RID of the transaction to apply edits to. - :type transaction_rid: OntologyTransactionRid + :param transaction_id: The RID of the transaction to apply edits to. + :type transaction_id: OntologyTransactionId :param edits: :type edits: List[TransactionEdit] :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. @@ -80,13 +80,13 @@ def post_edits( return self._api_client.call_api( core.RequestInfo( method="POST", - resource_path="/v2/ontologies/{ontology}/transactions/{transactionRid}/edits", + resource_path="/v2/ontologies/{ontology}/transactions/{transactionId}/edits", query_params={ "preview": preview, }, path_params={ "ontology": ontology, - "transactionRid": transaction_rid, + "transactionId": transaction_id, }, header_params={ "Content-Type": "application/json", @@ -146,7 +146,7 @@ def __init__( def post_edits( self, ontology: ontologies_models.OntologyIdentifier, - transaction_rid: ontologies_models.OntologyTransactionRid, + transaction_id: ontologies_models.OntologyTransactionId, *, edits: typing.List[ontologies_models.TransactionEdit], preview: typing.Optional[core_models.PreviewMode] = None, @@ -158,8 +158,8 @@ def post_edits( :param ontology: :type ontology: OntologyIdentifier - :param transaction_rid: The RID of the transaction to apply edits to. - :type transaction_rid: OntologyTransactionRid + :param transaction_id: The RID of the transaction to apply edits to. + :type transaction_id: OntologyTransactionId :param edits: :type edits: List[TransactionEdit] :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. @@ -173,13 +173,13 @@ def post_edits( return self._api_client.call_api( core.RequestInfo( method="POST", - resource_path="/v2/ontologies/{ontology}/transactions/{transactionRid}/edits", + resource_path="/v2/ontologies/{ontology}/transactions/{transactionId}/edits", query_params={ "preview": preview, }, path_params={ "ontology": ontology, - "transactionRid": transaction_rid, + "transactionId": transaction_id, }, header_params={ "Content-Type": "application/json", diff --git a/foundry_sdk/v2/widgets/errors.py b/foundry_sdk/v2/widgets/errors.py index 4151dd865..10baf0b2f 100644 --- a/foundry_sdk/v2/widgets/errors.py +++ b/foundry_sdk/v2/widgets/errors.py @@ -309,6 +309,54 @@ class InvalidEventId(errors.BadRequestError): error_instance_id: str +class InvalidEventParameterParameters(typing_extensions.TypedDict): + """The event parameter is invalid.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + reason: str + eventParameterId: str + + +@dataclass +class InvalidEventParameter(errors.BadRequestError): + name: typing.Literal["InvalidEventParameter"] + parameters: InvalidEventParameterParameters + error_instance_id: str + + +class InvalidEventParameterCountParameters(typing_extensions.TypedDict): + """The widget config contains an event with too many event parameters.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + reason: str + eventParameterCount: int + + +@dataclass +class InvalidEventParameterCount(errors.BadRequestError): + name: typing.Literal["InvalidEventParameterCount"] + parameters: InvalidEventParameterCountParameters + error_instance_id: str + + +class InvalidEventParameterIdParameters(typing_extensions.TypedDict): + """The event parameter id is invalid.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + reason: str + eventParameterId: str + + +@dataclass +class InvalidEventParameterId(errors.BadRequestError): + name: typing.Literal["InvalidEventParameterId"] + parameters: InvalidEventParameterIdParameters + error_instance_id: str + + class InvalidEventParameterUpdateIdParameters(typing_extensions.TypedDict): """The event references an invalid parameter id.""" @@ -350,6 +398,7 @@ class InvalidManifestParameters(typing_extensions.TypedDict): __pydantic_config__ = {"extra": "allow"} # type: ignore reason: str + value: typing_extensions.NotRequired[typing.Any] @dataclass @@ -359,6 +408,40 @@ class InvalidManifest(errors.BadRequestError): error_instance_id: str +class InvalidObjectSetEventParameterTypeParameters(typing_extensions.TypedDict): + """The object set event parameter type is invalid.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + reason: str + eventParameterId: str + value: typing_extensions.NotRequired[typing.Any] + + +@dataclass +class InvalidObjectSetEventParameterType(errors.BadRequestError): + name: typing.Literal["InvalidObjectSetEventParameterType"] + parameters: InvalidObjectSetEventParameterTypeParameters + error_instance_id: str + + +class InvalidObjectSetParameterTypeParameters(typing_extensions.TypedDict): + """The object set parameter type is invalid.""" + + __pydantic_config__ = {"extra": "allow"} # type: ignore + + reason: str + parameterId: str + value: typing_extensions.NotRequired[typing.Any] + + +@dataclass +class InvalidObjectSetParameterType(errors.BadRequestError): + name: typing.Literal["InvalidObjectSetParameterType"] + parameters: InvalidObjectSetParameterTypeParameters + error_instance_id: str + + class InvalidParameterCountParameters(typing_extensions.TypedDict): """The widget config contains too many parameters.""" @@ -728,9 +811,14 @@ class WidgetSetNotFound(errors.NotFoundError): "InvalidEventCount", "InvalidEventDisplayName", "InvalidEventId", + "InvalidEventParameter", + "InvalidEventParameterCount", + "InvalidEventParameterId", "InvalidEventParameterUpdateId", "InvalidFilePath", "InvalidManifest", + "InvalidObjectSetEventParameterType", + "InvalidObjectSetParameterType", "InvalidParameterCount", "InvalidParameterDisplayName", "InvalidParameterId",