Skip to content

Commit 16e4143

Browse files
mikemillacodegen
andauthored
feat(api): add POST /feedback for agent and tool feedback [C-22903] (#228)
Co-authored-by: courier-codegen <codegen@users.noreply.github.com>
1 parent 04394ec commit 16e4143

9 files changed

Lines changed: 570 additions & 1 deletion

File tree

‎.stats.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
configured_endpoints: 168
1+
configured_endpoints: 169

‎api.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,18 @@ Methods:
437437
- <code title="get /digests/schedules/{schedule_id}/instances">client.digests.schedules.<a href="./src/courier/resources/digests/schedules.py">list_instances</a>(schedule_id, \*\*<a href="src/courier/types/digests/schedule_list_instances_params.py">params</a>) -> <a href="./src/courier/types/digest_instance_list_response.py">DigestInstanceListResponse</a></code>
438438
- <code title="post /digests/schedules/{schedule_id}/trigger">client.digests.schedules.<a href="./src/courier/resources/digests/schedules.py">release</a>(schedule_id) -> None</code>
439439

440+
# Feedback
441+
442+
Types:
443+
444+
```python
445+
from courier.types import FeedbackCreateResponse
446+
```
447+
448+
Methods:
449+
450+
- <code title="post /feedback">client.feedback.<a href="./src/courier/resources/feedback.py">create</a>(\*\*<a href="src/courier/types/feedback_create_params.py">params</a>) -> <a href="./src/courier/types/feedback_create_response.py">FeedbackCreateResponse</a></code>
451+
440452
# Inbound
441453

442454
Types:

‎src/courier/_client.py‎

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
digests,
4646
inbound,
4747
tenants,
48+
feedback,
4849
journeys,
4950
messages,
5051
previews,
@@ -65,6 +66,7 @@
6566
from .resources.send import SendResource, AsyncSendResource
6667
from .resources.brands import BrandsResource, AsyncBrandsResource
6768
from .resources.inbound import InboundResource, AsyncInboundResource
69+
from .resources.feedback import FeedbackResource, AsyncFeedbackResource
6870
from .resources.messages import MessagesResource, AsyncMessagesResource
6971
from .resources.previews import PreviewsResource, AsyncPreviewsResource
7072
from .resources.requests import RequestsResource, AsyncRequestsResource
@@ -254,6 +256,15 @@ def digests(self) -> DigestsResource:
254256

255257
return digests.DigestsResource(self)
256258

259+
@cached_property
260+
def feedback(self) -> FeedbackResource:
261+
"""
262+
Report suspected bugs, confusing behavior and missing features in Courier, from an AI agent, a developer tool or by hand.
263+
"""
264+
from .resources import feedback
265+
266+
return feedback.FeedbackResource(self)
267+
257268
@cached_property
258269
def inbound(self) -> InboundResource:
259270
"""
@@ -627,6 +638,15 @@ def digests(self) -> AsyncDigestsResource:
627638

628639
return digests.AsyncDigestsResource(self)
629640

641+
@cached_property
642+
def feedback(self) -> AsyncFeedbackResource:
643+
"""
644+
Report suspected bugs, confusing behavior and missing features in Courier, from an AI agent, a developer tool or by hand.
645+
"""
646+
from .resources import feedback
647+
648+
return feedback.AsyncFeedbackResource(self)
649+
630650
@cached_property
631651
def inbound(self) -> AsyncInboundResource:
632652
"""
@@ -942,6 +962,15 @@ def digests(self) -> digests.DigestsResourceWithRawResponse:
942962

943963
return digests.DigestsResourceWithRawResponse(self._client.digests)
944964

965+
@cached_property
966+
def feedback(self) -> feedback.FeedbackResourceWithRawResponse:
967+
"""
968+
Report suspected bugs, confusing behavior and missing features in Courier, from an AI agent, a developer tool or by hand.
969+
"""
970+
from .resources import feedback
971+
972+
return feedback.FeedbackResourceWithRawResponse(self._client.feedback)
973+
945974
@cached_property
946975
def inbound(self) -> inbound.InboundResourceWithRawResponse:
947976
"""
@@ -1145,6 +1174,15 @@ def digests(self) -> digests.AsyncDigestsResourceWithRawResponse:
11451174

11461175
return digests.AsyncDigestsResourceWithRawResponse(self._client.digests)
11471176

1177+
@cached_property
1178+
def feedback(self) -> feedback.AsyncFeedbackResourceWithRawResponse:
1179+
"""
1180+
Report suspected bugs, confusing behavior and missing features in Courier, from an AI agent, a developer tool or by hand.
1181+
"""
1182+
from .resources import feedback
1183+
1184+
return feedback.AsyncFeedbackResourceWithRawResponse(self._client.feedback)
1185+
11481186
@cached_property
11491187
def inbound(self) -> inbound.AsyncInboundResourceWithRawResponse:
11501188
"""
@@ -1350,6 +1388,15 @@ def digests(self) -> digests.DigestsResourceWithStreamingResponse:
13501388

13511389
return digests.DigestsResourceWithStreamingResponse(self._client.digests)
13521390

1391+
@cached_property
1392+
def feedback(self) -> feedback.FeedbackResourceWithStreamingResponse:
1393+
"""
1394+
Report suspected bugs, confusing behavior and missing features in Courier, from an AI agent, a developer tool or by hand.
1395+
"""
1396+
from .resources import feedback
1397+
1398+
return feedback.FeedbackResourceWithStreamingResponse(self._client.feedback)
1399+
13531400
@cached_property
13541401
def inbound(self) -> inbound.InboundResourceWithStreamingResponse:
13551402
"""
@@ -1555,6 +1602,15 @@ def digests(self) -> digests.AsyncDigestsResourceWithStreamingResponse:
15551602

15561603
return digests.AsyncDigestsResourceWithStreamingResponse(self._client.digests)
15571604

1605+
@cached_property
1606+
def feedback(self) -> feedback.AsyncFeedbackResourceWithStreamingResponse:
1607+
"""
1608+
Report suspected bugs, confusing behavior and missing features in Courier, from an AI agent, a developer tool or by hand.
1609+
"""
1610+
from .resources import feedback
1611+
1612+
return feedback.AsyncFeedbackResourceWithStreamingResponse(self._client.feedback)
1613+
15581614
@cached_property
15591615
def inbound(self) -> inbound.AsyncInboundResourceWithStreamingResponse:
15601616
"""

‎src/courier/resources/__init__.py‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,14 @@
7272
TenantsResourceWithStreamingResponse,
7373
AsyncTenantsResourceWithStreamingResponse,
7474
)
75+
from .feedback import (
76+
FeedbackResource,
77+
AsyncFeedbackResource,
78+
FeedbackResourceWithRawResponse,
79+
AsyncFeedbackResourceWithRawResponse,
80+
FeedbackResourceWithStreamingResponse,
81+
AsyncFeedbackResourceWithStreamingResponse,
82+
)
7583
from .journeys import (
7684
JourneysResource,
7785
AsyncJourneysResource,
@@ -258,6 +266,12 @@
258266
"AsyncDigestsResourceWithRawResponse",
259267
"DigestsResourceWithStreamingResponse",
260268
"AsyncDigestsResourceWithStreamingResponse",
269+
"FeedbackResource",
270+
"AsyncFeedbackResource",
271+
"FeedbackResourceWithRawResponse",
272+
"AsyncFeedbackResourceWithRawResponse",
273+
"FeedbackResourceWithStreamingResponse",
274+
"AsyncFeedbackResourceWithStreamingResponse",
261275
"InboundResource",
262276
"AsyncInboundResource",
263277
"InboundResourceWithRawResponse",

0 commit comments

Comments
 (0)