2727"""
2828
2929import sys
30+ from inspect import stack
31+
32+ from typing_extensions import deprecated
3033
3134from typesense .types .document import DocumentSchema
3235
3639 import typing_extensions as typing
3740
3841from typesense .aliases import Aliases
39- from typesense .analytics_v1 import AnalyticsV1
4042from typesense .analytics import Analytics
43+ from typesense .analytics_v1 import AnalyticsV1
4144from typesense .api_call import ApiCall
4245from typesense .collection import Collection
4346from typesense .collections import Collections
@@ -108,7 +111,7 @@ def __init__(self, config_dict: ConfigDict) -> None:
108111 self .multi_search = MultiSearch (self .api_call )
109112 self .keys = Keys (self .api_call )
110113 self .aliases = Aliases (self .api_call )
111- self .analyticsV1 = AnalyticsV1 (self .api_call )
114+ self ._analyticsV1 = AnalyticsV1 (self .api_call )
112115 self .analytics = Analytics (self .api_call )
113116 self .stemming = Stemming (self .api_call )
114117 self .curation_sets = CurationSets (self .api_call )
@@ -120,6 +123,14 @@ def __init__(self, config_dict: ConfigDict) -> None:
120123 self .conversations_models = ConversationsModels (self .api_call )
121124 self .nl_search_models = NLSearchModels (self .api_call )
122125
126+ @property
127+ @deprecated (
128+ "AnalyticsV1 is deprecated on v30+. Use client.analytics instead." ,
129+ category = None ,
130+ )
131+ def analyticsV1 (self ) -> AnalyticsV1 :
132+ return self ._analyticsV1
133+
123134 def typed_collection (
124135 self ,
125136 * ,
0 commit comments