Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
configured_endpoints: 149
configured_endpoints: 154
27 changes: 27 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ Types:
```python
from courier.types import (
AutomationInvokeResponse,
AutomationRunListItem,
AutomationRunListResponse,
AutomationRunStep,
AutomationRunStepsResponse,
AutomationTemplate,
AutomationTemplateListResponse,
)
Expand All @@ -193,6 +197,13 @@ Methods:
- <code title="post /automations/invoke">client.automations.invoke.<a href="./src/courier/resources/automations/invoke.py">invoke_ad_hoc</a>(\*\*<a href="src/courier/types/automations/invoke_invoke_ad_hoc_params.py">params</a>) -> <a href="./src/courier/types/automation_invoke_response.py">AutomationInvokeResponse</a></code>
- <code title="post /automations/{templateId}/invoke">client.automations.invoke.<a href="./src/courier/resources/automations/invoke.py">invoke_by_template</a>(template_id, \*\*<a href="src/courier/types/automations/invoke_invoke_by_template_params.py">params</a>) -> <a href="./src/courier/types/automation_invoke_response.py">AutomationInvokeResponse</a></code>

## Runs

Methods:

- <code title="get /automations/runs">client.automations.runs.<a href="./src/courier/resources/automations/runs.py">list</a>(\*\*<a href="src/courier/types/automations/run_list_params.py">params</a>) -> <a href="./src/courier/types/automation_run_list_response.py">AutomationRunListResponse</a></code>
- <code title="get /automations/runs/{id}/steps">client.automations.runs.<a href="./src/courier/resources/automations/runs.py">list_steps</a>(id) -> <a href="./src/courier/types/automation_run_steps_response.py">AutomationRunStepsResponse</a></code>

# Journeys

Types:
Expand All @@ -205,6 +216,7 @@ from courier.types import (
Journey,
JourneyAINode,
JourneyAPIInvokeTriggerNode,
JourneyAudienceTriggerNode,
JourneyConditionAtom,
JourneyConditionGroup,
JourneyConditionNestedGroup,
Expand All @@ -220,6 +232,12 @@ from courier.types import (
JourneyNode,
JourneyPublishRequest,
JourneyResponse,
JourneyRun,
JourneyRunListItem,
JourneyRunListResponse,
JourneyRunResponse,
JourneyRunStep,
JourneyRunStepsResponse,
JourneySegmentTriggerNode,
JourneySendNode,
JourneyState,
Expand All @@ -233,6 +251,7 @@ from courier.types import (
JourneyThrottleStaticNode,
JourneyVersionItem,
JourneyVersionsListResponse,
JourneyWebhookTriggerNode,
JourneysInvokeRequest,
JourneysInvokeResponse,
JourneysListResponse,
Expand Down Expand Up @@ -266,6 +285,14 @@ Methods:
- <code title="put /journeys/{templateId}/templates/{notificationId}">client.journeys.templates.<a href="./src/courier/resources/journeys/templates.py">replace</a>(notification_id, \*, template_id, \*\*<a href="src/courier/types/journeys/template_replace_params.py">params</a>) -> <a href="./src/courier/types/journey_template_get_response.py">JourneyTemplateGetResponse</a></code>
- <code title="get /journeys/{templateId}/templates/{notificationId}/content">client.journeys.templates.<a href="./src/courier/resources/journeys/templates.py">retrieve_content</a>(notification_id, \*, template_id, \*\*<a href="src/courier/types/journeys/template_retrieve_content_params.py">params</a>) -> <a href="./src/courier/types/notification_content_get_response.py">NotificationContentGetResponse</a></code>

## Runs

Methods:

- <code title="get /journeys/runs/{run_id}">client.journeys.runs.<a href="./src/courier/resources/journeys/runs.py">retrieve</a>(run_id) -> <a href="./src/courier/types/journey_run_response.py">JourneyRunResponse</a></code>
- <code title="get /journeys/runs">client.journeys.runs.<a href="./src/courier/resources/journeys/runs.py">list</a>(\*\*<a href="src/courier/types/journeys/run_list_params.py">params</a>) -> <a href="./src/courier/types/journey_run_list_response.py">JourneyRunListResponse</a></code>
- <code title="get /journeys/runs/{run_id}/steps">client.journeys.runs.<a href="./src/courier/resources/journeys/runs.py">list_steps</a>(run_id) -> <a href="./src/courier/types/journey_run_steps_response.py">JourneyRunStepsResponse</a></code>

# Broadcasts

Types:
Expand Down
14 changes: 14 additions & 0 deletions src/courier/resources/automations/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from .runs import (
RunsResource,
AsyncRunsResource,
RunsResourceWithRawResponse,
AsyncRunsResourceWithRawResponse,
RunsResourceWithStreamingResponse,
AsyncRunsResourceWithStreamingResponse,
)
from .invoke import (
InvokeResource,
AsyncInvokeResource,
Expand All @@ -24,6 +32,12 @@
"AsyncInvokeResourceWithRawResponse",
"InvokeResourceWithStreamingResponse",
"AsyncInvokeResourceWithStreamingResponse",
"RunsResource",
"AsyncRunsResource",
"RunsResourceWithRawResponse",
"AsyncRunsResourceWithRawResponse",
"RunsResourceWithStreamingResponse",
"AsyncRunsResourceWithStreamingResponse",
"AutomationsResource",
"AsyncAutomationsResource",
"AutomationsResourceWithRawResponse",
Expand Down
50 changes: 50 additions & 0 deletions src/courier/resources/automations/automations.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@

import httpx

from .runs import (
RunsResource,
AsyncRunsResource,
RunsResourceWithRawResponse,
AsyncRunsResourceWithRawResponse,
RunsResourceWithStreamingResponse,
AsyncRunsResourceWithStreamingResponse,
)
from .invoke import (
InvokeResource,
AsyncInvokeResource,
Expand Down Expand Up @@ -43,6 +51,13 @@ def invoke(self) -> InvokeResource:
"""
return InvokeResource(self._client)

@cached_property
def runs(self) -> RunsResource:
"""
Invoke a stored automation template or an ad hoc automation defined in the request.
"""
return RunsResource(self._client)

@cached_property
def with_raw_response(self) -> AutomationsResourceWithRawResponse:
"""
Expand Down Expand Up @@ -124,6 +139,13 @@ def invoke(self) -> AsyncInvokeResource:
"""
return AsyncInvokeResource(self._client)

@cached_property
def runs(self) -> AsyncRunsResource:
"""
Invoke a stored automation template or an ad hoc automation defined in the request.
"""
return AsyncRunsResource(self._client)

@cached_property
def with_raw_response(self) -> AsyncAutomationsResourceWithRawResponse:
"""
Expand Down Expand Up @@ -208,6 +230,13 @@ def invoke(self) -> InvokeResourceWithRawResponse:
"""
return InvokeResourceWithRawResponse(self._automations.invoke)

@cached_property
def runs(self) -> RunsResourceWithRawResponse:
"""
Invoke a stored automation template or an ad hoc automation defined in the request.
"""
return RunsResourceWithRawResponse(self._automations.runs)


class AsyncAutomationsResourceWithRawResponse:
def __init__(self, automations: AsyncAutomationsResource) -> None:
Expand All @@ -224,6 +253,13 @@ def invoke(self) -> AsyncInvokeResourceWithRawResponse:
"""
return AsyncInvokeResourceWithRawResponse(self._automations.invoke)

@cached_property
def runs(self) -> AsyncRunsResourceWithRawResponse:
"""
Invoke a stored automation template or an ad hoc automation defined in the request.
"""
return AsyncRunsResourceWithRawResponse(self._automations.runs)


class AutomationsResourceWithStreamingResponse:
def __init__(self, automations: AutomationsResource) -> None:
Expand All @@ -240,6 +276,13 @@ def invoke(self) -> InvokeResourceWithStreamingResponse:
"""
return InvokeResourceWithStreamingResponse(self._automations.invoke)

@cached_property
def runs(self) -> RunsResourceWithStreamingResponse:
"""
Invoke a stored automation template or an ad hoc automation defined in the request.
"""
return RunsResourceWithStreamingResponse(self._automations.runs)


class AsyncAutomationsResourceWithStreamingResponse:
def __init__(self, automations: AsyncAutomationsResource) -> None:
Expand All @@ -255,3 +298,10 @@ def invoke(self) -> AsyncInvokeResourceWithStreamingResponse:
Invoke a stored automation template or an ad hoc automation defined in the request.
"""
return AsyncInvokeResourceWithStreamingResponse(self._automations.invoke)

@cached_property
def runs(self) -> AsyncRunsResourceWithStreamingResponse:
"""
Invoke a stored automation template or an ad hoc automation defined in the request.
"""
return AsyncRunsResourceWithStreamingResponse(self._automations.runs)
Loading