Skip to content

Commit

Permalink
SDK regeneration (#227)
Browse files Browse the repository at this point in the history
Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
  • Loading branch information
fern-api[bot] authored Nov 8, 2024
1 parent 2479a9b commit cb4cb4c
Show file tree
Hide file tree
Showing 9 changed files with 729 additions and 399 deletions.
6 changes: 3 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1,009 changes: 659 additions & 350 deletions src/sayari/entity/types/entity_summary_response.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/sayari/generated_types/types/address_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class AddressProperties(UniversalBaseModel):
Phrases like "in", "near", etc. used after a category phrase, to help with parsing queries like "restaurants in Brooklyn"
"""

normalized: str
normalized: typing.Optional[str] = None
po_box: typing.Optional[str] = pydantic.Field(default=None)
"""
Typically found in non-physical (mail-only) addresses
Expand Down
6 changes: 3 additions & 3 deletions src/sayari/search/types/coordinates.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# This file was auto-generated by Fern from our API Definition.

from ...core.pydantic_utilities import UniversalBaseModel
from ...core.pydantic_utilities import IS_PYDANTIC_V2
import typing
from ...core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic


class Coordinates(UniversalBaseModel):
lat: float
lng: float
lat: typing.Optional[float] = None
lng: typing.Optional[float] = None
address: str

if IS_PYDANTIC_V2:
Expand Down
85 changes: 49 additions & 36 deletions src/sayari/search/types/entity_search_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,28 @@ class EntitySearchResponse(PaginatedResponse):
offset=0,
limit=1,
size=QualifiedCount(
count=64,
count=41,
qualifier="eq",
),
next=True,
data=[
SearchResults(
id="mGq1lpuqKssNWTjIokuPeA",
label="VICTORIA BECKHAM LIMITED",
degree=67,
degree=114,
entity_url="/v1/entity/mGq1lpuqKssNWTjIokuPeA",
pep=False,
psa_id="695785012897",
psa_count=3,
psa_id="65455301594691",
psa_count=4,
sanctioned=False,
closed=False,
company_type="Stock Corporation - Out of State - Stock",
company_type="LADIES FASHION",
registration_date="Incorporated 2008-02-28",
latest_status=Status(
status="active",
date="2023-08-29",
),
trade_count={"sent": 41, "received": 0},
trade_count={"sent": 82, "received": 2},
type="company",
identifiers=[
Identifier(
Expand All @@ -69,7 +69,7 @@ class EntitySearchResponse(PaginatedResponse):
addresses=[
"202 HAMMERSMITH ROAD , LONDON , , UNITED KINGDOM , W6 7DN , GB",
"Unit 33, Ransomes Dock Business Centre, 35-37 Parkgate Road, London SW11 4NP",
"SAUNDERS BUILDING, 202 HAMMERSMITH ROAD, HAMMERSMITH, LONDON",
"Hammersmith Road, London, W6 7DN",
],
countries=["GBR", "USA"],
relationship_count={
Expand All @@ -78,100 +78,113 @@ class EntitySearchResponse(PaginatedResponse):
"shareholder_of": 1,
"has_shareholder": 2,
"has_registered_agent": 5,
"shipper_of": 41,
"has_director": 11,
"owner_of": 3,
"has_founder": 1,
"ships_to": 1,
"ships_to": 5,
"receives_from": 1,
},
source_count={
"2b618f1996252fe537a6d998ae14c9b2": SourceCountInfo(
count=1,
label="UK Corporate Registry Confirmation Statements",
),
"2b788dbdf9194ed5a5c309386a6516b1": SourceCountInfo(
count=28,
count=37,
label="UK HM Revenue & Customs Traders Database",
),
"a447a7b622c4ead6e1caf94983dc2337": SourceCountInfo(
count=6,
count=8,
label="USA California Secretary of State",
),
"a7829d9c8999fcaa78af55886da9be06": SourceCountInfo(
count=43,
label="Turkey Imports & Exports (January 2024 - Present)",
),
"ecdfb3f2ecc8c3797e77d5795a8066ef": SourceCountInfo(
count=35,
count=40,
label="UK Corporate Registry",
),
"e5de7b52cc88ef4cd1a10e201bdf46ee": SourceCountInfo(
count=41,
label="Vietnam Imports & Exports (January 2023 - Present)",
),
"2a4fe9a14e332c8f9ded1f8a457c2b89": SourceCountInfo(
count=36,
count=42,
label="UK Land Commercial and Corporate Ownership Data (CCOD)",
),
"4ea8bac1bed868e1510ffd21842e9551": SourceCountInfo(
count=69,
count=86,
label="UK Persons with Significant Control",
),
},
risk={
"basel_aml": RiskData(
value=4.63,
value=4.28,
metadata={"country": ["USA"]},
level="relevant",
),
"cpi_score": RiskData(
value=67.0,
value=69.0,
metadata={"country": ["USA"]},
level="relevant",
),
},
user_attribute_counts={},
user_attribute_count={},
user_record_count=0,
user_related_entities_count=0,
user_relationship_count={},
related_entities_count=67,
related_entities_count=114,
attribute_counts={
"company_type": 3,
"name": 2,
"business_purpose": 4,
"identifier": 3,
"additional_information": 106,
"country": 7,
"status": 5,
"address": 6,
},
attribute_count={
"company_type": 2,
"company_type": 3,
"name": 2,
"business_purpose": 4,
"identifier": 3,
"additional_information": 106,
"country": 8,
"country": 7,
"status": 5,
"address": 7,
"address": 6,
},
reference_id="ecdfb3f2ecc8c3797e77d5795a8066ef/06517802/1540252800000:4a34442eccf1622995130b194a5d50e7",
coordinates=[
Coordinates(
lat=51.49323,
lng=-0.22207,
lat=51.49322001798694,
lng=-0.2220315859755715,
address="202 HAMMERSMITH ROAD , LONDON , , UNITED KINGDOM , W6 7DN , GB",
),
Coordinates(
lat=51.47943,
lng=-0.16859,
lat=51.47911101182882,
lng=-0.16811097048599777,
address="Unit 33, Ransomes Dock Business Centre, 35-37 Parkgate Road, London SW11 4NP",
),
Coordinates(
lat=51.49323,
lng=-0.22207,
address="SAUNDERS BUILDING, 202 HAMMERSMITH ROAD, HAMMERSMITH, LONDON",
lat=51.493835014595135,
lng=-0.21932487497451175,
address="Hammersmith Road, London, W6 7DN",
),
Coordinates(
lat=51.47898,
lng=-0.16784,
address="Ransome's Dock, 35-37 Parkgate Road, London, SW11 4NP",
lat=53.06030545100003,
lng=-1.4104778399999418,
address="202 HAMMERSMITH ROAD UNITED KINGDOM",
),
Coordinates(
lat=51.493080000000006,
lng=-0.22138000000000002,
address="Hammersmith Road, London, W6 7DN",
address="202 HAMMERSMITH ROAD",
),
Coordinates(
lat=51.49291,
lng=-0.22579,
address="202 HAMMERSMITH ROAD UNITED KINGDOM",
lat=51.490490045109766,
lng=-0.2455951217808129,
address="202 HAMMERSMITH ROAD BRITISH ISLES",
),
],
matches={
Expand Down
10 changes: 10 additions & 0 deletions src/sayari/shared_types/types/embedded_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,16 @@ class EmbeddedEntity(UniversalBaseModel):
Count of user-created attributes for a given [attribute type](/sayari-library/ontology/attributes)
"""

attribute_counts: typing.Optional[typing.Dict[Attributes, int]] = pydantic.Field(default=None)
"""
Count of attributes for a given [attribute type](/sayari-library/ontology/attributes)
"""

user_attribute_counts: typing.Optional[typing.Dict[Attributes, int]] = pydantic.Field(default=None)
"""
Count of user-created attributes for a given [attribute type](/sayari-library/ontology/attributes)
"""

related_entities_count: int
user_related_entities_count: int
user_record_count: int
Expand Down
2 changes: 0 additions & 2 deletions src/sayari/shared_types/types/entity_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ class EntityDetails(EmbeddedEntity):

possibly_same_as: typing.Optional[PossiblySameAs] = None
referenced_by: typing.Optional[ReferencedBy] = None
attribute_counts: typing.Optional[typing.Any] = None
user_attribute_counts: typing.Optional[typing.Any] = None

if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
Expand Down
4 changes: 2 additions & 2 deletions src/sayari/trade/types/shipment.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class Shipment(UniversalBaseModel):
type: str
buyer: typing.List[SourceOrDestinationEntity]
supplier: typing.List[SourceOrDestinationEntity]
arrival_date: typing.Optional[str] = None
departure_date: typing.Optional[str] = None
arrival_date: typing.Optional[typing.List[str]] = None
departure_date: typing.Optional[typing.List[str]] = None
departure_address: typing.Optional[ShipmentAddress] = None
arrival_address: typing.Optional[ShipmentAddress] = None
arrival_country: typing.List[Country]
Expand Down
4 changes: 2 additions & 2 deletions src/sayari/trade/types/shipment_search_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,9 @@ class ShipmentSearchResponse(PaginatedResponse):
arrival_address=ShipmentAddress(
country="RUS - BRB",
),
arrival_date="2022-05-25",
arrival_date=["2022-05-25"],
arrival_country=[],
departure_date="2022-05",
departure_date=["2022-05"],
departure_country=["USA"],
departure_address=ShipmentAddress(
country="DEU",
Expand Down

0 comments on commit cb4cb4c

Please sign in to comment.