activitysmith 1.4.2__tar.gz → 1.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {activitysmith-1.4.2 → activitysmith-1.5.0}/PKG-INFO +43 -3
- {activitysmith-1.4.2 → activitysmith-1.5.0}/README.md +42 -2
- activitysmith-1.5.0/activitysmith/__init__.py +19 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith/client.py +98 -2
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith.egg-info/PKG-INFO +43 -3
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith.egg-info/SOURCES.txt +6 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/__init__.py +4 -1
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/api/live_activities_api.py +9 -9
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/api_client.py +1 -1
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/configuration.py +1 -1
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/__init__.py +3 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/activity_metric.py +2 -2
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/content_state_end.py +26 -12
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/content_state_start.py +26 -12
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/content_state_update.py +26 -12
- activitysmith-1.5.0/activitysmith_openapi/models/live_activity_alert_badge.py +104 -0
- activitysmith-1.5.0/activitysmith_openapi/models/live_activity_alert_icon.py +104 -0
- activitysmith-1.5.0/activitysmith_openapi/models/live_activity_color.py +45 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/stream_content_state.py +26 -12
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_content_state_end.py +4 -1
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_content_state_start.py +4 -1
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_content_state_update.py +4 -1
- activitysmith-1.5.0/activitysmith_openapi/test/test_live_activity_alert_badge.py +53 -0
- activitysmith-1.5.0/activitysmith_openapi/test/test_live_activity_alert_icon.py +53 -0
- activitysmith-1.5.0/activitysmith_openapi/test/test_live_activity_color.py +33 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_stream_content_state.py +4 -1
- {activitysmith-1.4.2 → activitysmith-1.5.0}/pyproject.toml +1 -1
- {activitysmith-1.4.2 → activitysmith-1.5.0}/tests/test_resources.py +63 -1
- activitysmith-1.4.2/activitysmith/__init__.py +0 -3
- {activitysmith-1.4.2 → activitysmith-1.5.0}/LICENSE +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith.egg-info/dependency_links.txt +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith.egg-info/requires.txt +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith.egg-info/top_level.txt +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/api/__init__.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/api/metrics_api.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/api/push_notifications_api.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/api_response.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/exceptions.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/activity_metric_value.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/alert_payload.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/bad_request_error.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/channel_target.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/forbidden_error.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/live_activity_action.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/live_activity_action_type.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/live_activity_end_request.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/live_activity_end_response.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/live_activity_limit_error.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/live_activity_start_request.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/live_activity_start_response.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/live_activity_stream_delete_request.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/live_activity_stream_delete_response.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/live_activity_stream_put_response.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/live_activity_stream_request.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/live_activity_update_request.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/live_activity_update_response.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/live_activity_webhook_method.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/metric_error.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/metric_value_update_request.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/metric_value_update_request_value.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/metric_value_update_response.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/no_recipients_error.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/not_found_error.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/push_notification_action.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/push_notification_action_type.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/push_notification_request.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/push_notification_response.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/push_notification_webhook_method.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/rate_limit_error.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/models/send_push_notification429_response.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/rest.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/__init__.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_activity_metric.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_activity_metric_value.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_alert_payload.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_bad_request_error.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_channel_target.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_forbidden_error.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_live_activities_api.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_live_activity_action.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_live_activity_action_type.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_live_activity_end_request.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_live_activity_end_response.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_live_activity_limit_error.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_live_activity_start_request.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_live_activity_start_response.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_live_activity_stream_delete_request.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_live_activity_stream_delete_response.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_live_activity_stream_put_response.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_live_activity_stream_request.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_live_activity_update_request.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_live_activity_update_response.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_live_activity_webhook_method.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_metric_error.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_metric_value_update_request.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_metric_value_update_request_value.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_metric_value_update_response.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_metrics_api.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_no_recipients_error.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_not_found_error.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_push_notification_action.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_push_notification_action_type.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_push_notification_request.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_push_notification_response.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_push_notification_webhook_method.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_push_notifications_api.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_rate_limit_error.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/test/test_send_push_notification429_response.py +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/setup.cfg +0 -0
- {activitysmith-1.4.2 → activitysmith-1.5.0}/tests/test_smoke.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: activitysmith
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.5.0
|
|
4
4
|
Summary: Official ActivitySmith Python SDK
|
|
5
5
|
Author-email: ActivitySmith <adam@activitysmith.com>
|
|
6
6
|
License: MIT
|
|
@@ -61,7 +61,14 @@ python -m pip install .
|
|
|
61
61
|
|
|
62
62
|
```python
|
|
63
63
|
import os
|
|
64
|
-
from activitysmith import
|
|
64
|
+
from activitysmith import (
|
|
65
|
+
ActivitySmith,
|
|
66
|
+
action,
|
|
67
|
+
alert_badge,
|
|
68
|
+
alert_icon,
|
|
69
|
+
content_state,
|
|
70
|
+
metric,
|
|
71
|
+
)
|
|
65
72
|
|
|
66
73
|
activitysmith = ActivitySmith(
|
|
67
74
|
api_key=os.environ["ACTIVITYSMITH_API_KEY"],
|
|
@@ -147,12 +154,13 @@ activitysmith.notifications.send(
|
|
|
147
154
|
|
|
148
155
|
## Live Activities
|
|
149
156
|
|
|
150
|
-
There are
|
|
157
|
+
There are five types of Live Activities:
|
|
151
158
|
|
|
152
159
|
- `stats`: best for showing business numbers side by side, such as revenue, sales, new users, conversion, refunds, or any other value you want visible at a glance
|
|
153
160
|
- `metrics`: best for live percentage values that change often, like server CPU, memory usage, disk usage, or error rate
|
|
154
161
|
- `segmented_progress`: best for anything that moves through clear stages, like deployments, onboarding flows, backups, ETL pipelines, migrations, and AI agent runs
|
|
155
162
|
- `progress`: best for tracking real-time progress with percentage, like tasks, backups, migrations, syncs, or uploads
|
|
163
|
+
- `alert`: best for status updates, such as feature adoption, reactivation, onboarding blockers, incidents, escalations, and other operational states
|
|
156
164
|
|
|
157
165
|
### Start & Update Live Activity
|
|
158
166
|
|
|
@@ -257,6 +265,37 @@ activitysmith.live_activities.stream(
|
|
|
257
265
|
)
|
|
258
266
|
```
|
|
259
267
|
|
|
268
|
+
#### Alert
|
|
269
|
+
|
|
270
|
+
<p align="center">
|
|
271
|
+
<img
|
|
272
|
+
src="https://cdn.activitysmith.com/features/alert-live-activity.png"
|
|
273
|
+
alt="Alert Live Activity stream example"
|
|
274
|
+
width="680"
|
|
275
|
+
/>
|
|
276
|
+
</p>
|
|
277
|
+
|
|
278
|
+
```python
|
|
279
|
+
activitysmith.live_activities.stream(
|
|
280
|
+
"customer-ops",
|
|
281
|
+
content_state=content_state(
|
|
282
|
+
title="Reactivation",
|
|
283
|
+
message="Lumen came back after 2 weeks",
|
|
284
|
+
type="alert",
|
|
285
|
+
icon=alert_icon("cloud.sun", color="yellow"),
|
|
286
|
+
badge=alert_badge("Customer", color="magenta"),
|
|
287
|
+
),
|
|
288
|
+
)
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
The `icon.symbol` value is an Apple SF Symbol name. Browse the catalog with one of these tools:
|
|
292
|
+
|
|
293
|
+
- [ActivitySmith app](https://apps.apple.com/us/app/activitysmith/id6752254835) - Open Settings -> SF Symbols to browse 45 hand-picked icons ready to use
|
|
294
|
+
- [SF Symbols](https://developer.apple.com/sf-symbols/) - Apple's official macOS app
|
|
295
|
+
- [Interactful](https://apps.apple.com/app/interactful/id1528095640) - free third-party iOS app listing all SF Symbols under Foundations -> Iconography
|
|
296
|
+
|
|
297
|
+
`icon` and `badge` are optional. If you omit either one, that element is not shown in the Live Activity.
|
|
298
|
+
|
|
260
299
|
### End Live Activity
|
|
261
300
|
|
|
262
301
|
Call `end_stream(...)` with the same `stream_key` to dismiss the Live Activity. You can include final values before it is removed. By default, iOS removes the Live Activity after two minutes. Set `auto_dismiss_minutes` to choose a different dismissal time, including `0` for immediate dismissal.
|
|
@@ -280,6 +319,7 @@ activitysmith.live_activities.end_stream(
|
|
|
280
319
|
### Live Activity Action
|
|
281
320
|
|
|
282
321
|
Live Activities can include one optional action button. Use it to open a URL from the Live Activity or trigger a backend webhook.
|
|
322
|
+
For Alert Live Activities, set `content_state.color` to tint the action button. `icon.color` and `badge.color` only affect the icon and badge.
|
|
283
323
|
|
|
284
324
|
<p align="center">
|
|
285
325
|
<img
|
|
@@ -39,7 +39,14 @@ python -m pip install .
|
|
|
39
39
|
|
|
40
40
|
```python
|
|
41
41
|
import os
|
|
42
|
-
from activitysmith import
|
|
42
|
+
from activitysmith import (
|
|
43
|
+
ActivitySmith,
|
|
44
|
+
action,
|
|
45
|
+
alert_badge,
|
|
46
|
+
alert_icon,
|
|
47
|
+
content_state,
|
|
48
|
+
metric,
|
|
49
|
+
)
|
|
43
50
|
|
|
44
51
|
activitysmith = ActivitySmith(
|
|
45
52
|
api_key=os.environ["ACTIVITYSMITH_API_KEY"],
|
|
@@ -125,12 +132,13 @@ activitysmith.notifications.send(
|
|
|
125
132
|
|
|
126
133
|
## Live Activities
|
|
127
134
|
|
|
128
|
-
There are
|
|
135
|
+
There are five types of Live Activities:
|
|
129
136
|
|
|
130
137
|
- `stats`: best for showing business numbers side by side, such as revenue, sales, new users, conversion, refunds, or any other value you want visible at a glance
|
|
131
138
|
- `metrics`: best for live percentage values that change often, like server CPU, memory usage, disk usage, or error rate
|
|
132
139
|
- `segmented_progress`: best for anything that moves through clear stages, like deployments, onboarding flows, backups, ETL pipelines, migrations, and AI agent runs
|
|
133
140
|
- `progress`: best for tracking real-time progress with percentage, like tasks, backups, migrations, syncs, or uploads
|
|
141
|
+
- `alert`: best for status updates, such as feature adoption, reactivation, onboarding blockers, incidents, escalations, and other operational states
|
|
134
142
|
|
|
135
143
|
### Start & Update Live Activity
|
|
136
144
|
|
|
@@ -235,6 +243,37 @@ activitysmith.live_activities.stream(
|
|
|
235
243
|
)
|
|
236
244
|
```
|
|
237
245
|
|
|
246
|
+
#### Alert
|
|
247
|
+
|
|
248
|
+
<p align="center">
|
|
249
|
+
<img
|
|
250
|
+
src="https://cdn.activitysmith.com/features/alert-live-activity.png"
|
|
251
|
+
alt="Alert Live Activity stream example"
|
|
252
|
+
width="680"
|
|
253
|
+
/>
|
|
254
|
+
</p>
|
|
255
|
+
|
|
256
|
+
```python
|
|
257
|
+
activitysmith.live_activities.stream(
|
|
258
|
+
"customer-ops",
|
|
259
|
+
content_state=content_state(
|
|
260
|
+
title="Reactivation",
|
|
261
|
+
message="Lumen came back after 2 weeks",
|
|
262
|
+
type="alert",
|
|
263
|
+
icon=alert_icon("cloud.sun", color="yellow"),
|
|
264
|
+
badge=alert_badge("Customer", color="magenta"),
|
|
265
|
+
),
|
|
266
|
+
)
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
The `icon.symbol` value is an Apple SF Symbol name. Browse the catalog with one of these tools:
|
|
270
|
+
|
|
271
|
+
- [ActivitySmith app](https://apps.apple.com/us/app/activitysmith/id6752254835) - Open Settings -> SF Symbols to browse 45 hand-picked icons ready to use
|
|
272
|
+
- [SF Symbols](https://developer.apple.com/sf-symbols/) - Apple's official macOS app
|
|
273
|
+
- [Interactful](https://apps.apple.com/app/interactful/id1528095640) - free third-party iOS app listing all SF Symbols under Foundations -> Iconography
|
|
274
|
+
|
|
275
|
+
`icon` and `badge` are optional. If you omit either one, that element is not shown in the Live Activity.
|
|
276
|
+
|
|
238
277
|
### End Live Activity
|
|
239
278
|
|
|
240
279
|
Call `end_stream(...)` with the same `stream_key` to dismiss the Live Activity. You can include final values before it is removed. By default, iOS removes the Live Activity after two minutes. Set `auto_dismiss_minutes` to choose a different dismissal time, including `0` for immediate dismissal.
|
|
@@ -258,6 +297,7 @@ activitysmith.live_activities.end_stream(
|
|
|
258
297
|
### Live Activity Action
|
|
259
298
|
|
|
260
299
|
Live Activities can include one optional action button. Use it to open a URL from the Live Activity or trigger a backend webhook.
|
|
300
|
+
For Alert Live Activities, set `content_state.color` to tint the action button. `icon.color` and `badge.color` only affect the icon and badge.
|
|
261
301
|
|
|
262
302
|
<p align="center">
|
|
263
303
|
<img
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from .client import (
|
|
2
|
+
ActivitySmith,
|
|
3
|
+
LiveActivityColor,
|
|
4
|
+
action,
|
|
5
|
+
alert_badge,
|
|
6
|
+
alert_icon,
|
|
7
|
+
content_state,
|
|
8
|
+
metric,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
__all__ = [
|
|
12
|
+
"ActivitySmith",
|
|
13
|
+
"LiveActivityColor",
|
|
14
|
+
"action",
|
|
15
|
+
"alert_badge",
|
|
16
|
+
"alert_icon",
|
|
17
|
+
"content_state",
|
|
18
|
+
"metric",
|
|
19
|
+
]
|
|
@@ -10,7 +10,7 @@ from activitysmith_openapi.api.live_activities_api import LiveActivitiesApi
|
|
|
10
10
|
from activitysmith_openapi.api.metrics_api import MetricsApi
|
|
11
11
|
from activitysmith_openapi.api.push_notifications_api import PushNotificationsApi
|
|
12
12
|
|
|
13
|
-
SDK_VERSION = "1.
|
|
13
|
+
SDK_VERSION = "1.5.0"
|
|
14
14
|
SDK_HEADER_NAME = "X-ActivitySmith-SDK"
|
|
15
15
|
SDK_HEADER_VALUE = f"python-v{SDK_VERSION}"
|
|
16
16
|
|
|
@@ -122,11 +122,44 @@ def action(
|
|
|
122
122
|
)
|
|
123
123
|
|
|
124
124
|
|
|
125
|
+
def alert_icon(
|
|
126
|
+
symbol: str,
|
|
127
|
+
*,
|
|
128
|
+
color: str | None = None,
|
|
129
|
+
) -> dict[str, Any]:
|
|
130
|
+
return _compact_dict(
|
|
131
|
+
{
|
|
132
|
+
"symbol": symbol,
|
|
133
|
+
"color": color,
|
|
134
|
+
}
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
def alert_badge(
|
|
139
|
+
title: str,
|
|
140
|
+
*,
|
|
141
|
+
color: str | None = None,
|
|
142
|
+
) -> dict[str, Any]:
|
|
143
|
+
return _compact_dict(
|
|
144
|
+
{
|
|
145
|
+
"title": title,
|
|
146
|
+
"color": color,
|
|
147
|
+
}
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
def _normalize_live_activity_content_state(content_state: Any) -> Any:
|
|
152
|
+
return content_state
|
|
153
|
+
|
|
154
|
+
|
|
125
155
|
def content_state(
|
|
126
156
|
title: str,
|
|
127
157
|
*,
|
|
128
158
|
type: str | None = None,
|
|
129
159
|
subtitle: str | None = None,
|
|
160
|
+
message: str | None = None,
|
|
161
|
+
icon: Any | None = None,
|
|
162
|
+
badge: Any | None = None,
|
|
130
163
|
metrics: Any | None = None,
|
|
131
164
|
number_of_steps: int | None = None,
|
|
132
165
|
current_step: int | None = None,
|
|
@@ -138,11 +171,14 @@ def content_state(
|
|
|
138
171
|
auto_dismiss_seconds: int | None = None,
|
|
139
172
|
auto_dismiss_minutes: int | None = None,
|
|
140
173
|
) -> dict[str, Any]:
|
|
141
|
-
|
|
174
|
+
state = _compact_dict(
|
|
142
175
|
{
|
|
143
176
|
"title": title,
|
|
144
177
|
"subtitle": subtitle,
|
|
145
178
|
"type": type,
|
|
179
|
+
"message": message,
|
|
180
|
+
"icon": icon,
|
|
181
|
+
"badge": badge,
|
|
146
182
|
"metrics": metrics,
|
|
147
183
|
"number_of_steps": number_of_steps,
|
|
148
184
|
"current_step": current_step,
|
|
@@ -155,6 +191,7 @@ def content_state(
|
|
|
155
191
|
"auto_dismiss_minutes": auto_dismiss_minutes,
|
|
156
192
|
}
|
|
157
193
|
)
|
|
194
|
+
return _normalize_live_activity_content_state(state)
|
|
158
195
|
|
|
159
196
|
|
|
160
197
|
def _build_push_request(
|
|
@@ -208,6 +245,7 @@ class LiveActivityColor:
|
|
|
208
245
|
RED = "red"
|
|
209
246
|
ORANGE = "orange"
|
|
210
247
|
YELLOW = "yellow"
|
|
248
|
+
GRAY = "gray"
|
|
211
249
|
|
|
212
250
|
|
|
213
251
|
def _build_live_activity_request(
|
|
@@ -218,6 +256,9 @@ def _build_live_activity_request(
|
|
|
218
256
|
title: Any | None = None,
|
|
219
257
|
subtitle: Any | None = None,
|
|
220
258
|
type: Any | None = None,
|
|
259
|
+
message: Any | None = None,
|
|
260
|
+
icon: Any | None = None,
|
|
261
|
+
badge: Any | None = None,
|
|
221
262
|
metrics: Any | None = None,
|
|
222
263
|
number_of_steps: Any | None = None,
|
|
223
264
|
current_step: Any | None = None,
|
|
@@ -238,6 +279,9 @@ def _build_live_activity_request(
|
|
|
238
279
|
"title": title,
|
|
239
280
|
"subtitle": subtitle,
|
|
240
281
|
"type": type,
|
|
282
|
+
"message": message,
|
|
283
|
+
"icon": icon,
|
|
284
|
+
"badge": badge,
|
|
241
285
|
"metrics": metrics,
|
|
242
286
|
"number_of_steps": number_of_steps,
|
|
243
287
|
"current_step": current_step,
|
|
@@ -250,6 +294,7 @@ def _build_live_activity_request(
|
|
|
250
294
|
"auto_dismiss_minutes": auto_dismiss_minutes,
|
|
251
295
|
}
|
|
252
296
|
)
|
|
297
|
+
content_state_fields = _normalize_live_activity_content_state(content_state_fields)
|
|
253
298
|
request_fields = _compact_dict(
|
|
254
299
|
{
|
|
255
300
|
"activity_id": activity_id,
|
|
@@ -273,6 +318,7 @@ def _build_live_activity_request(
|
|
|
273
318
|
)
|
|
274
319
|
|
|
275
320
|
if content_state is not None:
|
|
321
|
+
content_state = _normalize_live_activity_content_state(content_state)
|
|
276
322
|
existing_content_state = normalized.get("content_state")
|
|
277
323
|
if existing_content_state is None:
|
|
278
324
|
normalized["content_state"] = content_state
|
|
@@ -289,6 +335,9 @@ def _build_live_activity_request(
|
|
|
289
335
|
normalized["content_state"] = {**existing_content_state, **content_state_fields}
|
|
290
336
|
else:
|
|
291
337
|
raise TypeError("ActivitySmith: content_state must be a dict")
|
|
338
|
+
normalized["content_state"] = _normalize_live_activity_content_state(
|
|
339
|
+
normalized["content_state"]
|
|
340
|
+
)
|
|
292
341
|
|
|
293
342
|
normalized.update(request_fields)
|
|
294
343
|
return normalized
|
|
@@ -337,6 +386,7 @@ class LiveActivitiesResource:
|
|
|
337
386
|
TYPE_PROGRESS = "progress"
|
|
338
387
|
TYPE_METRICS = "metrics"
|
|
339
388
|
TYPE_STATS = "stats"
|
|
389
|
+
TYPE_ALERT = "alert"
|
|
340
390
|
|
|
341
391
|
def __init__(self, api: LiveActivitiesApi) -> None:
|
|
342
392
|
self._api = api
|
|
@@ -351,6 +401,22 @@ class LiveActivitiesResource:
|
|
|
351
401
|
) -> dict[str, Any]:
|
|
352
402
|
return metric(label, value, unit=unit, color=color)
|
|
353
403
|
|
|
404
|
+
@staticmethod
|
|
405
|
+
def alert_icon(
|
|
406
|
+
symbol: str,
|
|
407
|
+
*,
|
|
408
|
+
color: str | None = None,
|
|
409
|
+
) -> dict[str, Any]:
|
|
410
|
+
return alert_icon(symbol, color=color)
|
|
411
|
+
|
|
412
|
+
@staticmethod
|
|
413
|
+
def alert_badge(
|
|
414
|
+
title: str,
|
|
415
|
+
*,
|
|
416
|
+
color: str | None = None,
|
|
417
|
+
) -> dict[str, Any]:
|
|
418
|
+
return alert_badge(title, color=color)
|
|
419
|
+
|
|
354
420
|
def start(
|
|
355
421
|
self,
|
|
356
422
|
request: Any | None = None,
|
|
@@ -359,6 +425,9 @@ class LiveActivitiesResource:
|
|
|
359
425
|
title: Any | None = None,
|
|
360
426
|
subtitle: Any | None = None,
|
|
361
427
|
type: Any | None = None,
|
|
428
|
+
message: Any | None = None,
|
|
429
|
+
icon: Any | None = None,
|
|
430
|
+
badge: Any | None = None,
|
|
362
431
|
metrics: Any | None = None,
|
|
363
432
|
number_of_steps: Any | None = None,
|
|
364
433
|
current_step: Any | None = None,
|
|
@@ -378,6 +447,9 @@ class LiveActivitiesResource:
|
|
|
378
447
|
title=title,
|
|
379
448
|
subtitle=subtitle,
|
|
380
449
|
type=type,
|
|
450
|
+
message=message,
|
|
451
|
+
icon=icon,
|
|
452
|
+
badge=badge,
|
|
381
453
|
metrics=metrics,
|
|
382
454
|
number_of_steps=number_of_steps,
|
|
383
455
|
current_step=current_step,
|
|
@@ -404,6 +476,9 @@ class LiveActivitiesResource:
|
|
|
404
476
|
title: Any | None = None,
|
|
405
477
|
subtitle: Any | None = None,
|
|
406
478
|
type: Any | None = None,
|
|
479
|
+
message: Any | None = None,
|
|
480
|
+
icon: Any | None = None,
|
|
481
|
+
badge: Any | None = None,
|
|
407
482
|
metrics: Any | None = None,
|
|
408
483
|
number_of_steps: Any | None = None,
|
|
409
484
|
current_step: Any | None = None,
|
|
@@ -421,6 +496,9 @@ class LiveActivitiesResource:
|
|
|
421
496
|
title=title,
|
|
422
497
|
subtitle=subtitle,
|
|
423
498
|
type=type,
|
|
499
|
+
message=message,
|
|
500
|
+
icon=icon,
|
|
501
|
+
badge=badge,
|
|
424
502
|
metrics=metrics,
|
|
425
503
|
number_of_steps=number_of_steps,
|
|
426
504
|
current_step=current_step,
|
|
@@ -442,6 +520,9 @@ class LiveActivitiesResource:
|
|
|
442
520
|
title: Any | None = None,
|
|
443
521
|
subtitle: Any | None = None,
|
|
444
522
|
type: Any | None = None,
|
|
523
|
+
message: Any | None = None,
|
|
524
|
+
icon: Any | None = None,
|
|
525
|
+
badge: Any | None = None,
|
|
445
526
|
metrics: Any | None = None,
|
|
446
527
|
number_of_steps: Any | None = None,
|
|
447
528
|
current_step: Any | None = None,
|
|
@@ -460,6 +541,9 @@ class LiveActivitiesResource:
|
|
|
460
541
|
title=title,
|
|
461
542
|
subtitle=subtitle,
|
|
462
543
|
type=type,
|
|
544
|
+
message=message,
|
|
545
|
+
icon=icon,
|
|
546
|
+
badge=badge,
|
|
463
547
|
metrics=metrics,
|
|
464
548
|
number_of_steps=number_of_steps,
|
|
465
549
|
current_step=current_step,
|
|
@@ -482,6 +566,9 @@ class LiveActivitiesResource:
|
|
|
482
566
|
title: Any | None = None,
|
|
483
567
|
subtitle: Any | None = None,
|
|
484
568
|
type: Any | None = None,
|
|
569
|
+
message: Any | None = None,
|
|
570
|
+
icon: Any | None = None,
|
|
571
|
+
badge: Any | None = None,
|
|
485
572
|
metrics: Any | None = None,
|
|
486
573
|
number_of_steps: Any | None = None,
|
|
487
574
|
current_step: Any | None = None,
|
|
@@ -501,6 +588,9 @@ class LiveActivitiesResource:
|
|
|
501
588
|
title=title,
|
|
502
589
|
subtitle=subtitle,
|
|
503
590
|
type=type,
|
|
591
|
+
message=message,
|
|
592
|
+
icon=icon,
|
|
593
|
+
badge=badge,
|
|
504
594
|
metrics=metrics,
|
|
505
595
|
number_of_steps=number_of_steps,
|
|
506
596
|
current_step=current_step,
|
|
@@ -528,6 +618,9 @@ class LiveActivitiesResource:
|
|
|
528
618
|
title: Any | None = None,
|
|
529
619
|
subtitle: Any | None = None,
|
|
530
620
|
type: Any | None = None,
|
|
621
|
+
message: Any | None = None,
|
|
622
|
+
icon: Any | None = None,
|
|
623
|
+
badge: Any | None = None,
|
|
531
624
|
metrics: Any | None = None,
|
|
532
625
|
number_of_steps: Any | None = None,
|
|
533
626
|
current_step: Any | None = None,
|
|
@@ -546,6 +639,9 @@ class LiveActivitiesResource:
|
|
|
546
639
|
title=title,
|
|
547
640
|
subtitle=subtitle,
|
|
548
641
|
type=type,
|
|
642
|
+
message=message,
|
|
643
|
+
icon=icon,
|
|
644
|
+
badge=badge,
|
|
549
645
|
metrics=metrics,
|
|
550
646
|
number_of_steps=number_of_steps,
|
|
551
647
|
current_step=current_step,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: activitysmith
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.5.0
|
|
4
4
|
Summary: Official ActivitySmith Python SDK
|
|
5
5
|
Author-email: ActivitySmith <adam@activitysmith.com>
|
|
6
6
|
License: MIT
|
|
@@ -61,7 +61,14 @@ python -m pip install .
|
|
|
61
61
|
|
|
62
62
|
```python
|
|
63
63
|
import os
|
|
64
|
-
from activitysmith import
|
|
64
|
+
from activitysmith import (
|
|
65
|
+
ActivitySmith,
|
|
66
|
+
action,
|
|
67
|
+
alert_badge,
|
|
68
|
+
alert_icon,
|
|
69
|
+
content_state,
|
|
70
|
+
metric,
|
|
71
|
+
)
|
|
65
72
|
|
|
66
73
|
activitysmith = ActivitySmith(
|
|
67
74
|
api_key=os.environ["ACTIVITYSMITH_API_KEY"],
|
|
@@ -147,12 +154,13 @@ activitysmith.notifications.send(
|
|
|
147
154
|
|
|
148
155
|
## Live Activities
|
|
149
156
|
|
|
150
|
-
There are
|
|
157
|
+
There are five types of Live Activities:
|
|
151
158
|
|
|
152
159
|
- `stats`: best for showing business numbers side by side, such as revenue, sales, new users, conversion, refunds, or any other value you want visible at a glance
|
|
153
160
|
- `metrics`: best for live percentage values that change often, like server CPU, memory usage, disk usage, or error rate
|
|
154
161
|
- `segmented_progress`: best for anything that moves through clear stages, like deployments, onboarding flows, backups, ETL pipelines, migrations, and AI agent runs
|
|
155
162
|
- `progress`: best for tracking real-time progress with percentage, like tasks, backups, migrations, syncs, or uploads
|
|
163
|
+
- `alert`: best for status updates, such as feature adoption, reactivation, onboarding blockers, incidents, escalations, and other operational states
|
|
156
164
|
|
|
157
165
|
### Start & Update Live Activity
|
|
158
166
|
|
|
@@ -257,6 +265,37 @@ activitysmith.live_activities.stream(
|
|
|
257
265
|
)
|
|
258
266
|
```
|
|
259
267
|
|
|
268
|
+
#### Alert
|
|
269
|
+
|
|
270
|
+
<p align="center">
|
|
271
|
+
<img
|
|
272
|
+
src="https://cdn.activitysmith.com/features/alert-live-activity.png"
|
|
273
|
+
alt="Alert Live Activity stream example"
|
|
274
|
+
width="680"
|
|
275
|
+
/>
|
|
276
|
+
</p>
|
|
277
|
+
|
|
278
|
+
```python
|
|
279
|
+
activitysmith.live_activities.stream(
|
|
280
|
+
"customer-ops",
|
|
281
|
+
content_state=content_state(
|
|
282
|
+
title="Reactivation",
|
|
283
|
+
message="Lumen came back after 2 weeks",
|
|
284
|
+
type="alert",
|
|
285
|
+
icon=alert_icon("cloud.sun", color="yellow"),
|
|
286
|
+
badge=alert_badge("Customer", color="magenta"),
|
|
287
|
+
),
|
|
288
|
+
)
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
The `icon.symbol` value is an Apple SF Symbol name. Browse the catalog with one of these tools:
|
|
292
|
+
|
|
293
|
+
- [ActivitySmith app](https://apps.apple.com/us/app/activitysmith/id6752254835) - Open Settings -> SF Symbols to browse 45 hand-picked icons ready to use
|
|
294
|
+
- [SF Symbols](https://developer.apple.com/sf-symbols/) - Apple's official macOS app
|
|
295
|
+
- [Interactful](https://apps.apple.com/app/interactful/id1528095640) - free third-party iOS app listing all SF Symbols under Foundations -> Iconography
|
|
296
|
+
|
|
297
|
+
`icon` and `badge` are optional. If you omit either one, that element is not shown in the Live Activity.
|
|
298
|
+
|
|
260
299
|
### End Live Activity
|
|
261
300
|
|
|
262
301
|
Call `end_stream(...)` with the same `stream_key` to dismiss the Live Activity. You can include final values before it is removed. By default, iOS removes the Live Activity after two minutes. Set `auto_dismiss_minutes` to choose a different dismissal time, including `0` for immediate dismissal.
|
|
@@ -280,6 +319,7 @@ activitysmith.live_activities.end_stream(
|
|
|
280
319
|
### Live Activity Action
|
|
281
320
|
|
|
282
321
|
Live Activities can include one optional action button. Use it to open a URL from the Live Activity or trigger a backend webhook.
|
|
322
|
+
For Alert Live Activities, set `content_state.color` to tint the action button. `icon.color` and `badge.color` only affect the icon and badge.
|
|
283
323
|
|
|
284
324
|
<p align="center">
|
|
285
325
|
<img
|
|
@@ -30,6 +30,9 @@ activitysmith_openapi/models/content_state_update.py
|
|
|
30
30
|
activitysmith_openapi/models/forbidden_error.py
|
|
31
31
|
activitysmith_openapi/models/live_activity_action.py
|
|
32
32
|
activitysmith_openapi/models/live_activity_action_type.py
|
|
33
|
+
activitysmith_openapi/models/live_activity_alert_badge.py
|
|
34
|
+
activitysmith_openapi/models/live_activity_alert_icon.py
|
|
35
|
+
activitysmith_openapi/models/live_activity_color.py
|
|
33
36
|
activitysmith_openapi/models/live_activity_end_request.py
|
|
34
37
|
activitysmith_openapi/models/live_activity_end_response.py
|
|
35
38
|
activitysmith_openapi/models/live_activity_limit_error.py
|
|
@@ -69,6 +72,9 @@ activitysmith_openapi/test/test_forbidden_error.py
|
|
|
69
72
|
activitysmith_openapi/test/test_live_activities_api.py
|
|
70
73
|
activitysmith_openapi/test/test_live_activity_action.py
|
|
71
74
|
activitysmith_openapi/test/test_live_activity_action_type.py
|
|
75
|
+
activitysmith_openapi/test/test_live_activity_alert_badge.py
|
|
76
|
+
activitysmith_openapi/test/test_live_activity_alert_icon.py
|
|
77
|
+
activitysmith_openapi/test/test_live_activity_color.py
|
|
72
78
|
activitysmith_openapi/test/test_live_activity_end_request.py
|
|
73
79
|
activitysmith_openapi/test/test_live_activity_end_response.py
|
|
74
80
|
activitysmith_openapi/test/test_live_activity_limit_error.py
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
""" # noqa: E501
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
__version__ = "1.
|
|
17
|
+
__version__ = "1.4.2"
|
|
18
18
|
|
|
19
19
|
# import apis into sdk package
|
|
20
20
|
from activitysmith_openapi.api.live_activities_api import LiveActivitiesApi
|
|
@@ -44,6 +44,9 @@ from activitysmith_openapi.models.content_state_update import ContentStateUpdate
|
|
|
44
44
|
from activitysmith_openapi.models.forbidden_error import ForbiddenError
|
|
45
45
|
from activitysmith_openapi.models.live_activity_action import LiveActivityAction
|
|
46
46
|
from activitysmith_openapi.models.live_activity_action_type import LiveActivityActionType
|
|
47
|
+
from activitysmith_openapi.models.live_activity_alert_badge import LiveActivityAlertBadge
|
|
48
|
+
from activitysmith_openapi.models.live_activity_alert_icon import LiveActivityAlertIcon
|
|
49
|
+
from activitysmith_openapi.models.live_activity_color import LiveActivityColor
|
|
47
50
|
from activitysmith_openapi.models.live_activity_end_request import LiveActivityEndRequest
|
|
48
51
|
from activitysmith_openapi.models.live_activity_end_response import LiveActivityEndResponse
|
|
49
52
|
from activitysmith_openapi.models.live_activity_limit_error import LiveActivityLimitError
|
{activitysmith-1.4.2 → activitysmith-1.5.0}/activitysmith_openapi/api/live_activities_api.py
RENAMED
|
@@ -67,7 +67,7 @@ class LiveActivitiesApi:
|
|
|
67
67
|
) -> LiveActivityEndResponse:
|
|
68
68
|
"""End a Live Activity (legacy manual lifecycle)
|
|
69
69
|
|
|
70
|
-
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, and
|
|
70
|
+
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, and alert activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start.
|
|
71
71
|
|
|
72
72
|
:param live_activity_end_request: (required)
|
|
73
73
|
:type live_activity_end_request: LiveActivityEndRequest
|
|
@@ -136,7 +136,7 @@ class LiveActivitiesApi:
|
|
|
136
136
|
) -> ApiResponse[LiveActivityEndResponse]:
|
|
137
137
|
"""End a Live Activity (legacy manual lifecycle)
|
|
138
138
|
|
|
139
|
-
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, and
|
|
139
|
+
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, and alert activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start.
|
|
140
140
|
|
|
141
141
|
:param live_activity_end_request: (required)
|
|
142
142
|
:type live_activity_end_request: LiveActivityEndRequest
|
|
@@ -205,7 +205,7 @@ class LiveActivitiesApi:
|
|
|
205
205
|
) -> RESTResponseType:
|
|
206
206
|
"""End a Live Activity (legacy manual lifecycle)
|
|
207
207
|
|
|
208
|
-
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, and
|
|
208
|
+
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, and alert activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start.
|
|
209
209
|
|
|
210
210
|
:param live_activity_end_request: (required)
|
|
211
211
|
:type live_activity_end_request: LiveActivityEndRequest
|
|
@@ -940,7 +940,7 @@ class LiveActivitiesApi:
|
|
|
940
940
|
) -> LiveActivityStartResponse:
|
|
941
941
|
"""Start a Live Activity (legacy manual lifecycle)
|
|
942
942
|
|
|
943
|
-
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, and
|
|
943
|
+
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, and alert activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes.
|
|
944
944
|
|
|
945
945
|
:param live_activity_start_request: (required)
|
|
946
946
|
:type live_activity_start_request: LiveActivityStartRequest
|
|
@@ -1011,7 +1011,7 @@ class LiveActivitiesApi:
|
|
|
1011
1011
|
) -> ApiResponse[LiveActivityStartResponse]:
|
|
1012
1012
|
"""Start a Live Activity (legacy manual lifecycle)
|
|
1013
1013
|
|
|
1014
|
-
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, and
|
|
1014
|
+
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, and alert activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes.
|
|
1015
1015
|
|
|
1016
1016
|
:param live_activity_start_request: (required)
|
|
1017
1017
|
:type live_activity_start_request: LiveActivityStartRequest
|
|
@@ -1082,7 +1082,7 @@ class LiveActivitiesApi:
|
|
|
1082
1082
|
) -> RESTResponseType:
|
|
1083
1083
|
"""Start a Live Activity (legacy manual lifecycle)
|
|
1084
1084
|
|
|
1085
|
-
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, and
|
|
1085
|
+
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, and alert activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes.
|
|
1086
1086
|
|
|
1087
1087
|
:param live_activity_start_request: (required)
|
|
1088
1088
|
:type live_activity_start_request: LiveActivityStartRequest
|
|
@@ -1224,7 +1224,7 @@ class LiveActivitiesApi:
|
|
|
1224
1224
|
) -> LiveActivityUpdateResponse:
|
|
1225
1225
|
"""Update a Live Activity (legacy manual lifecycle)
|
|
1226
1226
|
|
|
1227
|
-
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, and
|
|
1227
|
+
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, and alert activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes.
|
|
1228
1228
|
|
|
1229
1229
|
:param live_activity_update_request: (required)
|
|
1230
1230
|
:type live_activity_update_request: LiveActivityUpdateRequest
|
|
@@ -1293,7 +1293,7 @@ class LiveActivitiesApi:
|
|
|
1293
1293
|
) -> ApiResponse[LiveActivityUpdateResponse]:
|
|
1294
1294
|
"""Update a Live Activity (legacy manual lifecycle)
|
|
1295
1295
|
|
|
1296
|
-
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, and
|
|
1296
|
+
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, and alert activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes.
|
|
1297
1297
|
|
|
1298
1298
|
:param live_activity_update_request: (required)
|
|
1299
1299
|
:type live_activity_update_request: LiveActivityUpdateRequest
|
|
@@ -1362,7 +1362,7 @@ class LiveActivitiesApi:
|
|
|
1362
1362
|
) -> RESTResponseType:
|
|
1363
1363
|
"""Update a Live Activity (legacy manual lifecycle)
|
|
1364
1364
|
|
|
1365
|
-
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, and
|
|
1365
|
+
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, and alert activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes.
|
|
1366
1366
|
|
|
1367
1367
|
:param live_activity_update_request: (required)
|
|
1368
1368
|
:type live_activity_update_request: LiveActivityUpdateRequest
|
|
@@ -88,7 +88,7 @@ class ApiClient:
|
|
|
88
88
|
self.default_headers[header_name] = header_value
|
|
89
89
|
self.cookie = cookie
|
|
90
90
|
# Set default User-Agent.
|
|
91
|
-
self.user_agent = 'OpenAPI-Generator/1.
|
|
91
|
+
self.user_agent = 'OpenAPI-Generator/1.4.2/python'
|
|
92
92
|
self.client_side_validation = configuration.client_side_validation
|
|
93
93
|
|
|
94
94
|
def __enter__(self):
|
|
@@ -393,7 +393,7 @@ class Configuration:
|
|
|
393
393
|
"OS: {env}\n"\
|
|
394
394
|
"Python Version: {pyversion}\n"\
|
|
395
395
|
"Version of the API: 1.0.0\n"\
|
|
396
|
-
"SDK Package Version: 1.
|
|
396
|
+
"SDK Package Version: 1.4.2".\
|
|
397
397
|
format(env=sys.platform, pyversion=sys.version)
|
|
398
398
|
|
|
399
399
|
def get_host_settings(self):
|