Skip to content

Commit 9ccf0a7

Browse files
committed
feat: regenerate SDK with join and aggregation types
Includes new types for: - Table joins (JoinCondition, JoinOperator, JoinResult, JoinStrategy, JoinType) - Aggregations (AggregationType, AggregationResult, etc.) - Table statistics and dynamic templates
1 parent 3680023 commit 9ccf0a7

33 files changed

Lines changed: 1516 additions & 487 deletions

‎src/antfly/client_generated/models/__init__.py‎

Lines changed: 48 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
"""Contains all the data models used in inputs/outputs"""
22

3+
from .aggregation_bucket import AggregationBucket
4+
from .aggregation_bucket_sub_aggregations import AggregationBucketSubAggregations
5+
from .aggregation_date_range import AggregationDateRange
6+
from .aggregation_range import AggregationRange
7+
from .aggregation_result import AggregationResult
8+
from .aggregation_type import AggregationType
39
from .analyses import Analyses
410
from .analyses_result import AnalysesResult
511
from .answer_agent_result import AnswerAgentResult
@@ -29,6 +35,7 @@
2935
from .boolean_query import BooleanQuery
3036
from .brave_search_config import BraveSearchConfig
3137
from .brave_search_config_freshness import BraveSearchConfigFreshness
38+
from .calendar_interval import CalendarInterval
3239
from .chain_condition import ChainCondition
3340
from .chain_link import ChainLink
3441
from .chat_agent_result import ChatAgentResult
@@ -67,14 +74,16 @@
6774
from .create_table_request_indexes import CreateTableRequestIndexes
6875
from .create_user_request import CreateUserRequest
6976
from .credentials import Credentials
70-
from .date_range import DateRange
71-
from .date_range_result import DateRangeResult
7277
from .date_range_string_query import DateRangeStringQuery
7378
from .disjunction_query import DisjunctionQuery
79+
from .distance_range import DistanceRange
80+
from .distance_unit import DistanceUnit
7481
from .doc_id_query import DocIdQuery
7582
from .document_schema import DocumentSchema
7683
from .document_schema_schema import DocumentSchemaSchema
7784
from .duck_duck_go_search_config import DuckDuckGoSearchConfig
85+
from .dynamic_template import DynamicTemplate
86+
from .dynamic_template_match_mapping_type import DynamicTemplateMatchMappingType
7887
from .edge import Edge
7988
from .edge_direction import EdgeDirection
8089
from .edge_metadata import EdgeMetadata
@@ -97,11 +106,10 @@
97106
from .evaluator_name import EvaluatorName
98107
from .evaluator_score import EvaluatorScore
99108
from .evaluator_score_metadata import EvaluatorScoreMetadata
100-
from .facet_option import FacetOption
101-
from .facet_result import FacetResult
102109
from .failed_operation import FailedOperation
103110
from .failed_operation_operation import FailedOperationOperation
104111
from .fetch_config import FetchConfig
112+
from .field_statistics import FieldStatistics
105113
from .filter_spec import FilterSpec
106114
from .filter_spec_operator import FilterSpecOperator
107115
from .followup_step_config import FollowupStepConfig
@@ -136,6 +144,11 @@
136144
from .index_status_shard_status import IndexStatusShardStatus
137145
from .index_type import IndexType
138146
from .ip_range_query import IPRangeQuery
147+
from .join_condition import JoinCondition
148+
from .join_operator import JoinOperator
149+
from .join_result import JoinResult
150+
from .join_strategy import JoinStrategy
151+
from .join_type import JoinType
139152
from .key_range import KeyRange
140153
from .linear_merge_page_status import LinearMergePageStatus
141154
from .linear_merge_request import LinearMergeRequest
@@ -154,9 +167,7 @@
154167
from .multi_phrase_query import MultiPhraseQuery
155168
from .node_filter import NodeFilter
156169
from .node_filter_filter_query import NodeFilterFilterQuery
157-
from .numeric_range import NumericRange
158170
from .numeric_range_query import NumericRangeQuery
159-
from .numeric_range_result import NumericRangeResult
160171
from .ollama_embedder_config import OllamaEmbedderConfig
161172
from .ollama_generator_config import OllamaGeneratorConfig
162173
from .ollama_reranker_config import OllamaRerankerConfig
@@ -189,8 +200,8 @@
189200
from .query_hits import QueryHits
190201
from .query_responses import QueryResponses
191202
from .query_result import QueryResult
203+
from .query_result_aggregations import QueryResultAggregations
192204
from .query_result_analyses import QueryResultAnalyses
193-
from .query_result_facets import QueryResultFacets
194205
from .query_result_graph_results import QueryResultGraphResults
195206
from .query_strategy import QueryStrategy
196207
from .query_string_query import QueryStringQuery
@@ -202,13 +213,15 @@
202213
from .restore_table_response_202 import RestoreTableResponse202
203214
from .retry_config import RetryConfig
204215
from .route_type import RouteType
216+
from .schemas_antfly_type import SchemasAntflyType
205217
from .schemas_chat_agent_result import SchemasChatAgentResult
206218
from .schemas_chat_agent_result_query_results_item import SchemasChatAgentResultQueryResultsItem
207219
from .semantic_query_mode import SemanticQueryMode
208220
from .serper_search_config import SerperSearchConfig
209221
from .serper_search_config_search_type import SerperSearchConfigSearchType
210222
from .serper_search_config_time_period import SerperSearchConfigTimePeriod
211223
from .shard_config import ShardConfig
224+
from .significance_algorithm import SignificanceAlgorithm
212225
from .storage_status import StorageStatus
213226
from .success_message import SuccessMessage
214227
from .sync_level import SyncLevel
@@ -221,15 +234,18 @@
221234
from .table_schema import TableSchema
222235
from .table_schema_document_schemas import TableSchemaDocumentSchemas
223236
from .table_shards import TableShards
237+
from .table_statistics import TableStatistics
238+
from .table_statistics_field_stats import TableStatisticsFieldStats
224239
from .table_status import TableStatus
225240
from .tavily_search_config import TavilySearchConfig
226241
from .tavily_search_config_search_depth import TavilySearchConfigSearchDepth
227-
from .term_facet_result import TermFacetResult
242+
from .template_field_mapping import TemplateFieldMapping
228243
from .term_query import TermQuery
229244
from .term_range_query import TermRangeQuery
230245
from .termite_chunker_config import TermiteChunkerConfig
231246
from .termite_chunker_config_full_text import TermiteChunkerConfigFullText
232247
from .termite_embedder_config import TermiteEmbedderConfig
248+
from .termite_generator_config import TermiteGeneratorConfig
233249
from .termite_reranker_config import TermiteRerankerConfig
234250
from .transform import Transform
235251
from .transform_op import TransformOp
@@ -248,6 +264,12 @@
248264
from .wildcard_query import WildcardQuery
249265

250266
__all__ = (
267+
"AggregationBucket",
268+
"AggregationBucketSubAggregations",
269+
"AggregationDateRange",
270+
"AggregationRange",
271+
"AggregationResult",
272+
"AggregationType",
251273
"Analyses",
252274
"AnalysesResult",
253275
"AnswerAgentResult",
@@ -277,6 +299,7 @@
277299
"BoolFieldQuery",
278300
"BraveSearchConfig",
279301
"BraveSearchConfigFreshness",
302+
"CalendarInterval",
280303
"ChainCondition",
281304
"ChainLink",
282305
"ChatAgentResult",
@@ -315,14 +338,16 @@
315338
"CreateTableRequestIndexes",
316339
"CreateUserRequest",
317340
"Credentials",
318-
"DateRange",
319-
"DateRangeResult",
320341
"DateRangeStringQuery",
321342
"DisjunctionQuery",
343+
"DistanceRange",
344+
"DistanceUnit",
322345
"DocIdQuery",
323346
"DocumentSchema",
324347
"DocumentSchemaSchema",
325348
"DuckDuckGoSearchConfig",
349+
"DynamicTemplate",
350+
"DynamicTemplateMatchMappingType",
326351
"Edge",
327352
"EdgeDirection",
328353
"EdgeMetadata",
@@ -345,11 +370,10 @@
345370
"EvaluatorName",
346371
"EvaluatorScore",
347372
"EvaluatorScoreMetadata",
348-
"FacetOption",
349-
"FacetResult",
350373
"FailedOperation",
351374
"FailedOperationOperation",
352375
"FetchConfig",
376+
"FieldStatistics",
353377
"FilterSpec",
354378
"FilterSpecOperator",
355379
"FollowupStepConfig",
@@ -384,6 +408,11 @@
384408
"IndexStatusShardStatus",
385409
"IndexType",
386410
"IPRangeQuery",
411+
"JoinCondition",
412+
"JoinOperator",
413+
"JoinResult",
414+
"JoinStrategy",
415+
"JoinType",
387416
"KeyRange",
388417
"LinearMergePageStatus",
389418
"LinearMergeRequest",
@@ -402,9 +431,7 @@
402431
"MultiPhraseQuery",
403432
"NodeFilter",
404433
"NodeFilterFilterQuery",
405-
"NumericRange",
406434
"NumericRangeQuery",
407-
"NumericRangeResult",
408435
"OllamaEmbedderConfig",
409436
"OllamaGeneratorConfig",
410437
"OllamaRerankerConfig",
@@ -437,8 +464,8 @@
437464
"QueryHitSource",
438465
"QueryResponses",
439466
"QueryResult",
467+
"QueryResultAggregations",
440468
"QueryResultAnalyses",
441-
"QueryResultFacets",
442469
"QueryResultGraphResults",
443470
"QueryStrategy",
444471
"QueryStringQuery",
@@ -450,13 +477,15 @@
450477
"RestoreTableResponse202",
451478
"RetryConfig",
452479
"RouteType",
480+
"SchemasAntflyType",
453481
"SchemasChatAgentResult",
454482
"SchemasChatAgentResultQueryResultsItem",
455483
"SemanticQueryMode",
456484
"SerperSearchConfig",
457485
"SerperSearchConfigSearchType",
458486
"SerperSearchConfigTimePeriod",
459487
"ShardConfig",
488+
"SignificanceAlgorithm",
460489
"StorageStatus",
461490
"SuccessMessage",
462491
"SyncLevel",
@@ -469,13 +498,16 @@
469498
"TableSchema",
470499
"TableSchemaDocumentSchemas",
471500
"TableShards",
501+
"TableStatistics",
502+
"TableStatisticsFieldStats",
472503
"TableStatus",
473504
"TavilySearchConfig",
474505
"TavilySearchConfigSearchDepth",
475-
"TermFacetResult",
506+
"TemplateFieldMapping",
476507
"TermiteChunkerConfig",
477508
"TermiteChunkerConfigFullText",
478509
"TermiteEmbedderConfig",
510+
"TermiteGeneratorConfig",
479511
"TermiteRerankerConfig",
480512
"TermQuery",
481513
"TermRangeQuery",
Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
from collections.abc import Mapping
2+
from typing import TYPE_CHECKING, Any, TypeVar, Union
3+
4+
from attrs import define as _attrs_define
5+
from attrs import field as _attrs_field
6+
7+
from ..types import UNSET, Unset
8+
9+
if TYPE_CHECKING:
10+
from ..models.aggregation_bucket_sub_aggregations import AggregationBucketSubAggregations
11+
12+
13+
T = TypeVar("T", bound="AggregationBucket")
14+
15+
16+
@_attrs_define
17+
class AggregationBucket:
18+
"""
19+
Attributes:
20+
key (str): Bucket key (term, range name, date, etc.)
21+
doc_count (int): Number of documents in this bucket
22+
key_as_string (Union[Unset, str]): Formatted key for display (e.g., formatted dates)
23+
from_ (Union[Unset, float]): Lower bound for range buckets
24+
to (Union[Unset, float]): Upper bound for range buckets
25+
from_as_string (Union[Unset, str]): Formatted lower bound
26+
to_as_string (Union[Unset, str]): Formatted upper bound
27+
score (Union[Unset, float]): Significance score (for significant_terms)
28+
bg_count (Union[Unset, int]): Background count (for significant_terms)
29+
sub_aggregations (Union[Unset, AggregationBucketSubAggregations]): Results of nested sub-aggregations
30+
"""
31+
32+
key: str
33+
doc_count: int
34+
key_as_string: Union[Unset, str] = UNSET
35+
from_: Union[Unset, float] = UNSET
36+
to: Union[Unset, float] = UNSET
37+
from_as_string: Union[Unset, str] = UNSET
38+
to_as_string: Union[Unset, str] = UNSET
39+
score: Union[Unset, float] = UNSET
40+
bg_count: Union[Unset, int] = UNSET
41+
sub_aggregations: Union[Unset, "AggregationBucketSubAggregations"] = UNSET
42+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
43+
44+
def to_dict(self) -> dict[str, Any]:
45+
key = self.key
46+
47+
doc_count = self.doc_count
48+
49+
key_as_string = self.key_as_string
50+
51+
from_ = self.from_
52+
53+
to = self.to
54+
55+
from_as_string = self.from_as_string
56+
57+
to_as_string = self.to_as_string
58+
59+
score = self.score
60+
61+
bg_count = self.bg_count
62+
63+
sub_aggregations: Union[Unset, dict[str, Any]] = UNSET
64+
if not isinstance(self.sub_aggregations, Unset):
65+
sub_aggregations = self.sub_aggregations.to_dict()
66+
67+
field_dict: dict[str, Any] = {}
68+
field_dict.update(self.additional_properties)
69+
field_dict.update(
70+
{
71+
"key": key,
72+
"doc_count": doc_count,
73+
}
74+
)
75+
if key_as_string is not UNSET:
76+
field_dict["key_as_string"] = key_as_string
77+
if from_ is not UNSET:
78+
field_dict["from"] = from_
79+
if to is not UNSET:
80+
field_dict["to"] = to
81+
if from_as_string is not UNSET:
82+
field_dict["from_as_string"] = from_as_string
83+
if to_as_string is not UNSET:
84+
field_dict["to_as_string"] = to_as_string
85+
if score is not UNSET:
86+
field_dict["score"] = score
87+
if bg_count is not UNSET:
88+
field_dict["bg_count"] = bg_count
89+
if sub_aggregations is not UNSET:
90+
field_dict["sub_aggregations"] = sub_aggregations
91+
92+
return field_dict
93+
94+
@classmethod
95+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
96+
from ..models.aggregation_bucket_sub_aggregations import AggregationBucketSubAggregations
97+
98+
d = dict(src_dict)
99+
key = d.pop("key")
100+
101+
doc_count = d.pop("doc_count")
102+
103+
key_as_string = d.pop("key_as_string", UNSET)
104+
105+
from_ = d.pop("from", UNSET)
106+
107+
to = d.pop("to", UNSET)
108+
109+
from_as_string = d.pop("from_as_string", UNSET)
110+
111+
to_as_string = d.pop("to_as_string", UNSET)
112+
113+
score = d.pop("score", UNSET)
114+
115+
bg_count = d.pop("bg_count", UNSET)
116+
117+
_sub_aggregations = d.pop("sub_aggregations", UNSET)
118+
sub_aggregations: Union[Unset, AggregationBucketSubAggregations]
119+
if isinstance(_sub_aggregations, Unset):
120+
sub_aggregations = UNSET
121+
else:
122+
sub_aggregations = AggregationBucketSubAggregations.from_dict(_sub_aggregations)
123+
124+
aggregation_bucket = cls(
125+
key=key,
126+
doc_count=doc_count,
127+
key_as_string=key_as_string,
128+
from_=from_,
129+
to=to,
130+
from_as_string=from_as_string,
131+
to_as_string=to_as_string,
132+
score=score,
133+
bg_count=bg_count,
134+
sub_aggregations=sub_aggregations,
135+
)
136+
137+
aggregation_bucket.additional_properties = d
138+
return aggregation_bucket
139+
140+
@property
141+
def additional_keys(self) -> list[str]:
142+
return list(self.additional_properties.keys())
143+
144+
def __getitem__(self, key: str) -> Any:
145+
return self.additional_properties[key]
146+
147+
def __setitem__(self, key: str, value: Any) -> None:
148+
self.additional_properties[key] = value
149+
150+
def __delitem__(self, key: str) -> None:
151+
del self.additional_properties[key]
152+
153+
def __contains__(self, key: str) -> bool:
154+
return key in self.additional_properties

0 commit comments

Comments
 (0)