diff --git a/.stats.yml b/.stats.yml index 42d2617e..cc2ea93b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 69 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/structify%2Fstructify-7a4719ea1b0b0e031b16d315cd89ee4975303e2f314d6613ee5b7f12ecb5b5d8.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/structify%2Fstructify-117723686aeff4cac611ae597d0171cdc7390f3ef2c677e8b9ed8b517f1e83e5.yml diff --git a/api.md b/api.md index 301ff8fc..4be7b439 100644 --- a/api.md +++ b/api.md @@ -275,6 +275,7 @@ Types: from structify.types import ( DatasetDescriptor, Entity, + Image, KnowledgeGraph, PropertyType, Relationship, diff --git a/src/structify/types/__init__.py b/src/structify/types/__init__.py index 38731ef0..0aff4230 100644 --- a/src/structify/types/__init__.py +++ b/src/structify/types/__init__.py @@ -2,11 +2,13 @@ from __future__ import annotations +from .image import Image as Image from .table import Table as Table from .entity import Entity as Entity from .source import Source as Source from .user_info import UserInfo as UserInfo from .chat_prompt import ChatPrompt as ChatPrompt +from .image_param import ImageParam as ImageParam from .table_param import TableParam as TableParam from .entity_param import EntityParam as EntityParam from .relationship import Relationship as Relationship diff --git a/src/structify/types/dataset_match_response.py b/src/structify/types/dataset_match_response.py index b965b193..7cc05d89 100644 --- a/src/structify/types/dataset_match_response.py +++ b/src/structify/types/dataset_match_response.py @@ -1,21 +1,15 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, Union, Optional +from typing import Dict, Union from datetime import datetime from typing_extensions import TypeAlias +from .image import Image from .._models import BaseModel -__all__ = ["DatasetMatchResponse", "Entity", "EntityProperties", "EntityPropertiesImage"] +__all__ = ["DatasetMatchResponse", "Entity", "EntityProperties"] - -class EntityPropertiesImage(BaseModel): - number: int - - hash: Optional[str] = None - - -EntityProperties: TypeAlias = Union[str, bool, float, EntityPropertiesImage] +EntityProperties: TypeAlias = Union[str, bool, float, Image] class Entity(BaseModel): diff --git a/src/structify/types/dataset_view_relationships_response.py b/src/structify/types/dataset_view_relationships_response.py index 9f6f9457..597e0317 100644 --- a/src/structify/types/dataset_view_relationships_response.py +++ b/src/structify/types/dataset_view_relationships_response.py @@ -1,20 +1,14 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, Union, Optional +from typing import Dict, Union from typing_extensions import TypeAlias +from .image import Image from .._models import BaseModel -__all__ = ["DatasetViewRelationshipsResponse", "Properties", "PropertiesImage"] +__all__ = ["DatasetViewRelationshipsResponse", "Properties"] - -class PropertiesImage(BaseModel): - number: int - - hash: Optional[str] = None - - -Properties: TypeAlias = Union[str, bool, float, PropertiesImage] +Properties: TypeAlias = Union[str, bool, float, Image] class DatasetViewRelationshipsResponse(BaseModel): diff --git a/src/structify/types/dataset_view_table_response.py b/src/structify/types/dataset_view_table_response.py index 1880e020..81dc7f7a 100644 --- a/src/structify/types/dataset_view_table_response.py +++ b/src/structify/types/dataset_view_table_response.py @@ -1,21 +1,15 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, Union, Optional +from typing import Dict, Union from datetime import datetime from typing_extensions import TypeAlias +from .image import Image from .._models import BaseModel -__all__ = ["DatasetViewTableResponse", "Properties", "PropertiesImage"] +__all__ = ["DatasetViewTableResponse", "Properties"] - -class PropertiesImage(BaseModel): - number: int - - hash: Optional[str] = None - - -Properties: TypeAlias = Union[str, bool, float, PropertiesImage] +Properties: TypeAlias = Union[str, bool, float, Image] class DatasetViewTableResponse(BaseModel): diff --git a/src/structify/types/dataset_view_tables_with_relationships_response.py b/src/structify/types/dataset_view_tables_with_relationships_response.py index 512a1ad3..30f576cb 100644 --- a/src/structify/types/dataset_view_tables_with_relationships_response.py +++ b/src/structify/types/dataset_view_tables_with_relationships_response.py @@ -1,32 +1,23 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Union, Optional +from typing import Dict, List, Union from datetime import datetime from typing_extensions import TypeAlias +from .image import Image from .._models import BaseModel __all__ = [ "DatasetViewTablesWithRelationshipsResponse", "ConnectedEntity", "ConnectedEntityProperties", - "ConnectedEntityPropertiesImage", "Entity", "EntityProperties", - "EntityPropertiesImage", "Relationship", "RelationshipProperties", - "RelationshipPropertiesImage", ] - -class ConnectedEntityPropertiesImage(BaseModel): - number: int - - hash: Optional[str] = None - - -ConnectedEntityProperties: TypeAlias = Union[str, bool, float, ConnectedEntityPropertiesImage] +ConnectedEntityProperties: TypeAlias = Union[str, bool, float, Image] class ConnectedEntity(BaseModel): @@ -39,13 +30,7 @@ class ConnectedEntity(BaseModel): properties: Dict[str, ConnectedEntityProperties] -class EntityPropertiesImage(BaseModel): - number: int - - hash: Optional[str] = None - - -EntityProperties: TypeAlias = Union[str, bool, float, EntityPropertiesImage] +EntityProperties: TypeAlias = Union[str, bool, float, Image] class Entity(BaseModel): @@ -58,13 +43,7 @@ class Entity(BaseModel): properties: Dict[str, EntityProperties] -class RelationshipPropertiesImage(BaseModel): - number: int - - hash: Optional[str] = None - - -RelationshipProperties: TypeAlias = Union[str, bool, float, RelationshipPropertiesImage] +RelationshipProperties: TypeAlias = Union[str, bool, float, Image] class Relationship(BaseModel): diff --git a/src/structify/types/entity.py b/src/structify/types/entity.py index 0a97de21..87326a92 100644 --- a/src/structify/types/entity.py +++ b/src/structify/types/entity.py @@ -1,20 +1,14 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, Union, Optional +from typing import Dict, Union from typing_extensions import TypeAlias +from .image import Image from .._models import BaseModel -__all__ = ["Entity", "Properties", "PropertiesImage"] +__all__ = ["Entity", "Properties"] - -class PropertiesImage(BaseModel): - number: int - - hash: Optional[str] = None - - -Properties: TypeAlias = Union[str, bool, float, PropertiesImage] +Properties: TypeAlias = Union[str, bool, float, Image] class Entity(BaseModel): diff --git a/src/structify/types/entity_get_local_subgraph_response.py b/src/structify/types/entity_get_local_subgraph_response.py index b3edcf60..52db9443 100644 --- a/src/structify/types/entity_get_local_subgraph_response.py +++ b/src/structify/types/entity_get_local_subgraph_response.py @@ -1,29 +1,15 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Union, Optional +from typing import Dict, List, Union from datetime import datetime from typing_extensions import TypeAlias +from .image import Image from .._models import BaseModel -__all__ = [ - "EntityGetLocalSubgraphResponse", - "Neighbor", - "NeighborProperties", - "NeighborPropertiesImage", - "Relationship", - "RelationshipProperties", - "RelationshipPropertiesImage", -] +__all__ = ["EntityGetLocalSubgraphResponse", "Neighbor", "NeighborProperties", "Relationship", "RelationshipProperties"] - -class NeighborPropertiesImage(BaseModel): - number: int - - hash: Optional[str] = None - - -NeighborProperties: TypeAlias = Union[str, bool, float, NeighborPropertiesImage] +NeighborProperties: TypeAlias = Union[str, bool, float, Image] class Neighbor(BaseModel): @@ -36,13 +22,7 @@ class Neighbor(BaseModel): properties: Dict[str, NeighborProperties] -class RelationshipPropertiesImage(BaseModel): - number: int - - hash: Optional[str] = None - - -RelationshipProperties: TypeAlias = Union[str, bool, float, RelationshipPropertiesImage] +RelationshipProperties: TypeAlias = Union[str, bool, float, Image] class Relationship(BaseModel): diff --git a/src/structify/types/entity_get_response.py b/src/structify/types/entity_get_response.py index 29ac96f7..e1d643ed 100644 --- a/src/structify/types/entity_get_response.py +++ b/src/structify/types/entity_get_response.py @@ -1,21 +1,15 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, Union, Optional +from typing import Dict, Union from datetime import datetime from typing_extensions import TypeAlias +from .image import Image from .._models import BaseModel -__all__ = ["EntityGetResponse", "Properties", "PropertiesImage"] +__all__ = ["EntityGetResponse", "Properties"] - -class PropertiesImage(BaseModel): - number: int - - hash: Optional[str] = None - - -Properties: TypeAlias = Union[str, bool, float, PropertiesImage] +Properties: TypeAlias = Union[str, bool, float, Image] class EntityGetResponse(BaseModel): diff --git a/src/structify/types/entity_get_source_entities_response.py b/src/structify/types/entity_get_source_entities_response.py index 58379d82..b276d7bb 100644 --- a/src/structify/types/entity_get_source_entities_response.py +++ b/src/structify/types/entity_get_source_entities_response.py @@ -1,11 +1,12 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Union, Optional +from typing import Dict, List, Union from datetime import datetime from typing_extensions import Literal, TypeAlias from pydantic import Field as FieldInfo +from .image import Image from .source import Source from .._models import BaseModel @@ -20,7 +21,6 @@ "SourceEntityLocationPage", "SourceEntityLocationPagePage", "SourceEntityProperties", - "SourceEntityPropertiesImage", ] @@ -54,14 +54,7 @@ class SourceEntityLocationPage(BaseModel): SourceEntityLocationText, SourceEntityLocationVisual, SourceEntityLocationPage, Literal["None"] ] - -class SourceEntityPropertiesImage(BaseModel): - number: int - - hash: Optional[str] = None - - -SourceEntityProperties: TypeAlias = Union[str, bool, float, SourceEntityPropertiesImage] +SourceEntityProperties: TypeAlias = Union[str, bool, float, Image] class SourceEntity(BaseModel): diff --git a/src/structify/types/entity_merge_response.py b/src/structify/types/entity_merge_response.py index cd1fa53f..eb089b85 100644 --- a/src/structify/types/entity_merge_response.py +++ b/src/structify/types/entity_merge_response.py @@ -1,21 +1,15 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, Union, Optional +from typing import Dict, Union from datetime import datetime from typing_extensions import TypeAlias +from .image import Image from .._models import BaseModel -__all__ = ["EntityMergeResponse", "Properties", "PropertiesImage"] +__all__ = ["EntityMergeResponse", "Properties"] - -class PropertiesImage(BaseModel): - number: int - - hash: Optional[str] = None - - -Properties: TypeAlias = Union[str, bool, float, PropertiesImage] +Properties: TypeAlias = Union[str, bool, float, Image] class EntityMergeResponse(BaseModel): diff --git a/src/structify/types/entity_param.py b/src/structify/types/entity_param.py index 6bda0217..93d3cde4 100644 --- a/src/structify/types/entity_param.py +++ b/src/structify/types/entity_param.py @@ -5,16 +5,11 @@ from typing import Dict, Union from typing_extensions import Required, TypeAlias, TypedDict -__all__ = ["EntityParam", "Properties", "PropertiesImage"] +from .image_param import ImageParam +__all__ = ["EntityParam", "Properties"] -class PropertiesImage(TypedDict, total=False): - number: Required[int] - - hash: str - - -Properties: TypeAlias = Union[str, bool, float, PropertiesImage] +Properties: TypeAlias = Union[str, bool, float, ImageParam] class EntityParam(TypedDict, total=False): diff --git a/src/structify/types/entity_search_response.py b/src/structify/types/entity_search_response.py index 70227116..919d0ca8 100644 --- a/src/structify/types/entity_search_response.py +++ b/src/structify/types/entity_search_response.py @@ -1,26 +1,15 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Union, Optional +from typing import Dict, List, Union from datetime import datetime from typing_extensions import TypeAlias +from .image import Image from .._models import BaseModel -__all__ = [ - "EntitySearchResponse", - "EntitySearchResponseItem", - "EntitySearchResponseItemProperties", - "EntitySearchResponseItemPropertiesImage", -] +__all__ = ["EntitySearchResponse", "EntitySearchResponseItem", "EntitySearchResponseItemProperties"] - -class EntitySearchResponseItemPropertiesImage(BaseModel): - number: int - - hash: Optional[str] = None - - -EntitySearchResponseItemProperties: TypeAlias = Union[str, bool, float, EntitySearchResponseItemPropertiesImage] +EntitySearchResponseItemProperties: TypeAlias = Union[str, bool, float, Image] class EntitySearchResponseItem(BaseModel): diff --git a/src/structify/types/entity_summarize_response.py b/src/structify/types/entity_summarize_response.py index e215f3c0..f892d50b 100644 --- a/src/structify/types/entity_summarize_response.py +++ b/src/structify/types/entity_summarize_response.py @@ -1,26 +1,15 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Union, Optional +from typing import Dict, List, Union from datetime import datetime from typing_extensions import TypeAlias +from .image import Image from .._models import BaseModel -__all__ = [ - "EntitySummarizeResponse", - "EntitySummarizeResponseItem", - "EntitySummarizeResponseItemProperties", - "EntitySummarizeResponseItemPropertiesImage", -] +__all__ = ["EntitySummarizeResponse", "EntitySummarizeResponseItem", "EntitySummarizeResponseItemProperties"] - -class EntitySummarizeResponseItemPropertiesImage(BaseModel): - number: int - - hash: Optional[str] = None - - -EntitySummarizeResponseItemProperties: TypeAlias = Union[str, bool, float, EntitySummarizeResponseItemPropertiesImage] +EntitySummarizeResponseItemProperties: TypeAlias = Union[str, bool, float, Image] class EntitySummarizeResponseItem(BaseModel): diff --git a/src/structify/types/entity_update_property_params.py b/src/structify/types/entity_update_property_params.py index dde24f3e..19e8b11f 100644 --- a/src/structify/types/entity_update_property_params.py +++ b/src/structify/types/entity_update_property_params.py @@ -6,16 +6,9 @@ from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict from .._utils import PropertyInfo +from .image_param import ImageParam -__all__ = [ - "EntityUpdatePropertyParams", - "PropValue", - "PropValueImage", - "Source", - "SourceWeb", - "SourceDocumentPage", - "SourceSecFiling", -] +__all__ = ["EntityUpdatePropertyParams", "PropValue", "Source", "SourceWeb", "SourceDocumentPage", "SourceSecFiling"] class EntityUpdatePropertyParams(TypedDict, total=False): @@ -31,13 +24,7 @@ class EntityUpdatePropertyParams(TypedDict, total=False): source: Source -class PropValueImage(TypedDict, total=False): - number: Required[int] - - hash: str - - -PropValue: TypeAlias = Union[str, bool, float, PropValueImage] +PropValue: TypeAlias = Union[str, bool, float, ImageParam] class SourceWeb(TypedDict, total=False): diff --git a/src/structify/types/entity_update_property_response.py b/src/structify/types/entity_update_property_response.py index 84054f11..2f3dbb40 100644 --- a/src/structify/types/entity_update_property_response.py +++ b/src/structify/types/entity_update_property_response.py @@ -1,21 +1,15 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, Union, Optional +from typing import Dict, Union from datetime import datetime from typing_extensions import TypeAlias +from .image import Image from .._models import BaseModel -__all__ = ["EntityUpdatePropertyResponse", "Properties", "PropertiesImage"] +__all__ = ["EntityUpdatePropertyResponse", "Properties"] - -class PropertiesImage(BaseModel): - number: int - - hash: Optional[str] = None - - -Properties: TypeAlias = Union[str, bool, float, PropertiesImage] +Properties: TypeAlias = Union[str, bool, float, Image] class EntityUpdatePropertyResponse(BaseModel): diff --git a/src/structify/types/entity_view_response.py b/src/structify/types/entity_view_response.py index 4fccd689..b7ccb7ba 100644 --- a/src/structify/types/entity_view_response.py +++ b/src/structify/types/entity_view_response.py @@ -1,28 +1,25 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Union, Optional +from typing import Dict, List, Union from datetime import datetime from typing_extensions import Literal, TypeAlias from pydantic import Field as FieldInfo from . import source +from .image import Image from .._models import BaseModel __all__ = [ "EntityViewResponse", "ConnectedEntity", "ConnectedEntityProperties", - "ConnectedEntityPropertiesImage", "Entity", "EntityProperties", - "EntityPropertiesImage", "Relationship", "RelationshipProperties", - "RelationshipPropertiesImage", "SimilarEntity", "SimilarEntityProperties", - "SimilarEntityPropertiesImage", "Source", "SourceLocation", "SourceLocationText", @@ -33,14 +30,7 @@ "SourceLocationPagePage", ] - -class ConnectedEntityPropertiesImage(BaseModel): - number: int - - hash: Optional[str] = None - - -ConnectedEntityProperties: TypeAlias = Union[str, bool, float, ConnectedEntityPropertiesImage] +ConnectedEntityProperties: TypeAlias = Union[str, bool, float, Image] class ConnectedEntity(BaseModel): @@ -53,13 +43,7 @@ class ConnectedEntity(BaseModel): properties: Dict[str, ConnectedEntityProperties] -class EntityPropertiesImage(BaseModel): - number: int - - hash: Optional[str] = None - - -EntityProperties: TypeAlias = Union[str, bool, float, EntityPropertiesImage] +EntityProperties: TypeAlias = Union[str, bool, float, Image] class Entity(BaseModel): @@ -72,13 +56,7 @@ class Entity(BaseModel): properties: Dict[str, EntityProperties] -class RelationshipPropertiesImage(BaseModel): - number: int - - hash: Optional[str] = None - - -RelationshipProperties: TypeAlias = Union[str, bool, float, RelationshipPropertiesImage] +RelationshipProperties: TypeAlias = Union[str, bool, float, Image] class Relationship(BaseModel): @@ -91,13 +69,7 @@ class Relationship(BaseModel): to_id: str -class SimilarEntityPropertiesImage(BaseModel): - number: int - - hash: Optional[str] = None - - -SimilarEntityProperties: TypeAlias = Union[str, bool, float, SimilarEntityPropertiesImage] +SimilarEntityProperties: TypeAlias = Union[str, bool, float, Image] class SimilarEntity(BaseModel): diff --git a/src/structify/types/image.py b/src/structify/types/image.py new file mode 100644 index 00000000..6b29188f --- /dev/null +++ b/src/structify/types/image.py @@ -0,0 +1,13 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from .._models import BaseModel + +__all__ = ["Image"] + + +class Image(BaseModel): + number: int + + hash: Optional[str] = None diff --git a/src/structify/types/image_param.py b/src/structify/types/image_param.py new file mode 100644 index 00000000..88af308b --- /dev/null +++ b/src/structify/types/image_param.py @@ -0,0 +1,13 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["ImageParam"] + + +class ImageParam(TypedDict, total=False): + number: Required[int] + + hash: str diff --git a/src/structify/types/relationship.py b/src/structify/types/relationship.py index 9e661847..ccda4b1c 100644 --- a/src/structify/types/relationship.py +++ b/src/structify/types/relationship.py @@ -3,18 +3,12 @@ from typing import Dict, Union, Optional from typing_extensions import TypeAlias +from .image import Image from .._models import BaseModel -__all__ = ["Relationship", "Properties", "PropertiesImage"] +__all__ = ["Relationship", "Properties"] - -class PropertiesImage(BaseModel): - number: int - - hash: Optional[str] = None - - -Properties: TypeAlias = Union[str, bool, float, PropertiesImage] +Properties: TypeAlias = Union[str, bool, float, Image] class Relationship(BaseModel): diff --git a/src/structify/types/relationship_param.py b/src/structify/types/relationship_param.py index 82d06985..cf549679 100644 --- a/src/structify/types/relationship_param.py +++ b/src/structify/types/relationship_param.py @@ -5,16 +5,11 @@ from typing import Dict, Union from typing_extensions import Required, TypeAlias, TypedDict -__all__ = ["RelationshipParam", "Properties", "PropertiesImage"] +from .image_param import ImageParam +__all__ = ["RelationshipParam", "Properties"] -class PropertiesImage(TypedDict, total=False): - number: Required[int] - - hash: str - - -Properties: TypeAlias = Union[str, bool, float, PropertiesImage] +Properties: TypeAlias = Union[str, bool, float, ImageParam] class RelationshipParam(TypedDict, total=False):