diff --git a/CHANGELOG.md b/CHANGELOG.md index 9485214..0118f44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.10.0 + +### New Features + +- **New Feature: Tags** — Organize and filter your Push Notification and Live Activity history using one or more tags. + ## 1.9.0 ### New Features diff --git a/README.md b/README.md index 9dc852a..b09e63d 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ See the [API reference](https://activitysmith.com/docs/api-reference/introductio - [Widgets](#widgets) - [App Icon Badge Count](#app-icon-badge-count) - [Channels](#channels) +- [Tags](#tags) ## Installation @@ -590,6 +591,18 @@ activitysmith.live_activities.start( activitysmith.badge_count(3, channels=["sales", "customer-success"]) ``` +## Tags + +Use `tags` to organize and filter your Push Notification and Live Activity history. Tags are created automatically when you first use them. + +```python +activitysmith.notifications.send( + title="New subscription 💸", + message="Customer upgraded to Pro plan", + tags=["user:382", "billing"], +) +``` + ## Error Handling ```python diff --git a/activitysmith/client.py b/activitysmith/client.py index 53891ec..2cf4d0a 100644 --- a/activitysmith/client.py +++ b/activitysmith/client.py @@ -11,7 +11,7 @@ from activitysmith_openapi.api.push_notifications_api import PushNotificationsApi from activitysmith_openapi.api.app_icon_badges_api import AppIconBadgesApi -SDK_VERSION = "1.9.0" +SDK_VERSION = "1.10.0" SDK_HEADER_NAME = "X-ActivitySmith-SDK" SDK_HEADER_VALUE = f"python-v{SDK_VERSION}" @@ -210,6 +210,7 @@ def _build_push_request( actions: Any | None = None, target: Any | None = None, channels: Any | None = None, + tags: Any | None = None, ) -> Any: request_fields = _compact_dict( { @@ -221,6 +222,7 @@ def _build_push_request( "actions": actions, "target": target, "channels": channels, + "tags": tags, } ) @@ -281,6 +283,7 @@ def _build_live_activity_request( alert: Any | None = None, target: Any | None = None, channels: Any | None = None, + tags: Any | None = None, ) -> Any: content_state_fields = _compact_dict( { @@ -313,6 +316,7 @@ def _build_live_activity_request( "alert": alert, "target": target, "channels": channels, + "tags": tags, } ) @@ -370,6 +374,7 @@ def send( actions: Any | None = None, target: Any | None = None, channels: Any | None = None, + tags: Any | None = None, ): request = _build_push_request( request, @@ -381,6 +386,7 @@ def send( actions=actions, target=target, channels=channels, + tags=tags, ) normalized = _validate_push_request(_normalize_channels_target(request)) return self._api.send_push_notification( @@ -455,6 +461,7 @@ def start( alert: Any | None = None, target: Any | None = None, channels: Any | None = None, + tags: Any | None = None, ): request = _build_live_activity_request( request, @@ -480,6 +487,7 @@ def start( alert=alert, target=target, channels=channels, + tags=tags, ) return self._api.start_live_activity( live_activity_start_request=_normalize_channels_target(request) @@ -614,6 +622,7 @@ def stream( alert: Any | None = None, target: Any | None = None, channels: Any | None = None, + tags: Any | None = None, ): request = _build_live_activity_request( request, @@ -639,6 +648,7 @@ def stream( alert=alert, target=target, channels=channels, + tags=tags, ) return self._api.reconcile_live_activity_stream( stream_key=stream_key, diff --git a/activitysmith_openapi/__init__.py b/activitysmith_openapi/__init__.py index fdf1b33..6c01606 100644 --- a/activitysmith_openapi/__init__.py +++ b/activitysmith_openapi/__init__.py @@ -14,7 +14,7 @@ """ # noqa: E501 -__version__ = "1.8.0" +__version__ = "1.10.0" # import apis into sdk package from activitysmith_openapi.api.app_icon_badges_api import AppIconBadgesApi diff --git a/activitysmith_openapi/api/app_icon_badges_api.py b/activitysmith_openapi/api/app_icon_badges_api.py index 074d52f..29d22f6 100644 --- a/activitysmith_openapi/api/app_icon_badges_api.py +++ b/activitysmith_openapi/api/app_icon_badges_api.py @@ -54,9 +54,9 @@ def update_app_icon_badge_count( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> AppIconBadgeCountUpdateResponse: - """Update App Icon Badge Count + """Set App Icon Badge Count - Updates the App Icon Badge Count on devices matched by API key scope and optional target channels. Send `badge: 0` to clear the count. Badge updates are independent of push notifications and do not create a push notification history item. + Shows a number on the ActivitySmith app icon. :param app_icon_badge_count_update_request: (required) :type app_icon_badge_count_update_request: AppIconBadgeCountUpdateRequest @@ -125,9 +125,9 @@ def update_app_icon_badge_count_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[AppIconBadgeCountUpdateResponse]: - """Update App Icon Badge Count + """Set App Icon Badge Count - Updates the App Icon Badge Count on devices matched by API key scope and optional target channels. Send `badge: 0` to clear the count. Badge updates are independent of push notifications and do not create a push notification history item. + Shows a number on the ActivitySmith app icon. :param app_icon_badge_count_update_request: (required) :type app_icon_badge_count_update_request: AppIconBadgeCountUpdateRequest @@ -196,9 +196,9 @@ def update_app_icon_badge_count_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update App Icon Badge Count + """Set App Icon Badge Count - Updates the App Icon Badge Count on devices matched by API key scope and optional target channels. Send `badge: 0` to clear the count. Badge updates are independent of push notifications and do not create a push notification history item. + Shows a number on the ActivitySmith app icon. :param app_icon_badge_count_update_request: (required) :type app_icon_badge_count_update_request: AppIconBadgeCountUpdateRequest diff --git a/activitysmith_openapi/api/live_activities_api.py b/activitysmith_openapi/api/live_activities_api.py index 67f5f69..d891d6e 100644 --- a/activitysmith_openapi/api/live_activities_api.py +++ b/activitysmith_openapi/api/live_activities_api.py @@ -67,7 +67,7 @@ def end_live_activity( ) -> LiveActivityEndResponse: """End a Live Activity (legacy manual lifecycle) - Legacy manual lifecycle endpoint. For new integrations, use DELETE /live-activity/stream/{stream_key} to end a managed Live Activity stream. This endpoint remains supported for existing integrations and advanced lifecycle control. Ends a Live Activity and archives its lifecycle. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. + Legacy manual lifecycle endpoint. For new integrations, use DELETE /live-activity/stream/{stream_key} to end a managed Live Activity stream. This endpoint remains supported for existing integrations and advanced lifecycle control. Ends a Live Activity and archives its lifecycle. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities. :param live_activity_end_request: (required) :type live_activity_end_request: LiveActivityEndRequest @@ -136,7 +136,7 @@ def end_live_activity_with_http_info( ) -> ApiResponse[LiveActivityEndResponse]: """End a Live Activity (legacy manual lifecycle) - Legacy manual lifecycle endpoint. For new integrations, use DELETE /live-activity/stream/{stream_key} to end a managed Live Activity stream. This endpoint remains supported for existing integrations and advanced lifecycle control. Ends a Live Activity and archives its lifecycle. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. + Legacy manual lifecycle endpoint. For new integrations, use DELETE /live-activity/stream/{stream_key} to end a managed Live Activity stream. This endpoint remains supported for existing integrations and advanced lifecycle control. Ends a Live Activity and archives its lifecycle. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities. :param live_activity_end_request: (required) :type live_activity_end_request: LiveActivityEndRequest @@ -205,7 +205,7 @@ def end_live_activity_without_preload_content( ) -> RESTResponseType: """End a Live Activity (legacy manual lifecycle) - Legacy manual lifecycle endpoint. For new integrations, use DELETE /live-activity/stream/{stream_key} to end a managed Live Activity stream. This endpoint remains supported for existing integrations and advanced lifecycle control. Ends a Live Activity and archives its lifecycle. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. + Legacy manual lifecycle endpoint. For new integrations, use DELETE /live-activity/stream/{stream_key} to end a managed Live Activity stream. This endpoint remains supported for existing integrations and advanced lifecycle control. Ends a Live Activity and archives its lifecycle. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities. :param live_activity_end_request: (required) :type live_activity_end_request: LiveActivityEndRequest @@ -346,7 +346,7 @@ def end_live_activity_stream( ) -> LiveActivityStreamDeleteResponse: """End a stream - Use this endpoint when the process you are tracking is finished and you no longer want the Live Activity on your devices. ActivitySmith ends the current Live Activity for this stream and dismisses it from devices. If you need direct lifecycle control, use /live-activity/start, /live-activity/update, and /live-activity/end instead. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. + Use this endpoint when the process you are tracking is finished and you no longer want the Live Activity on your devices. ActivitySmith ends the current Live Activity for this stream and dismisses it from devices. If you need direct lifecycle control, use /live-activity/start, /live-activity/update, and /live-activity/end instead. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities. :param stream_key: Stable identifier for one ongoing thing. Allowed characters: letters, numbers, underscores, and hyphens. (required) :type stream_key: str @@ -420,7 +420,7 @@ def end_live_activity_stream_with_http_info( ) -> ApiResponse[LiveActivityStreamDeleteResponse]: """End a stream - Use this endpoint when the process you are tracking is finished and you no longer want the Live Activity on your devices. ActivitySmith ends the current Live Activity for this stream and dismisses it from devices. If you need direct lifecycle control, use /live-activity/start, /live-activity/update, and /live-activity/end instead. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. + Use this endpoint when the process you are tracking is finished and you no longer want the Live Activity on your devices. ActivitySmith ends the current Live Activity for this stream and dismisses it from devices. If you need direct lifecycle control, use /live-activity/start, /live-activity/update, and /live-activity/end instead. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities. :param stream_key: Stable identifier for one ongoing thing. Allowed characters: letters, numbers, underscores, and hyphens. (required) :type stream_key: str @@ -494,7 +494,7 @@ def end_live_activity_stream_without_preload_content( ) -> RESTResponseType: """End a stream - Use this endpoint when the process you are tracking is finished and you no longer want the Live Activity on your devices. ActivitySmith ends the current Live Activity for this stream and dismisses it from devices. If you need direct lifecycle control, use /live-activity/start, /live-activity/update, and /live-activity/end instead. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. + Use this endpoint when the process you are tracking is finished and you no longer want the Live Activity on your devices. ActivitySmith ends the current Live Activity for this stream and dismisses it from devices. If you need direct lifecycle control, use /live-activity/start, /live-activity/update, and /live-activity/end instead. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities. :param stream_key: Stable identifier for one ongoing thing. Allowed characters: letters, numbers, underscores, and hyphens. (required) :type stream_key: str @@ -642,7 +642,7 @@ def reconcile_live_activity_stream( ) -> LiveActivityStreamPutResponse: """Start a new Live Activity or update an existing one - Use a stable stream_key for each ongoing thing you want to show as a Live Activity. Send the latest content_state whenever it changes, and ActivitySmith will keep the Live Activity in sync. For timer streams, send duration_seconds to start or reset the timer; omit duration_seconds on later updates to preserve the existing timer window. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. + Use a stable stream_key for each ongoing thing you want to show as a Live Activity. Send the latest content_state whenever it changes, and ActivitySmith will keep the Live Activity in sync. For timer streams, send duration_seconds to start or reset the timer; omit duration_seconds on later updates to preserve the existing timer window. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities. Optional tags to organize and filter notification history. On later stream updates, omit tags to keep the current tags, send tags again to replace them, or send an empty array to clear them. :param stream_key: Stable identifier for one ongoing thing. Allowed characters: letters, numbers, underscores, and hyphens. (required) :type stream_key: str @@ -717,7 +717,7 @@ def reconcile_live_activity_stream_with_http_info( ) -> ApiResponse[LiveActivityStreamPutResponse]: """Start a new Live Activity or update an existing one - Use a stable stream_key for each ongoing thing you want to show as a Live Activity. Send the latest content_state whenever it changes, and ActivitySmith will keep the Live Activity in sync. For timer streams, send duration_seconds to start or reset the timer; omit duration_seconds on later updates to preserve the existing timer window. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. + Use a stable stream_key for each ongoing thing you want to show as a Live Activity. Send the latest content_state whenever it changes, and ActivitySmith will keep the Live Activity in sync. For timer streams, send duration_seconds to start or reset the timer; omit duration_seconds on later updates to preserve the existing timer window. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities. Optional tags to organize and filter notification history. On later stream updates, omit tags to keep the current tags, send tags again to replace them, or send an empty array to clear them. :param stream_key: Stable identifier for one ongoing thing. Allowed characters: letters, numbers, underscores, and hyphens. (required) :type stream_key: str @@ -792,7 +792,7 @@ def reconcile_live_activity_stream_without_preload_content( ) -> RESTResponseType: """Start a new Live Activity or update an existing one - Use a stable stream_key for each ongoing thing you want to show as a Live Activity. Send the latest content_state whenever it changes, and ActivitySmith will keep the Live Activity in sync. For timer streams, send duration_seconds to start or reset the timer; omit duration_seconds on later updates to preserve the existing timer window. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. + Use a stable stream_key for each ongoing thing you want to show as a Live Activity. Send the latest content_state whenever it changes, and ActivitySmith will keep the Live Activity in sync. For timer streams, send duration_seconds to start or reset the timer; omit duration_seconds on later updates to preserve the existing timer window. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities. Optional tags to organize and filter notification history. On later stream updates, omit tags to keep the current tags, send tags again to replace them, or send an empty array to clear them. :param stream_key: Stable identifier for one ongoing thing. Allowed characters: letters, numbers, underscores, and hyphens. (required) :type stream_key: str @@ -940,7 +940,7 @@ def start_live_activity( ) -> LiveActivityStartResponse: """Start a Live Activity (legacy manual lifecycle) - Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Starts a Live Activity on devices matched by API key scope and optional target channels. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. + Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Starts a Live Activity on devices matched by API key scope and optional target channels. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities. Optional tags to organize and filter notification history. :param live_activity_start_request: (required) :type live_activity_start_request: LiveActivityStartRequest @@ -1011,7 +1011,7 @@ def start_live_activity_with_http_info( ) -> ApiResponse[LiveActivityStartResponse]: """Start a Live Activity (legacy manual lifecycle) - Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Starts a Live Activity on devices matched by API key scope and optional target channels. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. + Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Starts a Live Activity on devices matched by API key scope and optional target channels. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities. Optional tags to organize and filter notification history. :param live_activity_start_request: (required) :type live_activity_start_request: LiveActivityStartRequest @@ -1082,7 +1082,7 @@ def start_live_activity_without_preload_content( ) -> RESTResponseType: """Start a Live Activity (legacy manual lifecycle) - Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Starts a Live Activity on devices matched by API key scope and optional target channels. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. + Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Starts a Live Activity on devices matched by API key scope and optional target channels. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities. Optional tags to organize and filter notification history. :param live_activity_start_request: (required) :type live_activity_start_request: LiveActivityStartRequest @@ -1224,7 +1224,7 @@ def update_live_activity( ) -> LiveActivityUpdateResponse: """Update a Live Activity (legacy manual lifecycle) - Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Updates an existing Live Activity. If the per-activity token is not registered yet, the update is queued. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes. For timer activities, send duration_seconds only when you want to reset the timer window; omit it to keep the current timer running. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. + Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Updates an existing Live Activity. If the per-activity token is not registered yet, the update is queued. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes. For timer activities, send duration_seconds only when you want to reset the timer window; omit it to keep the current timer running. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities. :param live_activity_update_request: (required) :type live_activity_update_request: LiveActivityUpdateRequest @@ -1293,7 +1293,7 @@ def update_live_activity_with_http_info( ) -> ApiResponse[LiveActivityUpdateResponse]: """Update a Live Activity (legacy manual lifecycle) - Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Updates an existing Live Activity. If the per-activity token is not registered yet, the update is queued. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes. For timer activities, send duration_seconds only when you want to reset the timer window; omit it to keep the current timer running. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. + Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Updates an existing Live Activity. If the per-activity token is not registered yet, the update is queued. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes. For timer activities, send duration_seconds only when you want to reset the timer window; omit it to keep the current timer running. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities. :param live_activity_update_request: (required) :type live_activity_update_request: LiveActivityUpdateRequest @@ -1362,7 +1362,7 @@ def update_live_activity_without_preload_content( ) -> RESTResponseType: """Update a Live Activity (legacy manual lifecycle) - Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Updates an existing Live Activity. If the per-activity token is not registered yet, the update is queued. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes. For timer activities, send duration_seconds only when you want to reset the timer window; omit it to keep the current timer running. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. + Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Updates an existing Live Activity. If the per-activity token is not registered yet, the update is queued. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes. For timer activities, send duration_seconds only when you want to reset the timer window; omit it to keep the current timer running. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities. :param live_activity_update_request: (required) :type live_activity_update_request: LiveActivityUpdateRequest diff --git a/activitysmith_openapi/api/push_notifications_api.py b/activitysmith_openapi/api/push_notifications_api.py index 42ae76c..63bce4b 100644 --- a/activitysmith_openapi/api/push_notifications_api.py +++ b/activitysmith_openapi/api/push_notifications_api.py @@ -56,7 +56,7 @@ def send_push_notification( ) -> PushNotificationResponse: """Send a push notification - Sends a push notification to devices matched by API key scope and optional target channels. Supports optional redirection URL, optional media preview or playback when the notification is expanded, and up to 4 interactive actions. `media` cannot be combined with `actions`. + Sends a push notification to devices matched by API key scope and optional target channels. Supports optional redirection URL, optional media preview or playback when the notification is expanded, and up to 4 interactive actions. `media` cannot be combined with `actions`. Optional tags to organize and filter notification history. :param push_notification_request: (required) :type push_notification_request: PushNotificationRequest @@ -127,7 +127,7 @@ def send_push_notification_with_http_info( ) -> ApiResponse[PushNotificationResponse]: """Send a push notification - Sends a push notification to devices matched by API key scope and optional target channels. Supports optional redirection URL, optional media preview or playback when the notification is expanded, and up to 4 interactive actions. `media` cannot be combined with `actions`. + Sends a push notification to devices matched by API key scope and optional target channels. Supports optional redirection URL, optional media preview or playback when the notification is expanded, and up to 4 interactive actions. `media` cannot be combined with `actions`. Optional tags to organize and filter notification history. :param push_notification_request: (required) :type push_notification_request: PushNotificationRequest @@ -198,7 +198,7 @@ def send_push_notification_without_preload_content( ) -> RESTResponseType: """Send a push notification - Sends a push notification to devices matched by API key scope and optional target channels. Supports optional redirection URL, optional media preview or playback when the notification is expanded, and up to 4 interactive actions. `media` cannot be combined with `actions`. + Sends a push notification to devices matched by API key scope and optional target channels. Supports optional redirection URL, optional media preview or playback when the notification is expanded, and up to 4 interactive actions. `media` cannot be combined with `actions`. Optional tags to organize and filter notification history. :param push_notification_request: (required) :type push_notification_request: PushNotificationRequest diff --git a/activitysmith_openapi/api_client.py b/activitysmith_openapi/api_client.py index 8cf7769..5132b72 100644 --- a/activitysmith_openapi/api_client.py +++ b/activitysmith_openapi/api_client.py @@ -88,7 +88,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.8.0/python' + self.user_agent = 'OpenAPI-Generator/1.10.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/activitysmith_openapi/configuration.py b/activitysmith_openapi/configuration.py index 398cea1..4d3acda 100644 --- a/activitysmith_openapi/configuration.py +++ b/activitysmith_openapi/configuration.py @@ -393,7 +393,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 1.0.0\n"\ - "SDK Package Version: 1.8.0".\ + "SDK Package Version: 1.10.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/activitysmith_openapi/docs/AppIconBadgeCountUpdateRequest.md b/activitysmith_openapi/docs/AppIconBadgeCountUpdateRequest.md index 03087ab..52147d6 100644 --- a/activitysmith_openapi/docs/AppIconBadgeCountUpdateRequest.md +++ b/activitysmith_openapi/docs/AppIconBadgeCountUpdateRequest.md @@ -1,6 +1,5 @@ # AppIconBadgeCountUpdateRequest -App Icon Badge Count update. Send badge 0 to clear the count. ## Properties diff --git a/activitysmith_openapi/docs/AppIconBadgesApi.md b/activitysmith_openapi/docs/AppIconBadgesApi.md index 933504d..6ae3264 100644 --- a/activitysmith_openapi/docs/AppIconBadgesApi.md +++ b/activitysmith_openapi/docs/AppIconBadgesApi.md @@ -4,15 +4,15 @@ All URIs are relative to *https://activitysmith.com/api* Method | HTTP request | Description ------------- | ------------- | ------------- -[**update_app_icon_badge_count**](AppIconBadgesApi.md#update_app_icon_badge_count) | **POST** /badge | Update App Icon Badge Count +[**update_app_icon_badge_count**](AppIconBadgesApi.md#update_app_icon_badge_count) | **POST** /badge | Set App Icon Badge Count # **update_app_icon_badge_count** > AppIconBadgeCountUpdateResponse update_app_icon_badge_count(app_icon_badge_count_update_request) -Update App Icon Badge Count +Set App Icon Badge Count -Updates the App Icon Badge Count on devices matched by API key scope and optional target channels. Send `badge: 0` to clear the count. Badge updates are independent of push notifications and do not create a push notification history item. +Shows a number on the ActivitySmith app icon. ### Example @@ -45,10 +45,10 @@ configuration = activitysmith_openapi.Configuration( with activitysmith_openapi.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = activitysmith_openapi.AppIconBadgesApi(api_client) - app_icon_badge_count_update_request = {"badge":12} # AppIconBadgeCountUpdateRequest | + app_icon_badge_count_update_request = {"badge":8333} # AppIconBadgeCountUpdateRequest | try: - # Update App Icon Badge Count + # Set App Icon Badge Count api_response = api_instance.update_app_icon_badge_count(app_icon_badge_count_update_request) print("The response of AppIconBadgesApi->update_app_icon_badge_count:\n") pprint(api_response) @@ -83,8 +83,8 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | App Icon Badge Count updated | - | -**400** | Bad request (invalid badge value or channel targeting input) | - | -**403** | Forbidden (API key scope or channel assignment violation) | - | +**400** | Bad request | - | +**403** | Forbidden | - | **404** | No recipients found for effective channel target | - | **429** | Rate limit exceeded | - | diff --git a/activitysmith_openapi/docs/LiveActivitiesApi.md b/activitysmith_openapi/docs/LiveActivitiesApi.md index 67151d2..ff46837 100644 --- a/activitysmith_openapi/docs/LiveActivitiesApi.md +++ b/activitysmith_openapi/docs/LiveActivitiesApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description End a Live Activity (legacy manual lifecycle) -Legacy manual lifecycle endpoint. For new integrations, use DELETE /live-activity/stream/{stream_key} to end a managed Live Activity stream. This endpoint remains supported for existing integrations and advanced lifecycle control. Ends a Live Activity and archives its lifecycle. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. +Legacy manual lifecycle endpoint. For new integrations, use DELETE /live-activity/stream/{stream_key} to end a managed Live Activity stream. This endpoint remains supported for existing integrations and advanced lifecycle control. Ends a Live Activity and archives its lifecycle. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities. ### Example @@ -97,7 +97,7 @@ Name | Type | Description | Notes End a stream -Use this endpoint when the process you are tracking is finished and you no longer want the Live Activity on your devices. ActivitySmith ends the current Live Activity for this stream and dismisses it from devices. If you need direct lifecycle control, use /live-activity/start, /live-activity/update, and /live-activity/end instead. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. +Use this endpoint when the process you are tracking is finished and you no longer want the Live Activity on your devices. ActivitySmith ends the current Live Activity for this stream and dismisses it from devices. If you need direct lifecycle control, use /live-activity/start, /live-activity/update, and /live-activity/end instead. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities. ### Example @@ -181,7 +181,7 @@ Name | Type | Description | Notes Start a new Live Activity or update an existing one -Use a stable stream_key for each ongoing thing you want to show as a Live Activity. Send the latest content_state whenever it changes, and ActivitySmith will keep the Live Activity in sync. For timer streams, send duration_seconds to start or reset the timer; omit duration_seconds on later updates to preserve the existing timer window. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. +Use a stable stream_key for each ongoing thing you want to show as a Live Activity. Send the latest content_state whenever it changes, and ActivitySmith will keep the Live Activity in sync. For timer streams, send duration_seconds to start or reset the timer; omit duration_seconds on later updates to preserve the existing timer window. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities. Optional tags to organize and filter notification history. On later stream updates, omit tags to keep the current tags, send tags again to replace them, or send an empty array to clear them. ### Example @@ -266,7 +266,7 @@ Name | Type | Description | Notes Start a Live Activity (legacy manual lifecycle) -Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Starts a Live Activity on devices matched by API key scope and optional target channels. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. +Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Starts a Live Activity on devices matched by API key scope and optional target channels. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities. Optional tags to organize and filter notification history. ### Example @@ -349,7 +349,7 @@ Name | Type | Description | Notes Update a Live Activity (legacy manual lifecycle) -Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Updates an existing Live Activity. If the per-activity token is not registered yet, the update is queued. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes. For timer activities, send duration_seconds only when you want to reset the timer window; omit it to keep the current timer running. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. +Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Updates an existing Live Activity. If the per-activity token is not registered yet, the update is queued. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes. For timer activities, send duration_seconds only when you want to reset the timer window; omit it to keep the current timer running. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities. ### Example diff --git a/activitysmith_openapi/docs/LiveActivityAction.md b/activitysmith_openapi/docs/LiveActivityAction.md index 61178fa..b586ae2 100644 --- a/activitysmith_openapi/docs/LiveActivityAction.md +++ b/activitysmith_openapi/docs/LiveActivityAction.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **title** | **str** | Button title displayed in the Live Activity UI. | **type** | [**LiveActivityActionType**](LiveActivityActionType.md) | | -**url** | **str** | Action URL. For open_url, use an HTTPS URL or a shortcuts://run-shortcut?name=... URL that runs a specific iPhone Shortcut. For webhook, use an HTTPS URL called by the ActivitySmith backend. | +**url** | **str** | Action URL. For open_url, use an HTTP or HTTPS URL or a shortcuts://run-shortcut?name=... URL that runs a specific iPhone Shortcut. For webhook, use an HTTPS URL called by the ActivitySmith backend. | **method** | [**LiveActivityWebhookMethod**](LiveActivityWebhookMethod.md) | Webhook HTTP method. Used only when type=webhook. | [optional] [default to LiveActivityWebhookMethod.POST] **body** | **object** | Optional webhook payload body. Used only when type=webhook. | [optional] diff --git a/activitysmith_openapi/docs/LiveActivityEndRequest.md b/activitysmith_openapi/docs/LiveActivityEndRequest.md index 9937ce0..94f4fa6 100644 --- a/activitysmith_openapi/docs/LiveActivityEndRequest.md +++ b/activitysmith_openapi/docs/LiveActivityEndRequest.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **activity_id** | **str** | | **content_state** | [**ContentStateEnd**](ContentStateEnd.md) | | **action** | [**LiveActivityAction**](LiveActivityAction.md) | | [optional] -**secondary_action** | [**LiveActivityAction**](LiveActivityAction.md) | Optional secondary action button. Supported only for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action. | [optional] +**secondary_action** | [**LiveActivityAction**](LiveActivityAction.md) | Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action. | [optional] ## Example diff --git a/activitysmith_openapi/docs/LiveActivityStartRequest.md b/activitysmith_openapi/docs/LiveActivityStartRequest.md index 4bbd90f..914e655 100644 --- a/activitysmith_openapi/docs/LiveActivityStartRequest.md +++ b/activitysmith_openapi/docs/LiveActivityStartRequest.md @@ -8,9 +8,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **content_state** | [**ContentStateStart**](ContentStateStart.md) | | **action** | [**LiveActivityAction**](LiveActivityAction.md) | | [optional] -**secondary_action** | [**LiveActivityAction**](LiveActivityAction.md) | Optional secondary action button. Supported only for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action. | [optional] +**secondary_action** | [**LiveActivityAction**](LiveActivityAction.md) | Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action. | [optional] **alert** | [**AlertPayload**](AlertPayload.md) | | [optional] **target** | [**ChannelTarget**](ChannelTarget.md) | | [optional] +**tags** | **List[str]** | Optional tags to organize and filter notification history. | [optional] ## Example diff --git a/activitysmith_openapi/docs/LiveActivityStartResponse.md b/activitysmith_openapi/docs/LiveActivityStartResponse.md index 8e90f9f..2cf977d 100644 --- a/activitysmith_openapi/docs/LiveActivityStartResponse.md +++ b/activitysmith_openapi/docs/LiveActivityStartResponse.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **users_notified** | **int** | | [optional] **activity_id** | **str** | | **effective_channel_slugs** | **List[str]** | | [optional] +**tags** | **List[str]** | Optional tags to organize and filter notification history. | [optional] **timestamp** | **datetime** | | ## Example diff --git a/activitysmith_openapi/docs/LiveActivityStreamDeleteRequest.md b/activitysmith_openapi/docs/LiveActivityStreamDeleteRequest.md index a8cd448..bde073d 100644 --- a/activitysmith_openapi/docs/LiveActivityStreamDeleteRequest.md +++ b/activitysmith_openapi/docs/LiveActivityStreamDeleteRequest.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **content_state** | [**StreamContentState**](StreamContentState.md) | | [optional] **action** | [**LiveActivityAction**](LiveActivityAction.md) | | [optional] -**secondary_action** | [**LiveActivityAction**](LiveActivityAction.md) | Optional secondary action button. Supported only for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action. | [optional] +**secondary_action** | [**LiveActivityAction**](LiveActivityAction.md) | Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action. | [optional] **alert** | [**AlertPayload**](AlertPayload.md) | | [optional] ## Example diff --git a/activitysmith_openapi/docs/LiveActivityStreamPutResponse.md b/activitysmith_openapi/docs/LiveActivityStreamPutResponse.md index 681c995..682d9e8 100644 --- a/activitysmith_openapi/docs/LiveActivityStreamPutResponse.md +++ b/activitysmith_openapi/docs/LiveActivityStreamPutResponse.md @@ -15,6 +15,7 @@ Name | Type | Description | Notes **devices_queued** | **int** | | [optional] **users_notified** | **int** | | [optional] **effective_channel_slugs** | **List[str]** | | [optional] +**tags** | **List[str]** | Optional tags to organize and filter notification history. | [optional] **timestamp** | **datetime** | | ## Example diff --git a/activitysmith_openapi/docs/LiveActivityStreamRequest.md b/activitysmith_openapi/docs/LiveActivityStreamRequest.md index 6c42322..2aba012 100644 --- a/activitysmith_openapi/docs/LiveActivityStreamRequest.md +++ b/activitysmith_openapi/docs/LiveActivityStreamRequest.md @@ -8,10 +8,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **content_state** | [**StreamContentState**](StreamContentState.md) | | **action** | [**LiveActivityAction**](LiveActivityAction.md) | | [optional] -**secondary_action** | [**LiveActivityAction**](LiveActivityAction.md) | Optional secondary action button. Supported only for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action. | [optional] +**secondary_action** | [**LiveActivityAction**](LiveActivityAction.md) | Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action. | [optional] **alert** | [**AlertPayload**](AlertPayload.md) | | [optional] **channels** | **List[str]** | Channel slugs. When omitted, API key scope determines recipients. | [optional] **target** | [**ChannelTarget**](ChannelTarget.md) | | [optional] +**tags** | **List[str]** | Optional tags to organize and filter notification history. | [optional] ## Example diff --git a/activitysmith_openapi/docs/LiveActivityUpdateRequest.md b/activitysmith_openapi/docs/LiveActivityUpdateRequest.md index fb69118..1144734 100644 --- a/activitysmith_openapi/docs/LiveActivityUpdateRequest.md +++ b/activitysmith_openapi/docs/LiveActivityUpdateRequest.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **activity_id** | **str** | | **content_state** | [**ContentStateUpdate**](ContentStateUpdate.md) | | **action** | [**LiveActivityAction**](LiveActivityAction.md) | | [optional] -**secondary_action** | [**LiveActivityAction**](LiveActivityAction.md) | Optional secondary action button. Supported only for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action. | [optional] +**secondary_action** | [**LiveActivityAction**](LiveActivityAction.md) | Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action. | [optional] ## Example diff --git a/activitysmith_openapi/docs/PushNotificationAction.md b/activitysmith_openapi/docs/PushNotificationAction.md index 243436c..a47961f 100644 --- a/activitysmith_openapi/docs/PushNotificationAction.md +++ b/activitysmith_openapi/docs/PushNotificationAction.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **title** | **str** | Button title displayed in iOS expanded notification UI. | **type** | [**PushNotificationActionType**](PushNotificationActionType.md) | | -**url** | **str** | Action URL. For open_url, use an HTTPS URL or a shortcuts://run-shortcut?name=... URL that runs a specific iPhone Shortcut. For webhook, use an HTTPS URL called by the ActivitySmith backend. | +**url** | **str** | Action URL. For open_url, use an HTTP or HTTPS URL or a shortcuts://run-shortcut?name=... URL that runs a specific iPhone Shortcut. For webhook, use an HTTPS URL called by the ActivitySmith backend. | **method** | [**PushNotificationWebhookMethod**](PushNotificationWebhookMethod.md) | Webhook HTTP method. Used only when type=webhook. | [optional] [default to PushNotificationWebhookMethod.POST] **body** | **object** | Optional webhook payload body. Used only when type=webhook. | [optional] diff --git a/activitysmith_openapi/docs/PushNotificationRequest.md b/activitysmith_openapi/docs/PushNotificationRequest.md index 8c02f50..aa6611c 100644 --- a/activitysmith_openapi/docs/PushNotificationRequest.md +++ b/activitysmith_openapi/docs/PushNotificationRequest.md @@ -9,12 +9,13 @@ Name | Type | Description | Notes **message** | **str** | | [optional] **subtitle** | **str** | | [optional] **media** | **str** | Optional HTTPS URL for an image, audio file, or video that users can preview or play when they expand the notification. If `redirection` is omitted, tapping the notification opens this URL. Cannot be combined with `actions`. | [optional] -**redirection** | **str** | Optional HTTPS URL or shortcuts://run-shortcut?name=... URL opened when the user taps the notification body. Use shortcuts://run-shortcut?name=... to run a specific iPhone Shortcut that already exists on the user's device. Overrides the default tap target from `media` when both are provided. | [optional] +**redirection** | **str** | Optional HTTP URL, HTTPS URL, or shortcuts://run-shortcut?name=... URL opened when the user taps the notification body. Use shortcuts://run-shortcut?name=... to run a specific iPhone Shortcut that already exists on the user's device. Overrides the default tap target from `media` when both are provided. | [optional] **actions** | [**List[PushNotificationAction]**](PushNotificationAction.md) | Optional interactive actions shown when users expand the notification. Cannot be combined with `media`. | [optional] **payload** | **object** | | [optional] **badge** | **int** | | [optional] **sound** | **str** | | [optional] **target** | [**ChannelTarget**](ChannelTarget.md) | | [optional] +**tags** | **List[str]** | Optional tags to organize and filter notification history. | [optional] ## Example diff --git a/activitysmith_openapi/docs/PushNotificationResponse.md b/activitysmith_openapi/docs/PushNotificationResponse.md index 5d88808..86e8e37 100644 --- a/activitysmith_openapi/docs/PushNotificationResponse.md +++ b/activitysmith_openapi/docs/PushNotificationResponse.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **devices_notified** | **int** | | [optional] **users_notified** | **int** | | [optional] **effective_channel_slugs** | **List[str]** | | [optional] +**tags** | **List[str]** | Optional tags to organize and filter notification history. | [optional] **timestamp** | **datetime** | | ## Example diff --git a/activitysmith_openapi/docs/PushNotificationsApi.md b/activitysmith_openapi/docs/PushNotificationsApi.md index 29f2b8d..42f4cab 100644 --- a/activitysmith_openapi/docs/PushNotificationsApi.md +++ b/activitysmith_openapi/docs/PushNotificationsApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description Send a push notification -Sends a push notification to devices matched by API key scope and optional target channels. Supports optional redirection URL, optional media preview or playback when the notification is expanded, and up to 4 interactive actions. `media` cannot be combined with `actions`. +Sends a push notification to devices matched by API key scope and optional target channels. Supports optional redirection URL, optional media preview or playback when the notification is expanded, and up to 4 interactive actions. `media` cannot be combined with `actions`. Optional tags to organize and filter notification history. ### Example diff --git a/activitysmith_openapi/models/app_icon_badge_count_update_request.py b/activitysmith_openapi/models/app_icon_badge_count_update_request.py index 0b199a4..9d358ad 100644 --- a/activitysmith_openapi/models/app_icon_badge_count_update_request.py +++ b/activitysmith_openapi/models/app_icon_badge_count_update_request.py @@ -26,7 +26,7 @@ class AppIconBadgeCountUpdateRequest(BaseModel): """ - App Icon Badge Count update. Send badge 0 to clear the count. + AppIconBadgeCountUpdateRequest """ # noqa: E501 badge: Annotated[int, Field(le=2147483647, strict=True, ge=0)] = Field(description="The count to show on the ActivitySmith app icon. Send 0 to clear it.") target: Optional[ChannelTarget] = None diff --git a/activitysmith_openapi/models/live_activity_action.py b/activitysmith_openapi/models/live_activity_action.py index 5e9dbae..5c8cdbe 100644 --- a/activitysmith_openapi/models/live_activity_action.py +++ b/activitysmith_openapi/models/live_activity_action.py @@ -30,7 +30,7 @@ class LiveActivityAction(BaseModel): """ # noqa: E501 title: StrictStr = Field(description="Button title displayed in the Live Activity UI.") type: LiveActivityActionType - url: StrictStr = Field(description="Action URL. For open_url, use an HTTPS URL or a shortcuts://run-shortcut?name=... URL that runs a specific iPhone Shortcut. For webhook, use an HTTPS URL called by the ActivitySmith backend.") + url: StrictStr = Field(description="Action URL. For open_url, use an HTTP or HTTPS URL or a shortcuts://run-shortcut?name=... URL that runs a specific iPhone Shortcut. For webhook, use an HTTPS URL called by the ActivitySmith backend.") method: Optional[LiveActivityWebhookMethod] = Field(default=LiveActivityWebhookMethod.POST, description="Webhook HTTP method. Used only when type=webhook.") body: Optional[Dict[str, Any]] = Field(default=None, description="Optional webhook payload body. Used only when type=webhook.") additional_properties: Dict[str, Any] = {} diff --git a/activitysmith_openapi/models/live_activity_end_request.py b/activitysmith_openapi/models/live_activity_end_request.py index 5662089..d9da0dd 100644 --- a/activitysmith_openapi/models/live_activity_end_request.py +++ b/activitysmith_openapi/models/live_activity_end_request.py @@ -31,7 +31,7 @@ class LiveActivityEndRequest(BaseModel): activity_id: StrictStr content_state: ContentStateEnd action: Optional[LiveActivityAction] = None - secondary_action: Optional[LiveActivityAction] = Field(default=None, description="Optional secondary action button. Supported only for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.") + secondary_action: Optional[LiveActivityAction] = Field(default=None, description="Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.") __properties: ClassVar[List[str]] = ["activity_id", "content_state", "action", "secondary_action"] model_config = ConfigDict( diff --git a/activitysmith_openapi/models/live_activity_start_request.py b/activitysmith_openapi/models/live_activity_start_request.py index cd9297b..64ad780 100644 --- a/activitysmith_openapi/models/live_activity_start_request.py +++ b/activitysmith_openapi/models/live_activity_start_request.py @@ -17,8 +17,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field +from pydantic import BaseModel, ConfigDict, Field, field_validator from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from activitysmith_openapi.models.alert_payload import AlertPayload from activitysmith_openapi.models.channel_target import ChannelTarget from activitysmith_openapi.models.content_state_start import ContentStateStart @@ -32,10 +33,11 @@ class LiveActivityStartRequest(BaseModel): """ # noqa: E501 content_state: ContentStateStart action: Optional[LiveActivityAction] = None - secondary_action: Optional[LiveActivityAction] = Field(default=None, description="Optional secondary action button. Supported only for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.") + secondary_action: Optional[LiveActivityAction] = Field(default=None, description="Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.") alert: Optional[AlertPayload] = None target: Optional[ChannelTarget] = None - __properties: ClassVar[List[str]] = ["content_state", "action", "secondary_action", "alert", "target"] + tags: Optional[List[Annotated[str, Field(min_length=1, strict=True, max_length=64)]]] = Field(default=None, description="Optional tags to organize and filter notification history.") + __properties: ClassVar[List[str]] = ["content_state", "action", "secondary_action", "alert", "target", "tags"] model_config = ConfigDict( populate_by_name=True, @@ -107,7 +109,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "action": LiveActivityAction.from_dict(obj["action"]) if obj.get("action") is not None else None, "secondary_action": LiveActivityAction.from_dict(obj["secondary_action"]) if obj.get("secondary_action") is not None else None, "alert": AlertPayload.from_dict(obj["alert"]) if obj.get("alert") is not None else None, - "target": ChannelTarget.from_dict(obj["target"]) if obj.get("target") is not None else None + "target": ChannelTarget.from_dict(obj["target"]) if obj.get("target") is not None else None, + "tags": obj.get("tags") }) return _obj diff --git a/activitysmith_openapi/models/live_activity_start_response.py b/activitysmith_openapi/models/live_activity_start_response.py index 2ff3047..56eab2d 100644 --- a/activitysmith_openapi/models/live_activity_start_response.py +++ b/activitysmith_openapi/models/live_activity_start_response.py @@ -18,8 +18,9 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from typing import Optional, Set from typing_extensions import Self @@ -32,8 +33,9 @@ class LiveActivityStartResponse(BaseModel): users_notified: Optional[StrictInt] = None activity_id: StrictStr effective_channel_slugs: Optional[List[StrictStr]] = None + tags: Optional[List[Annotated[str, Field(min_length=1, strict=True, max_length=64)]]] = Field(default=None, description="Optional tags to organize and filter notification history.") timestamp: datetime - __properties: ClassVar[List[str]] = ["success", "devices_notified", "users_notified", "activity_id", "effective_channel_slugs", "timestamp"] + __properties: ClassVar[List[str]] = ["success", "devices_notified", "users_notified", "activity_id", "effective_channel_slugs", "tags", "timestamp"] model_config = ConfigDict( populate_by_name=True, @@ -91,6 +93,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "users_notified": obj.get("users_notified"), "activity_id": obj.get("activity_id"), "effective_channel_slugs": obj.get("effective_channel_slugs"), + "tags": obj.get("tags"), "timestamp": obj.get("timestamp") }) return _obj diff --git a/activitysmith_openapi/models/live_activity_stream_delete_request.py b/activitysmith_openapi/models/live_activity_stream_delete_request.py index f71d033..8edb49c 100644 --- a/activitysmith_openapi/models/live_activity_stream_delete_request.py +++ b/activitysmith_openapi/models/live_activity_stream_delete_request.py @@ -31,7 +31,7 @@ class LiveActivityStreamDeleteRequest(BaseModel): """ # noqa: E501 content_state: Optional[StreamContentState] = None action: Optional[LiveActivityAction] = None - secondary_action: Optional[LiveActivityAction] = Field(default=None, description="Optional secondary action button. Supported only for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.") + secondary_action: Optional[LiveActivityAction] = Field(default=None, description="Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.") alert: Optional[AlertPayload] = None __properties: ClassVar[List[str]] = ["content_state", "action", "secondary_action", "alert"] diff --git a/activitysmith_openapi/models/live_activity_stream_put_response.py b/activitysmith_openapi/models/live_activity_stream_put_response.py index eaaa181..d64c3ea 100644 --- a/activitysmith_openapi/models/live_activity_stream_put_response.py +++ b/activitysmith_openapi/models/live_activity_stream_put_response.py @@ -18,8 +18,9 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from typing import Optional, Set from typing_extensions import Self @@ -36,8 +37,9 @@ class LiveActivityStreamPutResponse(BaseModel): devices_queued: Optional[StrictInt] = None users_notified: Optional[StrictInt] = None effective_channel_slugs: Optional[List[StrictStr]] = None + tags: Optional[List[Annotated[str, Field(min_length=1, strict=True, max_length=64)]]] = Field(default=None, description="Optional tags to organize and filter notification history.") timestamp: datetime - __properties: ClassVar[List[str]] = ["success", "operation", "stream_key", "activity_id", "previous_activity_id", "devices_notified", "devices_queued", "users_notified", "effective_channel_slugs", "timestamp"] + __properties: ClassVar[List[str]] = ["success", "operation", "stream_key", "activity_id", "previous_activity_id", "devices_notified", "devices_queued", "users_notified", "effective_channel_slugs", "tags", "timestamp"] @field_validator('operation') def operation_validate_enum(cls, value): @@ -111,6 +113,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "devices_queued": obj.get("devices_queued"), "users_notified": obj.get("users_notified"), "effective_channel_slugs": obj.get("effective_channel_slugs"), + "tags": obj.get("tags"), "timestamp": obj.get("timestamp") }) return _obj diff --git a/activitysmith_openapi/models/live_activity_stream_request.py b/activitysmith_openapi/models/live_activity_stream_request.py index 41c7553..7a2e7c4 100644 --- a/activitysmith_openapi/models/live_activity_stream_request.py +++ b/activitysmith_openapi/models/live_activity_stream_request.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from activitysmith_openapi.models.alert_payload import AlertPayload @@ -33,11 +33,12 @@ class LiveActivityStreamRequest(BaseModel): """ # noqa: E501 content_state: StreamContentState action: Optional[LiveActivityAction] = None - secondary_action: Optional[LiveActivityAction] = Field(default=None, description="Optional secondary action button. Supported only for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.") + secondary_action: Optional[LiveActivityAction] = Field(default=None, description="Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.") alert: Optional[AlertPayload] = None channels: Optional[Annotated[List[StrictStr], Field(min_length=1)]] = Field(default=None, description="Channel slugs. When omitted, API key scope determines recipients.") target: Optional[ChannelTarget] = None - __properties: ClassVar[List[str]] = ["content_state", "action", "secondary_action", "alert", "channels", "target"] + tags: Optional[List[Annotated[str, Field(min_length=1, strict=True, max_length=64)]]] = Field(default=None, description="Optional tags to organize and filter notification history.") + __properties: ClassVar[List[str]] = ["content_state", "action", "secondary_action", "alert", "channels", "target", "tags"] model_config = ConfigDict( populate_by_name=True, @@ -110,7 +111,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "secondary_action": LiveActivityAction.from_dict(obj["secondary_action"]) if obj.get("secondary_action") is not None else None, "alert": AlertPayload.from_dict(obj["alert"]) if obj.get("alert") is not None else None, "channels": obj.get("channels"), - "target": ChannelTarget.from_dict(obj["target"]) if obj.get("target") is not None else None + "target": ChannelTarget.from_dict(obj["target"]) if obj.get("target") is not None else None, + "tags": obj.get("tags") }) return _obj diff --git a/activitysmith_openapi/models/live_activity_update_request.py b/activitysmith_openapi/models/live_activity_update_request.py index 079bdc4..3ed4911 100644 --- a/activitysmith_openapi/models/live_activity_update_request.py +++ b/activitysmith_openapi/models/live_activity_update_request.py @@ -31,7 +31,7 @@ class LiveActivityUpdateRequest(BaseModel): activity_id: StrictStr content_state: ContentStateUpdate action: Optional[LiveActivityAction] = None - secondary_action: Optional[LiveActivityAction] = Field(default=None, description="Optional secondary action button. Supported only for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.") + secondary_action: Optional[LiveActivityAction] = Field(default=None, description="Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.") __properties: ClassVar[List[str]] = ["activity_id", "content_state", "action", "secondary_action"] model_config = ConfigDict( diff --git a/activitysmith_openapi/models/push_notification_action.py b/activitysmith_openapi/models/push_notification_action.py index 65fcdbc..efd94cd 100644 --- a/activitysmith_openapi/models/push_notification_action.py +++ b/activitysmith_openapi/models/push_notification_action.py @@ -30,7 +30,7 @@ class PushNotificationAction(BaseModel): """ # noqa: E501 title: StrictStr = Field(description="Button title displayed in iOS expanded notification UI.") type: PushNotificationActionType - url: StrictStr = Field(description="Action URL. For open_url, use an HTTPS URL or a shortcuts://run-shortcut?name=... URL that runs a specific iPhone Shortcut. For webhook, use an HTTPS URL called by the ActivitySmith backend.") + url: StrictStr = Field(description="Action URL. For open_url, use an HTTP or HTTPS URL or a shortcuts://run-shortcut?name=... URL that runs a specific iPhone Shortcut. For webhook, use an HTTPS URL called by the ActivitySmith backend.") method: Optional[PushNotificationWebhookMethod] = Field(default=PushNotificationWebhookMethod.POST, description="Webhook HTTP method. Used only when type=webhook.") body: Optional[Dict[str, Any]] = Field(default=None, description="Optional webhook payload body. Used only when type=webhook.") additional_properties: Dict[str, Any] = {} diff --git a/activitysmith_openapi/models/push_notification_request.py b/activitysmith_openapi/models/push_notification_request.py index 9f3a236..4e83ea0 100644 --- a/activitysmith_openapi/models/push_notification_request.py +++ b/activitysmith_openapi/models/push_notification_request.py @@ -33,14 +33,15 @@ class PushNotificationRequest(BaseModel): message: Optional[StrictStr] = None subtitle: Optional[StrictStr] = None media: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Optional HTTPS URL for an image, audio file, or video that users can preview or play when they expand the notification. If `redirection` is omitted, tapping the notification opens this URL. Cannot be combined with `actions`.") - redirection: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Optional HTTPS URL or shortcuts://run-shortcut?name=... URL opened when the user taps the notification body. Use shortcuts://run-shortcut?name=... to run a specific iPhone Shortcut that already exists on the user's device. Overrides the default tap target from `media` when both are provided.") + redirection: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Optional HTTP URL, HTTPS URL, or shortcuts://run-shortcut?name=... URL opened when the user taps the notification body. Use shortcuts://run-shortcut?name=... to run a specific iPhone Shortcut that already exists on the user's device. Overrides the default tap target from `media` when both are provided.") actions: Optional[Annotated[List[PushNotificationAction], Field(max_length=4)]] = Field(default=None, description="Optional interactive actions shown when users expand the notification. Cannot be combined with `media`.") payload: Optional[Dict[str, Any]] = None badge: Optional[StrictInt] = None sound: Optional[StrictStr] = None target: Optional[ChannelTarget] = None + tags: Optional[List[Annotated[str, Field(min_length=1, strict=True, max_length=64)]]] = Field(default=None, description="Optional tags to organize and filter notification history.") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["title", "message", "subtitle", "media", "redirection", "actions", "payload", "badge", "sound", "target"] + __properties: ClassVar[List[str]] = ["title", "message", "subtitle", "media", "redirection", "actions", "payload", "badge", "sound", "target", "tags"] @field_validator('media') def media_validate_regular_expression(cls, value): @@ -58,8 +59,8 @@ def redirection_validate_regular_expression(cls, value): if value is None: return value - if not re.match(r"^(https|shortcuts):\/\/", value): - raise ValueError(r"must validate the regular expression /^(https|shortcuts):\/\//") + if not re.match(r"^(http|https|shortcuts):\/\/", value): + raise ValueError(r"must validate the regular expression /^(http|https|shortcuts):\/\//") return value model_config = ConfigDict( @@ -139,7 +140,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "payload": obj.get("payload"), "badge": obj.get("badge"), "sound": obj.get("sound"), - "target": ChannelTarget.from_dict(obj["target"]) if obj.get("target") is not None else None + "target": ChannelTarget.from_dict(obj["target"]) if obj.get("target") is not None else None, + "tags": obj.get("tags") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/activitysmith_openapi/models/push_notification_response.py b/activitysmith_openapi/models/push_notification_response.py index fe32548..de1c376 100644 --- a/activitysmith_openapi/models/push_notification_response.py +++ b/activitysmith_openapi/models/push_notification_response.py @@ -18,8 +18,9 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from typing import Optional, Set from typing_extensions import Self @@ -31,8 +32,9 @@ class PushNotificationResponse(BaseModel): devices_notified: Optional[StrictInt] = None users_notified: Optional[StrictInt] = None effective_channel_slugs: Optional[List[StrictStr]] = None + tags: Optional[List[Annotated[str, Field(min_length=1, strict=True, max_length=64)]]] = Field(default=None, description="Optional tags to organize and filter notification history.") timestamp: datetime - __properties: ClassVar[List[str]] = ["success", "devices_notified", "users_notified", "effective_channel_slugs", "timestamp"] + __properties: ClassVar[List[str]] = ["success", "devices_notified", "users_notified", "effective_channel_slugs", "tags", "timestamp"] model_config = ConfigDict( populate_by_name=True, @@ -89,6 +91,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "devices_notified": obj.get("devices_notified"), "users_notified": obj.get("users_notified"), "effective_channel_slugs": obj.get("effective_channel_slugs"), + "tags": obj.get("tags"), "timestamp": obj.get("timestamp") }) return _obj diff --git a/activitysmith_openapi/test/test_app_icon_badges_api.py b/activitysmith_openapi/test/test_app_icon_badges_api.py index 00b0e62..c8b2855 100644 --- a/activitysmith_openapi/test/test_app_icon_badges_api.py +++ b/activitysmith_openapi/test/test_app_icon_badges_api.py @@ -29,7 +29,7 @@ def tearDown(self) -> None: def test_update_app_icon_badge_count(self) -> None: """Test case for update_app_icon_badge_count - Update App Icon Badge Count + Set App Icon Badge Count """ pass diff --git a/activitysmith_openapi/test/test_live_activity_start_request.py b/activitysmith_openapi/test/test_live_activity_start_request.py index b6ee970..beb6dcb 100644 --- a/activitysmith_openapi/test/test_live_activity_start_request.py +++ b/activitysmith_openapi/test/test_live_activity_start_request.py @@ -77,7 +77,10 @@ def make_instance(self, include_optional) -> LiveActivityStartRequest: target = activitysmith_openapi.models.channel_target.ChannelTarget( channels = [ '' - ], ) + ], ), + tags = [ + 'gB:9JLe6iL71-aa-.Ctq:dcsc.3-8:1gAa8Xa6u61ArrlGpCQjkQVRmfnjddwcDM0' + ] ) else: return LiveActivityStartRequest( diff --git a/activitysmith_openapi/test/test_live_activity_start_response.py b/activitysmith_openapi/test/test_live_activity_start_response.py index 79922ad..83930fa 100644 --- a/activitysmith_openapi/test/test_live_activity_start_response.py +++ b/activitysmith_openapi/test/test_live_activity_start_response.py @@ -42,6 +42,9 @@ def make_instance(self, include_optional) -> LiveActivityStartResponse: effective_channel_slugs = [ '' ], + tags = [ + 'gB:9JLe6iL71-aa-.Ctq:dcsc.3-8:1gAa8Xa6u61ArrlGpCQjkQVRmfnjddwcDM0' + ], timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') ) else: diff --git a/activitysmith_openapi/test/test_live_activity_stream_put_response.py b/activitysmith_openapi/test/test_live_activity_stream_put_response.py index fd41037..8db94ca 100644 --- a/activitysmith_openapi/test/test_live_activity_stream_put_response.py +++ b/activitysmith_openapi/test/test_live_activity_stream_put_response.py @@ -46,6 +46,9 @@ def make_instance(self, include_optional) -> LiveActivityStreamPutResponse: effective_channel_slugs = [ '' ], + tags = [ + 'gB:9JLe6iL71-aa-.Ctq:dcsc.3-8:1gAa8Xa6u61ArrlGpCQjkQVRmfnjddwcDM0' + ], timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') ) else: diff --git a/activitysmith_openapi/test/test_live_activity_stream_request.py b/activitysmith_openapi/test/test_live_activity_stream_request.py index 2bb40e1..d63a709 100644 --- a/activitysmith_openapi/test/test_live_activity_stream_request.py +++ b/activitysmith_openapi/test/test_live_activity_stream_request.py @@ -82,7 +82,10 @@ def make_instance(self, include_optional) -> LiveActivityStreamRequest: target = activitysmith_openapi.models.channel_target.ChannelTarget( channels = [ '' - ], ) + ], ), + tags = [ + 'gB:9JLe6iL71-aa-.Ctq:dcsc.3-8:1gAa8Xa6u61ArrlGpCQjkQVRmfnjddwcDM0' + ] ) else: return LiveActivityStreamRequest( diff --git a/activitysmith_openapi/test/test_push_notification_request.py b/activitysmith_openapi/test/test_push_notification_request.py index 52e38c8..7139f55 100644 --- a/activitysmith_openapi/test/test_push_notification_request.py +++ b/activitysmith_openapi/test/test_push_notification_request.py @@ -51,7 +51,10 @@ def make_instance(self, include_optional) -> PushNotificationRequest: target = activitysmith_openapi.models.channel_target.ChannelTarget( channels = [ '' - ], ) + ], ), + tags = [ + 'gB:9JLe6iL71-aa-.Ctq:dcsc.3-8:1gAa8Xa6u61ArrlGpCQjkQVRmfnjddwcDM0' + ] ) else: return PushNotificationRequest( diff --git a/activitysmith_openapi/test/test_push_notification_response.py b/activitysmith_openapi/test/test_push_notification_response.py index 04d996d..74c30dc 100644 --- a/activitysmith_openapi/test/test_push_notification_response.py +++ b/activitysmith_openapi/test/test_push_notification_response.py @@ -41,6 +41,9 @@ def make_instance(self, include_optional) -> PushNotificationResponse: effective_channel_slugs = [ '' ], + tags = [ + 'gB:9JLe6iL71-aa-.Ctq:dcsc.3-8:1gAa8Xa6u61ArrlGpCQjkQVRmfnjddwcDM0' + ], timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') ) else: diff --git a/pyproject.toml b/pyproject.toml index f249411..50a91e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "activitysmith" -version = "1.9.0" +version = "1.10.0" description = "Official ActivitySmith Python SDK" readme = "README.md" requires-python = ">=3.9" diff --git a/tests/test_resources.py b/tests/test_resources.py index e5f948e..b9b728c 100644 --- a/tests/test_resources.py +++ b/tests/test_resources.py @@ -121,6 +121,7 @@ def test_notifications_named_fields(monkeypatch): title="New subscription 💸", message="Customer upgraded to Pro plan", channels="sales,customer-success", + tags=["user:382", "billing"], ) assert client.notifications._api.calls == [ @@ -129,6 +130,7 @@ def test_notifications_named_fields(monkeypatch): "title": "New subscription 💸", "message": "Customer upgraded to Pro plan", "target": {"channels": ["sales", "customer-success"]}, + "tags": ["user:382", "billing"], } }, ] @@ -292,7 +294,7 @@ def test_live_activities_start_maps_channels_to_target(monkeypatch): "channels": ["devs", "ops"], } - client.live_activities.start(payload) + client.live_activities.start(payload, tags=["user:382", "deployment"]) client.live_activities.start_live_activity(payload) expected = { @@ -305,7 +307,15 @@ def test_live_activities_start_maps_channels_to_target(monkeypatch): "target": {"channels": ["devs", "ops"]}, } assert client.live_activities._api.calls == [ - ("start", {"live_activity_start_request": expected}), + ( + "start", + { + "live_activity_start_request": { + **expected, + "tags": ["user:382", "deployment"], + } + }, + ), ("start", {"live_activity_start_request": expected}), ] @@ -672,7 +682,11 @@ def test_live_activities_stream_short_and_legacy_aliases(monkeypatch): } } - client.live_activities.stream("prod-web-1", stream_payload) + client.live_activities.stream( + "prod-web-1", + stream_payload, + tags=["user:382", "environment:production"], + ) client.live_activities.end_stream("prod-web-1", end_payload) client.live_activities.reconcile_live_activity_stream("prod-web-1", stream_payload) client.live_activities.end_live_activity_stream("prod-web-1", end_payload) @@ -686,7 +700,10 @@ def test_live_activities_stream_short_and_legacy_aliases(monkeypatch): "stream", { "stream_key": "prod-web-1", - "live_activity_stream_request": expected_stream, + "live_activity_stream_request": { + **expected_stream, + "tags": ["user:382", "environment:production"], + }, }, ), (