1010 routing_strategy_list_params ,
1111 routing_strategy_create_params ,
1212 routing_strategy_replace_params ,
13+ routing_strategy_list_notifications_params ,
1314)
1415from .._types import Body , Omit , Query , Headers , NoneType , NotGiven , SequenceNotStr , omit , not_given
1516from .._utils import path_template , maybe_transform , async_maybe_transform
2829from ..types .shared_params .message_channels import MessageChannels
2930from ..types .shared_params .message_providers import MessageProviders
3031from ..types .routing_strategy_mutation_response import RoutingStrategyMutationResponse
32+ from ..types .associated_notification_list_response import AssociatedNotificationListResponse
3133
3234__all__ = ["RoutingStrategiesResource" , "AsyncRoutingStrategiesResource" ]
3335
@@ -233,6 +235,57 @@ def archive(
233235 cast_to = NoneType ,
234236 )
235237
238+ def list_notifications (
239+ self ,
240+ id : str ,
241+ * ,
242+ cursor : Optional [str ] | Omit = omit ,
243+ limit : int | Omit = omit ,
244+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
245+ # The extra values given here take precedence over values defined on the client or passed to this method.
246+ extra_headers : Headers | None = None ,
247+ extra_query : Query | None = None ,
248+ extra_body : Body | None = None ,
249+ timeout : float | httpx .Timeout | None | NotGiven = not_given ,
250+ ) -> AssociatedNotificationListResponse :
251+ """List notification templates associated with a routing strategy.
252+
253+ Includes
254+ template metadata only, not full content.
255+
256+ Args:
257+ cursor: Opaque pagination cursor from a previous response. Omit for the first page.
258+
259+ limit: Maximum number of results per page. Default 20, max 100.
260+
261+ extra_headers: Send extra headers
262+
263+ extra_query: Add additional query parameters to the request
264+
265+ extra_body: Add additional JSON properties to the request
266+
267+ timeout: Override the client-level default timeout for this request, in seconds
268+ """
269+ if not id :
270+ raise ValueError (f"Expected a non-empty value for `id` but received { id !r} " )
271+ return self ._get (
272+ path_template ("/routing-strategies/{id}/notifications" , id = id ),
273+ options = make_request_options (
274+ extra_headers = extra_headers ,
275+ extra_query = extra_query ,
276+ extra_body = extra_body ,
277+ timeout = timeout ,
278+ query = maybe_transform (
279+ {
280+ "cursor" : cursor ,
281+ "limit" : limit ,
282+ },
283+ routing_strategy_list_notifications_params .RoutingStrategyListNotificationsParams ,
284+ ),
285+ ),
286+ cast_to = AssociatedNotificationListResponse ,
287+ )
288+
236289 def replace (
237290 self ,
238291 id : str ,
@@ -499,6 +552,57 @@ async def archive(
499552 cast_to = NoneType ,
500553 )
501554
555+ async def list_notifications (
556+ self ,
557+ id : str ,
558+ * ,
559+ cursor : Optional [str ] | Omit = omit ,
560+ limit : int | Omit = omit ,
561+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
562+ # The extra values given here take precedence over values defined on the client or passed to this method.
563+ extra_headers : Headers | None = None ,
564+ extra_query : Query | None = None ,
565+ extra_body : Body | None = None ,
566+ timeout : float | httpx .Timeout | None | NotGiven = not_given ,
567+ ) -> AssociatedNotificationListResponse :
568+ """List notification templates associated with a routing strategy.
569+
570+ Includes
571+ template metadata only, not full content.
572+
573+ Args:
574+ cursor: Opaque pagination cursor from a previous response. Omit for the first page.
575+
576+ limit: Maximum number of results per page. Default 20, max 100.
577+
578+ extra_headers: Send extra headers
579+
580+ extra_query: Add additional query parameters to the request
581+
582+ extra_body: Add additional JSON properties to the request
583+
584+ timeout: Override the client-level default timeout for this request, in seconds
585+ """
586+ if not id :
587+ raise ValueError (f"Expected a non-empty value for `id` but received { id !r} " )
588+ return await self ._get (
589+ path_template ("/routing-strategies/{id}/notifications" , id = id ),
590+ options = make_request_options (
591+ extra_headers = extra_headers ,
592+ extra_query = extra_query ,
593+ extra_body = extra_body ,
594+ timeout = timeout ,
595+ query = await async_maybe_transform (
596+ {
597+ "cursor" : cursor ,
598+ "limit" : limit ,
599+ },
600+ routing_strategy_list_notifications_params .RoutingStrategyListNotificationsParams ,
601+ ),
602+ ),
603+ cast_to = AssociatedNotificationListResponse ,
604+ )
605+
502606 async def replace (
503607 self ,
504608 id : str ,
@@ -580,6 +684,9 @@ def __init__(self, routing_strategies: RoutingStrategiesResource) -> None:
580684 self .archive = to_raw_response_wrapper (
581685 routing_strategies .archive ,
582686 )
687+ self .list_notifications = to_raw_response_wrapper (
688+ routing_strategies .list_notifications ,
689+ )
583690 self .replace = to_raw_response_wrapper (
584691 routing_strategies .replace ,
585692 )
@@ -601,6 +708,9 @@ def __init__(self, routing_strategies: AsyncRoutingStrategiesResource) -> None:
601708 self .archive = async_to_raw_response_wrapper (
602709 routing_strategies .archive ,
603710 )
711+ self .list_notifications = async_to_raw_response_wrapper (
712+ routing_strategies .list_notifications ,
713+ )
604714 self .replace = async_to_raw_response_wrapper (
605715 routing_strategies .replace ,
606716 )
@@ -622,6 +732,9 @@ def __init__(self, routing_strategies: RoutingStrategiesResource) -> None:
622732 self .archive = to_streamed_response_wrapper (
623733 routing_strategies .archive ,
624734 )
735+ self .list_notifications = to_streamed_response_wrapper (
736+ routing_strategies .list_notifications ,
737+ )
625738 self .replace = to_streamed_response_wrapper (
626739 routing_strategies .replace ,
627740 )
@@ -643,6 +756,9 @@ def __init__(self, routing_strategies: AsyncRoutingStrategiesResource) -> None:
643756 self .archive = async_to_streamed_response_wrapper (
644757 routing_strategies .archive ,
645758 )
759+ self .list_notifications = async_to_streamed_response_wrapper (
760+ routing_strategies .list_notifications ,
761+ )
646762 self .replace = async_to_streamed_response_wrapper (
647763 routing_strategies .replace ,
648764 )
0 commit comments