activitysmith 1.7.0 → 1.8.0
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.
package/README.md
CHANGED
|
@@ -286,14 +286,14 @@ await activitysmith.liveActivities.endStream("prod-web-1", {
|
|
|
286
286
|
|
|
287
287
|
### Live Activity Action
|
|
288
288
|
|
|
289
|
-
Live Activities can include
|
|
289
|
+
Live Activities can include an action button.
|
|
290
290
|
|
|
291
291
|
- `open_url`: open an HTTPS URL.
|
|
292
|
-
- `open_url` with a `shortcuts
|
|
292
|
+
- `open_url` with a `shortcuts://` URL: run an Apple Shortcut, for example to open an app.
|
|
293
293
|
- `webhook`: trigger a backend GET/POST workflow.
|
|
294
294
|
|
|
295
295
|
<p align="center">
|
|
296
|
-
<img src="https://cdn.activitysmith.com/features/live-activity-
|
|
296
|
+
<img src="https://cdn.activitysmith.com/features/metrics-live-activity-action.png" alt="Live Activity with action button" width="680" />
|
|
297
297
|
</p>
|
|
298
298
|
|
|
299
299
|
#### Open URL action
|
|
@@ -360,6 +360,55 @@ await activitysmith.liveActivities.stream("search-reindex", {
|
|
|
360
360
|
});
|
|
361
361
|
```
|
|
362
362
|
|
|
363
|
+
#### Secondary action
|
|
364
|
+
|
|
365
|
+
<p align="center">
|
|
366
|
+
<img src="https://cdn.activitysmith.com/features/live-activity-secondary-action.png" alt="Alert Live Activity with primary and secondary action buttons" width="680" />
|
|
367
|
+
</p>
|
|
368
|
+
|
|
369
|
+
Use `secondary_action` when you want a second button beside the primary `action`.
|
|
370
|
+
|
|
371
|
+
The secondary action button is supported for `alert`, `progress`, and `segmented_progress` Live Activities. Both buttons use the same `open_url`, `webhook`, and Apple Shortcut payload shapes.
|
|
372
|
+
|
|
373
|
+
```ts
|
|
374
|
+
await activitysmith.liveActivities.stream("agent-approval", {
|
|
375
|
+
content_state: {
|
|
376
|
+
title: "Approval Needed",
|
|
377
|
+
message: "Should I send the follow-up email to Brightlane?",
|
|
378
|
+
type: "alert",
|
|
379
|
+
color: "green",
|
|
380
|
+
icon: {
|
|
381
|
+
symbol: "sparkles",
|
|
382
|
+
color: "green",
|
|
383
|
+
},
|
|
384
|
+
badge: {
|
|
385
|
+
title: "Agent",
|
|
386
|
+
color: "green",
|
|
387
|
+
},
|
|
388
|
+
},
|
|
389
|
+
action: {
|
|
390
|
+
title: "Send",
|
|
391
|
+
type: "webhook",
|
|
392
|
+
url: "https://agent.example.com/live-activity/approve",
|
|
393
|
+
method: "POST",
|
|
394
|
+
body: {
|
|
395
|
+
approval_id: "approval_01JY3J7Q9S0P8M1V5PZK7DR4M2",
|
|
396
|
+
decision: "send",
|
|
397
|
+
},
|
|
398
|
+
},
|
|
399
|
+
secondary_action: {
|
|
400
|
+
title: "Deny",
|
|
401
|
+
type: "webhook",
|
|
402
|
+
url: "https://agent.example.com/live-activity/deny",
|
|
403
|
+
method: "POST",
|
|
404
|
+
body: {
|
|
405
|
+
approval_id: "approval_01JY3J7Q9S0P8M1V5PZK7DR4M2",
|
|
406
|
+
decision: "deny",
|
|
407
|
+
},
|
|
408
|
+
},
|
|
409
|
+
});
|
|
410
|
+
```
|
|
411
|
+
|
|
363
412
|
### Icons and Badges
|
|
364
413
|
|
|
365
414
|
Add more context to Live Activities with icons and badges.
|
|
@@ -33,52 +33,52 @@ export interface UpdateLiveActivityRequest {
|
|
|
33
33
|
*/
|
|
34
34
|
export declare class LiveActivitiesApi extends runtime.BaseAPI {
|
|
35
35
|
/**
|
|
36
|
-
* 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.
|
|
36
|
+
* 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.
|
|
37
37
|
* End a Live Activity (legacy manual lifecycle)
|
|
38
38
|
*/
|
|
39
39
|
endLiveActivityRaw(requestParameters: EndLiveActivityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LiveActivityEndResponse>>;
|
|
40
40
|
/**
|
|
41
|
-
* 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.
|
|
41
|
+
* 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.
|
|
42
42
|
* End a Live Activity (legacy manual lifecycle)
|
|
43
43
|
*/
|
|
44
44
|
endLiveActivity(requestParameters: EndLiveActivityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LiveActivityEndResponse>;
|
|
45
45
|
/**
|
|
46
|
-
* 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.
|
|
46
|
+
* 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.
|
|
47
47
|
* End a stream
|
|
48
48
|
*/
|
|
49
49
|
endLiveActivityStreamRaw(requestParameters: EndLiveActivityStreamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LiveActivityStreamDeleteResponse>>;
|
|
50
50
|
/**
|
|
51
|
-
* 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.
|
|
51
|
+
* 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.
|
|
52
52
|
* End a stream
|
|
53
53
|
*/
|
|
54
54
|
endLiveActivityStream(requestParameters: EndLiveActivityStreamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LiveActivityStreamDeleteResponse>;
|
|
55
55
|
/**
|
|
56
|
-
* 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.
|
|
56
|
+
* 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.
|
|
57
57
|
* Start a new Live Activity or update an existing one
|
|
58
58
|
*/
|
|
59
59
|
reconcileLiveActivityStreamRaw(requestParameters: ReconcileLiveActivityStreamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LiveActivityStreamPutResponse>>;
|
|
60
60
|
/**
|
|
61
|
-
* 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.
|
|
61
|
+
* 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.
|
|
62
62
|
* Start a new Live Activity or update an existing one
|
|
63
63
|
*/
|
|
64
64
|
reconcileLiveActivityStream(requestParameters: ReconcileLiveActivityStreamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LiveActivityStreamPutResponse>;
|
|
65
65
|
/**
|
|
66
|
-
* 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.
|
|
66
|
+
* 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.
|
|
67
67
|
* Start a Live Activity (legacy manual lifecycle)
|
|
68
68
|
*/
|
|
69
69
|
startLiveActivityRaw(requestParameters: StartLiveActivityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LiveActivityStartResponse>>;
|
|
70
70
|
/**
|
|
71
|
-
* 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.
|
|
71
|
+
* 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.
|
|
72
72
|
* Start a Live Activity (legacy manual lifecycle)
|
|
73
73
|
*/
|
|
74
74
|
startLiveActivity(requestParameters: StartLiveActivityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LiveActivityStartResponse>;
|
|
75
75
|
/**
|
|
76
|
-
* 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.
|
|
76
|
+
* 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.
|
|
77
77
|
* Update a Live Activity (legacy manual lifecycle)
|
|
78
78
|
*/
|
|
79
79
|
updateLiveActivityRaw(requestParameters: UpdateLiveActivityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LiveActivityUpdateResponse>>;
|
|
80
80
|
/**
|
|
81
|
-
* 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.
|
|
81
|
+
* 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.
|
|
82
82
|
* Update a Live Activity (legacy manual lifecycle)
|
|
83
83
|
*/
|
|
84
84
|
updateLiveActivity(requestParameters: UpdateLiveActivityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LiveActivityUpdateResponse>;
|
|
@@ -20,7 +20,7 @@ const runtime = require("../runtime");
|
|
|
20
20
|
*/
|
|
21
21
|
class LiveActivitiesApi extends runtime.BaseAPI {
|
|
22
22
|
/**
|
|
23
|
-
* 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.
|
|
23
|
+
* 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.
|
|
24
24
|
* End a Live Activity (legacy manual lifecycle)
|
|
25
25
|
*/
|
|
26
26
|
async endLiveActivityRaw(requestParameters, initOverrides) {
|
|
@@ -47,7 +47,7 @@ class LiveActivitiesApi extends runtime.BaseAPI {
|
|
|
47
47
|
return new runtime.JSONApiResponse(response);
|
|
48
48
|
}
|
|
49
49
|
/**
|
|
50
|
-
* 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.
|
|
50
|
+
* 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.
|
|
51
51
|
* End a Live Activity (legacy manual lifecycle)
|
|
52
52
|
*/
|
|
53
53
|
async endLiveActivity(requestParameters, initOverrides) {
|
|
@@ -55,7 +55,7 @@ class LiveActivitiesApi extends runtime.BaseAPI {
|
|
|
55
55
|
return await response.value();
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
|
-
* 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.
|
|
58
|
+
* 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.
|
|
59
59
|
* End a stream
|
|
60
60
|
*/
|
|
61
61
|
async endLiveActivityStreamRaw(requestParameters, initOverrides) {
|
|
@@ -82,7 +82,7 @@ class LiveActivitiesApi extends runtime.BaseAPI {
|
|
|
82
82
|
return new runtime.JSONApiResponse(response);
|
|
83
83
|
}
|
|
84
84
|
/**
|
|
85
|
-
* 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.
|
|
85
|
+
* 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.
|
|
86
86
|
* End a stream
|
|
87
87
|
*/
|
|
88
88
|
async endLiveActivityStream(requestParameters, initOverrides) {
|
|
@@ -90,7 +90,7 @@ class LiveActivitiesApi extends runtime.BaseAPI {
|
|
|
90
90
|
return await response.value();
|
|
91
91
|
}
|
|
92
92
|
/**
|
|
93
|
-
* 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.
|
|
93
|
+
* 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.
|
|
94
94
|
* Start a new Live Activity or update an existing one
|
|
95
95
|
*/
|
|
96
96
|
async reconcileLiveActivityStreamRaw(requestParameters, initOverrides) {
|
|
@@ -120,7 +120,7 @@ class LiveActivitiesApi extends runtime.BaseAPI {
|
|
|
120
120
|
return new runtime.JSONApiResponse(response);
|
|
121
121
|
}
|
|
122
122
|
/**
|
|
123
|
-
* 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.
|
|
123
|
+
* 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.
|
|
124
124
|
* Start a new Live Activity or update an existing one
|
|
125
125
|
*/
|
|
126
126
|
async reconcileLiveActivityStream(requestParameters, initOverrides) {
|
|
@@ -128,7 +128,7 @@ class LiveActivitiesApi extends runtime.BaseAPI {
|
|
|
128
128
|
return await response.value();
|
|
129
129
|
}
|
|
130
130
|
/**
|
|
131
|
-
* 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.
|
|
131
|
+
* 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.
|
|
132
132
|
* Start a Live Activity (legacy manual lifecycle)
|
|
133
133
|
*/
|
|
134
134
|
async startLiveActivityRaw(requestParameters, initOverrides) {
|
|
@@ -155,7 +155,7 @@ class LiveActivitiesApi extends runtime.BaseAPI {
|
|
|
155
155
|
return new runtime.JSONApiResponse(response);
|
|
156
156
|
}
|
|
157
157
|
/**
|
|
158
|
-
* 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.
|
|
158
|
+
* 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.
|
|
159
159
|
* Start a Live Activity (legacy manual lifecycle)
|
|
160
160
|
*/
|
|
161
161
|
async startLiveActivity(requestParameters, initOverrides) {
|
|
@@ -163,7 +163,7 @@ class LiveActivitiesApi extends runtime.BaseAPI {
|
|
|
163
163
|
return await response.value();
|
|
164
164
|
}
|
|
165
165
|
/**
|
|
166
|
-
* 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.
|
|
166
|
+
* 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.
|
|
167
167
|
* Update a Live Activity (legacy manual lifecycle)
|
|
168
168
|
*/
|
|
169
169
|
async updateLiveActivityRaw(requestParameters, initOverrides) {
|
|
@@ -190,7 +190,7 @@ class LiveActivitiesApi extends runtime.BaseAPI {
|
|
|
190
190
|
return new runtime.JSONApiResponse(response);
|
|
191
191
|
}
|
|
192
192
|
/**
|
|
193
|
-
* 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.
|
|
193
|
+
* 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.
|
|
194
194
|
* Update a Live Activity (legacy manual lifecycle)
|
|
195
195
|
*/
|
|
196
196
|
async updateLiveActivity(requestParameters, initOverrides) {
|
|
@@ -204,7 +204,7 @@ export interface ContentStateEnd {
|
|
|
204
204
|
*/
|
|
205
205
|
type?: ContentStateEndTypeEnum;
|
|
206
206
|
/**
|
|
207
|
-
* Optional. Accent color for progress, segmented_progress, metrics, and timer Live Activities. For Alert Live Activities, this tints
|
|
207
|
+
* Optional. Accent color for progress, segmented_progress, metrics, and timer Live Activities. For Alert Live Activities, this tints action and secondary_action buttons when included.
|
|
208
208
|
* @type {string}
|
|
209
209
|
* @memberof ContentStateEnd
|
|
210
210
|
*/
|
|
@@ -386,7 +386,7 @@ export interface ContentStateStart {
|
|
|
386
386
|
*/
|
|
387
387
|
type: ContentStateStartTypeEnum;
|
|
388
388
|
/**
|
|
389
|
-
* Optional. Accent color for progress, segmented_progress, metrics, and timer Live Activities. For Alert Live Activities, this tints
|
|
389
|
+
* Optional. Accent color for progress, segmented_progress, metrics, and timer Live Activities. For Alert Live Activities, this tints action and secondary_action buttons when included.
|
|
390
390
|
* @type {string}
|
|
391
391
|
* @memberof ContentStateStart
|
|
392
392
|
*/
|
|
@@ -562,7 +562,7 @@ export interface ContentStateUpdate {
|
|
|
562
562
|
*/
|
|
563
563
|
type?: ContentStateUpdateTypeEnum;
|
|
564
564
|
/**
|
|
565
|
-
* Optional. Accent color for progress, segmented_progress, metrics, and timer Live Activities. For Alert Live Activities, this tints
|
|
565
|
+
* Optional. Accent color for progress, segmented_progress, metrics, and timer Live Activities. For Alert Live Activities, this tints action and secondary_action buttons when included.
|
|
566
566
|
* @type {string}
|
|
567
567
|
* @memberof ContentStateUpdate
|
|
568
568
|
*/
|
|
@@ -661,7 +661,7 @@ export interface ForbiddenError {
|
|
|
661
661
|
message: string;
|
|
662
662
|
}
|
|
663
663
|
/**
|
|
664
|
-
* Optional
|
|
664
|
+
* Optional action button shown in the Live Activity UI. Use action for the primary button, or secondary_action for a secondary button on alert, progress, and segmented_progress Live Activities.
|
|
665
665
|
* @export
|
|
666
666
|
* @interface LiveActivityAction
|
|
667
667
|
*/
|
|
@@ -791,6 +791,12 @@ export interface LiveActivityEndRequest {
|
|
|
791
791
|
* @memberof LiveActivityEndRequest
|
|
792
792
|
*/
|
|
793
793
|
action?: LiveActivityAction;
|
|
794
|
+
/**
|
|
795
|
+
* 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.
|
|
796
|
+
* @type {LiveActivityAction}
|
|
797
|
+
* @memberof LiveActivityEndRequest
|
|
798
|
+
*/
|
|
799
|
+
secondary_action?: LiveActivityAction;
|
|
794
800
|
}
|
|
795
801
|
/**
|
|
796
802
|
* Returned after a Live Activity end event is sent or queued.
|
|
@@ -881,6 +887,12 @@ export interface LiveActivityStartRequest {
|
|
|
881
887
|
* @memberof LiveActivityStartRequest
|
|
882
888
|
*/
|
|
883
889
|
action?: LiveActivityAction;
|
|
890
|
+
/**
|
|
891
|
+
* 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.
|
|
892
|
+
* @type {LiveActivityAction}
|
|
893
|
+
* @memberof LiveActivityStartRequest
|
|
894
|
+
*/
|
|
895
|
+
secondary_action?: LiveActivityAction;
|
|
884
896
|
/**
|
|
885
897
|
*
|
|
886
898
|
* @type {AlertPayload}
|
|
@@ -957,6 +969,12 @@ export interface LiveActivityStreamDeleteRequest {
|
|
|
957
969
|
* @memberof LiveActivityStreamDeleteRequest
|
|
958
970
|
*/
|
|
959
971
|
action?: LiveActivityAction;
|
|
972
|
+
/**
|
|
973
|
+
* 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.
|
|
974
|
+
* @type {LiveActivityAction}
|
|
975
|
+
* @memberof LiveActivityStreamDeleteRequest
|
|
976
|
+
*/
|
|
977
|
+
secondary_action?: LiveActivityAction;
|
|
960
978
|
/**
|
|
961
979
|
*
|
|
962
980
|
* @type {AlertPayload}
|
|
@@ -1119,6 +1137,12 @@ export interface LiveActivityStreamRequest {
|
|
|
1119
1137
|
* @memberof LiveActivityStreamRequest
|
|
1120
1138
|
*/
|
|
1121
1139
|
action?: LiveActivityAction;
|
|
1140
|
+
/**
|
|
1141
|
+
* 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.
|
|
1142
|
+
* @type {LiveActivityAction}
|
|
1143
|
+
* @memberof LiveActivityStreamRequest
|
|
1144
|
+
*/
|
|
1145
|
+
secondary_action?: LiveActivityAction;
|
|
1122
1146
|
/**
|
|
1123
1147
|
*
|
|
1124
1148
|
* @type {AlertPayload}
|
|
@@ -1163,6 +1187,12 @@ export interface LiveActivityUpdateRequest {
|
|
|
1163
1187
|
* @memberof LiveActivityUpdateRequest
|
|
1164
1188
|
*/
|
|
1165
1189
|
action?: LiveActivityAction;
|
|
1190
|
+
/**
|
|
1191
|
+
* 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.
|
|
1192
|
+
* @type {LiveActivityAction}
|
|
1193
|
+
* @memberof LiveActivityUpdateRequest
|
|
1194
|
+
*/
|
|
1195
|
+
secondary_action?: LiveActivityAction;
|
|
1166
1196
|
}
|
|
1167
1197
|
/**
|
|
1168
1198
|
* Returned after a Live Activity update is sent or queued.
|
|
@@ -1583,7 +1613,7 @@ export interface StreamContentState {
|
|
|
1583
1613
|
*/
|
|
1584
1614
|
type?: StreamContentStateTypeEnum;
|
|
1585
1615
|
/**
|
|
1586
|
-
* Optional. Accent color for progress, segmented_progress, metrics, and timer Live Activities. For Alert Live Activities, this tints
|
|
1616
|
+
* Optional. Accent color for progress, segmented_progress, metrics, and timer Live Activities. For Alert Live Activities, this tints action and secondary_action buttons when included.
|
|
1587
1617
|
* @type {string}
|
|
1588
1618
|
* @memberof StreamContentState
|
|
1589
1619
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ActivitySmith = exports.MetricsResource = exports.LiveActivitiesResource = exports.NotificationsResource = void 0;
|
|
4
4
|
const index_1 = require("../generated/index");
|
|
5
|
-
const SDK_VERSION = "1.
|
|
5
|
+
const SDK_VERSION = "1.8.0";
|
|
6
6
|
const SDK_HEADER_NAME = "X-ActivitySmith-SDK";
|
|
7
7
|
const SDK_HEADER_VALUE = `node-v${SDK_VERSION}`;
|
|
8
8
|
const LiveActivityTypes = {
|