2828
2929import sys
3030
31+ from typing_extensions import deprecated
32+
3133from typesense .types .document import DocumentSchema
3234
3335if sys .version_info >= (3 , 11 ):
3638 import typing_extensions as typing
3739
3840from typesense .aliases import Aliases
39- from typesense .analytics_v1 import AnalyticsV1
4041from typesense .analytics import Analytics
42+ from typesense .analytics_v1 import AnalyticsV1
4143from typesense .api_call import ApiCall
4244from typesense .collection import Collection
4345from typesense .collections import Collections
@@ -108,7 +110,7 @@ def __init__(self, config_dict: ConfigDict) -> None:
108110 self .multi_search = MultiSearch (self .api_call )
109111 self .keys = Keys (self .api_call )
110112 self .aliases = Aliases (self .api_call )
111- self .analyticsV1 = AnalyticsV1 (self .api_call )
113+ self ._analyticsV1 = AnalyticsV1 (self .api_call )
112114 self .analytics = Analytics (self .api_call )
113115 self .stemming = Stemming (self .api_call )
114116 self .curation_sets = CurationSets (self .api_call )
@@ -120,6 +122,14 @@ def __init__(self, config_dict: ConfigDict) -> None:
120122 self .conversations_models = ConversationsModels (self .api_call )
121123 self .nl_search_models = NLSearchModels (self .api_call )
122124
125+ @property
126+ @deprecated (
127+ "AnalyticsV1 is deprecated on v30+. Use client.analytics instead." ,
128+ category = None ,
129+ )
130+ def analyticsV1 (self ) -> AnalyticsV1 :
131+ return self ._analyticsV1
132+
123133 def typed_collection (
124134 self ,
125135 * ,
0 commit comments