shiftaiagenticinfra-sdk-python 0.0.9__tar.gz → 0.0.10__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.10}/PKG-INFO +9 -1
  2. {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.10}/README.md +8 -0
  3. {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.10}/pyproject.toml +1 -1
  4. {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.10}/shiftai/api/analytics_api.py +45 -0
  5. {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.10}/shiftai/models/__init__.py +28 -0
  6. {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.10}/shiftaiagenticinfra_sdk_python.egg-info/PKG-INFO +9 -1
  7. {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.10}/setup.cfg +0 -0
  8. {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.10}/setup.py +0 -0
  9. {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.10}/shiftai/__init__.py +0 -0
  10. {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.10}/shiftai/api/__init__.py +0 -0
  11. {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.10}/shiftai/api/agents_api.py +0 -0
  12. {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.10}/shiftai/api/conversations_api.py +0 -0
  13. {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.10}/shiftai/api/internal/__init__.py +0 -0
  14. {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.10}/shiftai/api/internal/trulens_api.py +0 -0
  15. {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.10}/shiftai/api/messages_api.py +0 -0
  16. {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.10}/shiftai/api/platform_api.py +0 -0
  17. {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.10}/shiftai/api/platform_session_api.py +0 -0
  18. {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.10}/shiftai/api/users_api.py +0 -0
  19. {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.10}/shiftai/client.py +0 -0
  20. {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.10}/shiftai/http/__init__.py +0 -0
  21. {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.10}/shiftai/http/exceptions.py +0 -0
  22. {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.10}/shiftai/http/http_client.py +0 -0
  23. {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.10}/shiftaiagenticinfra_sdk_python.egg-info/SOURCES.txt +0 -0
  24. {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.10}/shiftaiagenticinfra_sdk_python.egg-info/dependency_links.txt +0 -0
  25. {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.10}/shiftaiagenticinfra_sdk_python.egg-info/requires.txt +0 -0
  26. {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.10}/shiftaiagenticinfra_sdk_python.egg-info/top_level.txt +0 -0
  27. {shiftaiagenticinfra_sdk_python-0.0.9 → shiftaiagenticinfra_sdk_python-0.0.10}/tests/test_integration.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: shiftaiagenticinfra-sdk-python
3
- Version: 0.0.9
3
+ Version: 0.0.10
4
4
  Summary: Shiftai Agentic Infra Python SDK
5
5
  Author: ShiftAI
6
6
  Author-email: ShiftAI <s.tadakamalla@theshiftai.in>
@@ -388,6 +388,14 @@ Get all feedback submissions for a specific BOT message (most recent first).
388
388
 
389
389
  **Return Type:** `List[FeedbackDTO]`
390
390
 
391
+ #### `await analytics.get_latest_feedbacks(timeperiod=None)`
392
+ Get latest feedback submissions for the project, most recent first.
393
+
394
+ **Parameters:**
395
+ - `timeperiod` (int, **optional**): None or omitted = all feedbacks; N (e.g. 24) = only feedbacks from the last N hours
396
+
397
+ **Return Type:** `LatestFeedbacksResponse` (`.feedbacks` list of `LatestFeedbackItemResponse`; optional `.message` when time window is used and there are no feedbacks)
398
+
391
399
  #### `await analytics.get_dashboard()`
392
400
  Get project dashboard metrics (includes cache analytics: `cacheServed`, `estimatedTokensSaved`, `estimatedCostSaved` when available).
393
401
 
@@ -359,6 +359,14 @@ Get all feedback submissions for a specific BOT message (most recent first).
359
359
 
360
360
  **Return Type:** `List[FeedbackDTO]`
361
361
 
362
+ #### `await analytics.get_latest_feedbacks(timeperiod=None)`
363
+ Get latest feedback submissions for the project, most recent first.
364
+
365
+ **Parameters:**
366
+ - `timeperiod` (int, **optional**): None or omitted = all feedbacks; N (e.g. 24) = only feedbacks from the last N hours
367
+
368
+ **Return Type:** `LatestFeedbacksResponse` (`.feedbacks` list of `LatestFeedbackItemResponse`; optional `.message` when time window is used and there are no feedbacks)
369
+
362
370
  #### `await analytics.get_dashboard()`
363
371
  Get project dashboard metrics (includes cache analytics: `cacheServed`, `estimatedTokensSaved`, `estimatedCostSaved` when available).
364
372
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "shiftaiagenticinfra-sdk-python"
7
- version = "0.0.9"
7
+ version = "0.0.10"
8
8
  description = "Shiftai Agentic Infra Python SDK"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -10,6 +10,9 @@ from ..models import (
10
10
  FeedbackSubmissionRequest,
11
11
  FeedbackSubmissionResponse,
12
12
  FeedbackDTO,
13
+ LatestFeedbacksRequest,
14
+ LatestFeedbackItemResponse,
15
+ LatestFeedbacksResponse,
13
16
  DashboardMetricsDTO,
14
17
  TopAgentDTO,
15
18
  TopUserDTO,
@@ -103,6 +106,48 @@ class AnalyticsApi:
103
106
  FeedbackDTO,
104
107
  )
105
108
 
109
+ async def get_latest_feedbacks(
110
+ self,
111
+ timeperiod: Optional[int] = None,
112
+ ) -> LatestFeedbacksResponse:
113
+ """
114
+ Get latest feedback submissions for the project, most recent first.
115
+
116
+ POST /api/platform/feedbacks/latest
117
+
118
+ Args:
119
+ timeperiod: Optional. None or omitted = all feedbacks.
120
+ N (e.g. 24) = only feedbacks from the last N hours.
121
+
122
+ Returns:
123
+ LatestFeedbacksResponse with .feedbacks (list) and optional .message
124
+ (e.g. when timeperiod is set and there are no feedbacks in that window).
125
+ """
126
+ self._http_client.ensure_authenticated()
127
+
128
+ body: Dict[str, Any] = {} if timeperiod is None else {"timeperiod": timeperiod}
129
+ data = await self._http_client.post_map("/api/platform/feedbacks/latest", body)
130
+
131
+ if isinstance(data, list):
132
+ items = [
133
+ LatestFeedbackItemResponse(
134
+ **self._http_client._filter_known_fields(item, LatestFeedbackItemResponse)
135
+ )
136
+ for item in data
137
+ ]
138
+ return LatestFeedbacksResponse(feedbacks=items)
139
+ if isinstance(data, dict):
140
+ msg = data.get("message")
141
+ raw_list = data.get("feedbacks", [])
142
+ items = [
143
+ LatestFeedbackItemResponse(
144
+ **self._http_client._filter_known_fields(item, LatestFeedbackItemResponse)
145
+ )
146
+ for item in raw_list
147
+ ]
148
+ return LatestFeedbacksResponse(message=msg, feedbacks=items)
149
+ return LatestFeedbacksResponse(feedbacks=[])
150
+
106
151
  async def get_dashboard(self) -> DashboardMetricsDTO:
107
152
  """
108
153
  Get dashboard metrics.
@@ -182,6 +182,34 @@ class FeedbackDTO:
182
182
  submittedAt: Optional[str] = None # ISO 8601 datetime string
183
183
 
184
184
 
185
+ @dataclass
186
+ class LatestFeedbacksRequest:
187
+ """Request for latest feedbacks; optional time window in hours."""
188
+ timeperiod: Optional[int] = None # None or omitted = all; N = last N hours
189
+
190
+
191
+ @dataclass
192
+ class LatestFeedbackItemResponse:
193
+ """Single item in the latest-feedbacks list (POST /api/platform/feedbacks/latest)."""
194
+ messageId: Optional[UUID] = None
195
+ username: Optional[str] = None
196
+ agentName: Optional[str] = None
197
+ conversationId: Optional[UUID] = None
198
+ sender: Optional[str] = None
199
+ message: Optional[str] = None # Human query the bot was replying to
200
+ feedbackTitle: Optional[str] = None
201
+ feedback: Optional[str] = None
202
+ context: Optional[str] = None
203
+ time: Optional[str] = None # ISO-8601 when feedback was submitted
204
+
205
+
206
+ @dataclass
207
+ class LatestFeedbacksResponse:
208
+ """Response from latest feedbacks: list of items and optional message (e.g. empty timeline)."""
209
+ message: Optional[str] = None # Set when timeperiod used and no feedbacks in window
210
+ feedbacks: List[LatestFeedbackItemResponse] = field(default_factory=list)
211
+
212
+
185
213
  @dataclass
186
214
  class DeleteMessageRequest:
187
215
  """Request for soft-deleting a message turn (bot message and its paired human)."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: shiftaiagenticinfra-sdk-python
3
- Version: 0.0.9
3
+ Version: 0.0.10
4
4
  Summary: Shiftai Agentic Infra Python SDK
5
5
  Author: ShiftAI
6
6
  Author-email: ShiftAI <s.tadakamalla@theshiftai.in>
@@ -388,6 +388,14 @@ Get all feedback submissions for a specific BOT message (most recent first).
388
388
 
389
389
  **Return Type:** `List[FeedbackDTO]`
390
390
 
391
+ #### `await analytics.get_latest_feedbacks(timeperiod=None)`
392
+ Get latest feedback submissions for the project, most recent first.
393
+
394
+ **Parameters:**
395
+ - `timeperiod` (int, **optional**): None or omitted = all feedbacks; N (e.g. 24) = only feedbacks from the last N hours
396
+
397
+ **Return Type:** `LatestFeedbacksResponse` (`.feedbacks` list of `LatestFeedbackItemResponse`; optional `.message` when time window is used and there are no feedbacks)
398
+
391
399
  #### `await analytics.get_dashboard()`
392
400
  Get project dashboard metrics (includes cache analytics: `cacheServed`, `estimatedTokensSaved`, `estimatedCostSaved` when available).
393
401