activitysmith 1.6.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
@@ -98,7 +98,7 @@ What will work:
98
98
  <img src="https://cdn.activitysmith.com/features/actionable-push-notifications-2.png" alt="Actionable push notification example" width="680" />
99
99
  </p>
100
100
 
101
- Actionable push notifications can open a URL on tap or trigger actions when someone long-presses the notification.
101
+ Push notification `redirection` and `actions` are optional. Use them to open HTTPS URLs, run a specific iPhone Shortcut with `shortcuts://run-shortcut?name=...`, or trigger backend webhook workflows.
102
102
  Webhooks are executed by the ActivitySmith backend.
103
103
 
104
104
  ```ts
@@ -112,6 +112,11 @@ await activitysmith.notifications.send({
112
112
  type: "open_url",
113
113
  url: "https://crm.example.com/customers/cus_9f3a1d",
114
114
  },
115
+ {
116
+ title: "Chat with Jarvis",
117
+ type: "open_url",
118
+ url: "shortcuts://run-shortcut?name=Jarvis",
119
+ },
115
120
  {
116
121
  title: "Start Onboarding Workflow",
117
122
  type: "webhook",
@@ -128,13 +133,14 @@ await activitysmith.notifications.send({
128
133
 
129
134
  ## Live Activities
130
135
 
131
- There are five types of Live Activities:
136
+ There are six types of Live Activities:
132
137
 
133
138
  - `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
134
139
  - `metrics`: best for live percentage values that change often, like server CPU, memory usage, disk usage, or error rate
135
140
  - `segmented_progress`: best for anything that moves through clear stages, like deployments, onboarding flows, backups, ETL pipelines, migrations, and AI agent runs
136
141
  - `progress`: best for tracking real-time progress with percentage, like tasks, backups, migrations, syncs, or uploads
137
142
  - `alert`: best for status updates, such as feature adoption, reactivation, onboarding blockers, incidents, escalations, and other operational states
143
+ - `timer`: best for countdowns and elapsed runtime, like benchmark runs, uploads, backups, transcodes, and long-running jobs
138
144
 
139
145
  ### Start & Update Live Activity
140
146
 
@@ -237,6 +243,28 @@ await activitysmith.liveActivities.stream("customer-ops", {
237
243
  });
238
244
  ```
239
245
 
246
+ #### Timer
247
+
248
+ <p align="center">
249
+ <img src="https://cdn.activitysmith.com/features/timer-live-activity.png" alt="Timer Live Activity showing a benchmark run countdown" width="680" />
250
+ </p>
251
+
252
+ ```ts
253
+ await activitysmith.liveActivities.stream("benchmark-run", {
254
+ content_state: {
255
+ title: "Benchmark Run",
256
+ subtitle: "sampling",
257
+ type: "timer",
258
+ duration_seconds: 300,
259
+ color: "cyan",
260
+ },
261
+ });
262
+ ```
263
+
264
+ For a countdown, send `duration_seconds`. You can update `title`, `subtitle`, `color`, or any other visible field as the work changes. Leave `duration_seconds` out unless you want to change the timer.
265
+
266
+ To start at 00:00 and count up, set `counts_down: false` and leave out `duration_seconds`.
267
+
240
268
  ### End Live Activity
241
269
 
242
270
  Call `endStream(...)` with the same `streamKey` 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,11 +286,14 @@ await activitysmith.liveActivities.endStream("prod-web-1", {
258
286
 
259
287
  ### Live Activity Action
260
288
 
261
- Live Activities can include one optional action button. Use it to open a URL from the Live Activity or trigger a backend webhook.
262
- For Alert Live Activities, set `content_state.color` to tint the action button. `icon.color` and `badge.color` only affect the icon and badge.
289
+ Live Activities can include an action button.
290
+
291
+ - `open_url`: open an HTTPS URL.
292
+ - `open_url` with a `shortcuts://` URL: run an Apple Shortcut, for example to open an app.
293
+ - `webhook`: trigger a backend GET/POST workflow.
263
294
 
264
295
  <p align="center">
265
- <img src="https://cdn.activitysmith.com/features/live-activity-with-action.png?v=20260319-1" alt="Live Activity with action button" width="680" />
296
+ <img src="https://cdn.activitysmith.com/features/metrics-live-activity-action.png" alt="Live Activity with action button" width="680" />
266
297
  </p>
267
298
 
268
299
  #### Open URL action
@@ -279,13 +310,32 @@ await activitysmith.liveActivities.stream("prod-web-1", {
279
310
  ],
280
311
  },
281
312
  action: {
282
- title: "Open Dashboard",
313
+ title: "Dashboard",
283
314
  type: "open_url",
284
315
  url: "https://ops.example.com/servers/prod-web-1",
285
316
  },
286
317
  });
287
318
  ```
288
319
 
320
+ #### Apple Shortcut action
321
+
322
+ ```ts
323
+ await activitysmith.liveActivities.stream("deploy-payments-api", {
324
+ content_state: {
325
+ title: "Deploying payments-api",
326
+ subtitle: "Running database migrations",
327
+ type: "segmented_progress",
328
+ number_of_steps: 5,
329
+ current_step: 3,
330
+ },
331
+ action: {
332
+ title: "Chat with Jarvis",
333
+ type: "open_url",
334
+ url: "shortcuts://run-shortcut?name=Jarvis",
335
+ },
336
+ });
337
+ ```
338
+
289
339
  #### Webhook action
290
340
 
291
341
  ```ts
@@ -310,13 +360,62 @@ await activitysmith.liveActivities.stream("search-reindex", {
310
360
  });
311
361
  ```
312
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
+
313
412
  ### Icons and Badges
314
413
 
315
414
  Add more context to Live Activities with icons and badges.
316
415
 
317
416
  #### Icon
318
417
 
319
- Supported Live Activity types: `stats`, `metrics`, `progress`, `segmented_progress`, and `alert`.
418
+ Supported Live Activity types: `stats`, `metrics`, `progress`, `segmented_progress`, `alert`, and `timer`.
320
419
 
321
420
  <p align="center">
322
421
  <img src="https://cdn.activitysmith.com/features/metrics-live-activity-with-icon.png" alt="Metrics Live Activity with an SF Symbol icon on the iPhone Lock Screen" width="680" />
@@ -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, and alert 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, and alert 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.
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.
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, and alert 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, and alert 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, and alert activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes.
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, and alert activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes.
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, and alert 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, and alert 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.
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.
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, and alert 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, and alert 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, and alert activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes.
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, and alert activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes.
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) {
@@ -107,7 +107,7 @@ export interface ChannelTarget {
107
107
  channels: Array<string>;
108
108
  }
109
109
  /**
110
- * End payload requires title. For segmented_progress include current_step and optionally number_of_steps. For progress include percentage or value with upper_limit. For metrics and stats include a non-empty metrics array. For alert include message. Optional icon is supported by all Live Activity types. Optional badge is supported by alert, progress, and segmented_progress. Type is optional when ending an existing activity. You can send an updated number_of_steps here if the workflow changed after start.
110
+ * End payload requires title. For segmented_progress include current_step and optionally number_of_steps. For progress include percentage or value with upper_limit. For metrics and stats include a non-empty metrics array. For alert include message. For timer, omit duration_seconds to preserve and freeze the latest timer state. Optional icon is supported by all Live Activity types. Optional badge is supported by alert, progress, and segmented_progress. Type is optional when ending an existing activity. You can send an updated number_of_steps here if the workflow changed after start.
111
111
  * @export
112
112
  * @interface ContentStateEnd
113
113
  */
@@ -155,6 +155,24 @@ export interface ContentStateEnd {
155
155
  * @memberof ContentStateEnd
156
156
  */
157
157
  upper_limit?: number;
158
+ /**
159
+ * Timer duration in seconds. For type=timer, omit duration_seconds on end to preserve and freeze the latest timer state.
160
+ * @type {number}
161
+ * @memberof ContentStateEnd
162
+ */
163
+ duration_seconds?: number;
164
+ /**
165
+ * Use with type=timer. When true or omitted, the timer counts down from duration_seconds. Set false for an elapsed timer; omit duration_seconds for an open-ended elapsed timer.
166
+ * @type {boolean}
167
+ * @memberof ContentStateEnd
168
+ */
169
+ counts_down?: boolean;
170
+ /**
171
+ * Use with type=timer. Defaults to true. Set false to pause/freeze via API; set true on a paused timer to resume.
172
+ * @type {boolean}
173
+ * @memberof ContentStateEnd
174
+ */
175
+ is_running?: boolean;
158
176
  /**
159
177
  * Use for type=metrics or type=stats.
160
178
  * @type {Array<ActivityMetric>}
@@ -168,7 +186,7 @@ export interface ContentStateEnd {
168
186
  */
169
187
  message?: string;
170
188
  /**
171
- * Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, and stats.
189
+ * Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, stats, and timer.
172
190
  * @type {LiveActivityAlertIcon}
173
191
  * @memberof ContentStateEnd
174
192
  */
@@ -186,7 +204,7 @@ export interface ContentStateEnd {
186
204
  */
187
205
  type?: ContentStateEndTypeEnum;
188
206
  /**
189
- * Optional. Accent color for progress, segmented_progress, and metrics Live Activities. For Alert Live Activities, this tints the action button when action is included.
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.
190
208
  * @type {string}
191
209
  * @memberof ContentStateEnd
192
210
  */
@@ -219,6 +237,7 @@ export declare const ContentStateEndTypeEnum: {
219
237
  readonly Metrics: "metrics";
220
238
  readonly Stats: "stats";
221
239
  readonly Alert: "alert";
240
+ readonly Timer: "timer";
222
241
  };
223
242
  export type ContentStateEndTypeEnum = typeof ContentStateEndTypeEnum[keyof typeof ContentStateEndTypeEnum];
224
243
  /**
@@ -270,7 +289,7 @@ export declare const ContentStateEndStepColorsEnum: {
270
289
  };
271
290
  export type ContentStateEndStepColorsEnum = typeof ContentStateEndStepColorsEnum[keyof typeof ContentStateEndStepColorsEnum];
272
291
  /**
273
- * Start payload requires title and type. For segmented_progress include number_of_steps and current_step. For progress include percentage or value with upper_limit. For metrics and stats include a non-empty metrics array. For alert include message. Optional icon is supported by all Live Activity types. Optional badge is supported by alert, progress, and segmented_progress. For segmented_progress, number_of_steps is not locked and can be changed in later update or end calls.
292
+ * Start payload requires title and type. For segmented_progress include number_of_steps and current_step. For progress include percentage or value with upper_limit. For metrics and stats include a non-empty metrics array. For alert include message. For timer include duration_seconds for countdowns, or set counts_down false without duration_seconds for an open-ended elapsed timer. Optional icon is supported by all Live Activity types. Optional badge is supported by alert, progress, and segmented_progress. For segmented_progress, number_of_steps is not locked and can be changed in later update or end calls.
274
293
  * @export
275
294
  * @interface ContentStateStart
276
295
  */
@@ -318,6 +337,24 @@ export interface ContentStateStart {
318
337
  * @memberof ContentStateStart
319
338
  */
320
339
  upper_limit?: number;
340
+ /**
341
+ * Timer duration in seconds. For type=timer countdowns, required on start when counts_down is true or omitted.
342
+ * @type {number}
343
+ * @memberof ContentStateStart
344
+ */
345
+ duration_seconds?: number;
346
+ /**
347
+ * Use with type=timer. When true or omitted, the timer counts down from duration_seconds. Set false for an elapsed timer; omit duration_seconds for an open-ended elapsed timer.
348
+ * @type {boolean}
349
+ * @memberof ContentStateStart
350
+ */
351
+ counts_down?: boolean;
352
+ /**
353
+ * Use with type=timer. Defaults to true. Set false to pause/freeze via API; set true on a paused timer to resume.
354
+ * @type {boolean}
355
+ * @memberof ContentStateStart
356
+ */
357
+ is_running?: boolean;
321
358
  /**
322
359
  * Use for type=metrics or type=stats.
323
360
  * @type {Array<ActivityMetric>}
@@ -331,7 +368,7 @@ export interface ContentStateStart {
331
368
  */
332
369
  message?: string;
333
370
  /**
334
- * Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, and stats.
371
+ * Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, stats, and timer.
335
372
  * @type {LiveActivityAlertIcon}
336
373
  * @memberof ContentStateStart
337
374
  */
@@ -349,7 +386,7 @@ export interface ContentStateStart {
349
386
  */
350
387
  type: ContentStateStartTypeEnum;
351
388
  /**
352
- * Optional. Accent color for progress, segmented_progress, and metrics Live Activities. For Alert Live Activities, this tints the action button when action is included.
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.
353
390
  * @type {string}
354
391
  * @memberof ContentStateStart
355
392
  */
@@ -376,6 +413,7 @@ export declare const ContentStateStartTypeEnum: {
376
413
  readonly Metrics: "metrics";
377
414
  readonly Stats: "stats";
378
415
  readonly Alert: "alert";
416
+ readonly Timer: "timer";
379
417
  };
380
418
  export type ContentStateStartTypeEnum = typeof ContentStateStartTypeEnum[keyof typeof ContentStateStartTypeEnum];
381
419
  /**
@@ -427,7 +465,7 @@ export declare const ContentStateStartStepColorsEnum: {
427
465
  };
428
466
  export type ContentStateStartStepColorsEnum = typeof ContentStateStartStepColorsEnum[keyof typeof ContentStateStartStepColorsEnum];
429
467
  /**
430
- * Update payload requires title. For segmented_progress include current_step and optionally number_of_steps. For progress include percentage or value with upper_limit. For metrics and stats include a non-empty metrics array. For alert include message. Optional icon is supported by all Live Activity types. Optional badge is supported by alert, progress, and segmented_progress. Type is optional when updating an existing activity. You can increase or decrease number_of_steps during updates.
468
+ * Update payload requires title. For segmented_progress include current_step and optionally number_of_steps. For progress include percentage or value with upper_limit. For metrics and stats include a non-empty metrics array. For alert include message. For timer, omit duration_seconds to preserve the current timer window or send duration_seconds to reset the timer from the update request time. Optional icon is supported by all Live Activity types. Optional badge is supported by alert, progress, and segmented_progress. Type is optional when updating an existing activity. You can increase or decrease number_of_steps during updates.
431
469
  * @export
432
470
  * @interface ContentStateUpdate
433
471
  */
@@ -475,6 +513,24 @@ export interface ContentStateUpdate {
475
513
  * @memberof ContentStateUpdate
476
514
  */
477
515
  upper_limit?: number;
516
+ /**
517
+ * Timer duration in seconds. For type=timer, sending duration_seconds resets the timer window from the update request time; omit it to preserve the existing timer window.
518
+ * @type {number}
519
+ * @memberof ContentStateUpdate
520
+ */
521
+ duration_seconds?: number;
522
+ /**
523
+ * Use with type=timer. When true or omitted, the timer counts down from duration_seconds. Set false for an elapsed timer; omit duration_seconds for an open-ended elapsed timer.
524
+ * @type {boolean}
525
+ * @memberof ContentStateUpdate
526
+ */
527
+ counts_down?: boolean;
528
+ /**
529
+ * Use with type=timer. Defaults to true. Set false to pause/freeze via API; set true on a paused timer to resume.
530
+ * @type {boolean}
531
+ * @memberof ContentStateUpdate
532
+ */
533
+ is_running?: boolean;
478
534
  /**
479
535
  * Use for type=metrics or type=stats.
480
536
  * @type {Array<ActivityMetric>}
@@ -488,7 +544,7 @@ export interface ContentStateUpdate {
488
544
  */
489
545
  message?: string;
490
546
  /**
491
- * Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, and stats.
547
+ * Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, stats, and timer.
492
548
  * @type {LiveActivityAlertIcon}
493
549
  * @memberof ContentStateUpdate
494
550
  */
@@ -506,7 +562,7 @@ export interface ContentStateUpdate {
506
562
  */
507
563
  type?: ContentStateUpdateTypeEnum;
508
564
  /**
509
- * Optional. Accent color for progress, segmented_progress, and metrics Live Activities. For Alert Live Activities, this tints the action button when action is included.
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.
510
566
  * @type {string}
511
567
  * @memberof ContentStateUpdate
512
568
  */
@@ -533,6 +589,7 @@ export declare const ContentStateUpdateTypeEnum: {
533
589
  readonly Metrics: "metrics";
534
590
  readonly Stats: "stats";
535
591
  readonly Alert: "alert";
592
+ readonly Timer: "timer";
536
593
  };
537
594
  export type ContentStateUpdateTypeEnum = typeof ContentStateUpdateTypeEnum[keyof typeof ContentStateUpdateTypeEnum];
538
595
  /**
@@ -604,7 +661,7 @@ export interface ForbiddenError {
604
661
  message: string;
605
662
  }
606
663
  /**
607
- * Optional single action button shown in the Live Activity UI.
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.
608
665
  * @export
609
666
  * @interface LiveActivityAction
610
667
  */
@@ -623,7 +680,7 @@ export interface LiveActivityAction {
623
680
  */
624
681
  type: LiveActivityActionType;
625
682
  /**
626
- * Action URL. For open_url, use an HTTPS or shortcuts:// URL. For webhook, use an HTTPS URL called by the ActivitySmith backend.
683
+ * 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.
627
684
  * @type {string}
628
685
  * @memberof LiveActivityAction
629
686
  */
@@ -734,6 +791,12 @@ export interface LiveActivityEndRequest {
734
791
  * @memberof LiveActivityEndRequest
735
792
  */
736
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;
737
800
  }
738
801
  /**
739
802
  * Returned after a Live Activity end event is sent or queued.
@@ -824,6 +887,12 @@ export interface LiveActivityStartRequest {
824
887
  * @memberof LiveActivityStartRequest
825
888
  */
826
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;
827
896
  /**
828
897
  *
829
898
  * @type {AlertPayload}
@@ -900,6 +969,12 @@ export interface LiveActivityStreamDeleteRequest {
900
969
  * @memberof LiveActivityStreamDeleteRequest
901
970
  */
902
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;
903
978
  /**
904
979
  *
905
980
  * @type {AlertPayload}
@@ -1062,6 +1137,12 @@ export interface LiveActivityStreamRequest {
1062
1137
  * @memberof LiveActivityStreamRequest
1063
1138
  */
1064
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;
1065
1146
  /**
1066
1147
  *
1067
1148
  * @type {AlertPayload}
@@ -1106,6 +1187,12 @@ export interface LiveActivityUpdateRequest {
1106
1187
  * @memberof LiveActivityUpdateRequest
1107
1188
  */
1108
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;
1109
1196
  }
1110
1197
  /**
1111
1198
  * Returned after a Live Activity update is sent or queued.
@@ -1280,7 +1367,7 @@ export interface PushNotificationAction {
1280
1367
  */
1281
1368
  type: PushNotificationActionType;
1282
1369
  /**
1283
- * Action URL. For open_url, use an HTTPS or shortcuts:// URL. For webhook, use an HTTPS URL called by the ActivitySmith backend.
1370
+ * 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.
1284
1371
  * @type {string}
1285
1372
  * @memberof PushNotificationAction
1286
1373
  */
@@ -1341,7 +1428,7 @@ export interface PushNotificationRequest {
1341
1428
  */
1342
1429
  media?: string;
1343
1430
  /**
1344
- * Optional HTTPS or shortcuts:// URL opened when user taps the notification body. Overrides the default tap target from `media` when both are provided.
1431
+ * 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.
1345
1432
  * @type {string}
1346
1433
  * @memberof PushNotificationRequest
1347
1434
  */
@@ -1453,7 +1540,7 @@ export interface RateLimitError {
1453
1540
  */
1454
1541
  export type SendPushNotification429Response = LiveActivityLimitError | RateLimitError;
1455
1542
  /**
1456
- * Current state for a managed Live Activity stream. Include type on the first PUT, and whenever the stream may need to start a fresh activity. Supports segmented_progress, progress, metrics, stats, and alert types.
1543
+ * Current state for a managed Live Activity stream. Include type on the first PUT, and whenever the stream may need to start a fresh activity. Supports segmented_progress, progress, metrics, stats, alert, and timer types. For timer, send duration_seconds to start or reset a bounded timer; omit duration_seconds on later updates to preserve the existing timer window.
1457
1544
  * @export
1458
1545
  * @interface StreamContentState
1459
1546
  */
@@ -1501,6 +1588,24 @@ export interface StreamContentState {
1501
1588
  * @memberof StreamContentState
1502
1589
  */
1503
1590
  upper_limit?: number;
1591
+ /**
1592
+ * Timer duration in seconds. For type=timer, send duration_seconds to start or reset the timer window; omit it on later stream updates to preserve the existing timer window.
1593
+ * @type {number}
1594
+ * @memberof StreamContentState
1595
+ */
1596
+ duration_seconds?: number;
1597
+ /**
1598
+ * Use with type=timer. When true or omitted, the timer counts down from duration_seconds. Set false for an elapsed timer; omit duration_seconds for an open-ended elapsed timer.
1599
+ * @type {boolean}
1600
+ * @memberof StreamContentState
1601
+ */
1602
+ counts_down?: boolean;
1603
+ /**
1604
+ * Use with type=timer. Defaults to true. Set false to pause/freeze via API; set true on a paused timer to resume.
1605
+ * @type {boolean}
1606
+ * @memberof StreamContentState
1607
+ */
1608
+ is_running?: boolean;
1504
1609
  /**
1505
1610
  * Required on the first PUT or whenever the stream cannot infer the current activity type.
1506
1611
  * @type {string}
@@ -1508,7 +1613,7 @@ export interface StreamContentState {
1508
1613
  */
1509
1614
  type?: StreamContentStateTypeEnum;
1510
1615
  /**
1511
- * Optional. Accent color for progress, segmented_progress, and metrics Live Activities. For Alert Live Activities, this tints the action button when action is included.
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.
1512
1617
  * @type {string}
1513
1618
  * @memberof StreamContentState
1514
1619
  */
@@ -1538,7 +1643,7 @@ export interface StreamContentState {
1538
1643
  */
1539
1644
  message?: string;
1540
1645
  /**
1541
- * Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, and stats.
1646
+ * Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, stats, and timer.
1542
1647
  * @type {LiveActivityAlertIcon}
1543
1648
  * @memberof StreamContentState
1544
1649
  */
@@ -1571,6 +1676,7 @@ export declare const StreamContentStateTypeEnum: {
1571
1676
  readonly Metrics: "metrics";
1572
1677
  readonly Stats: "stats";
1573
1678
  readonly Alert: "alert";
1679
+ readonly Timer: "timer";
1574
1680
  };
1575
1681
  export type StreamContentStateTypeEnum = typeof StreamContentStateTypeEnum[keyof typeof StreamContentStateTypeEnum];
1576
1682
  /**
@@ -24,7 +24,8 @@ exports.ContentStateEndTypeEnum = {
24
24
  Progress: 'progress',
25
25
  Metrics: 'metrics',
26
26
  Stats: 'stats',
27
- Alert: 'alert'
27
+ Alert: 'alert',
28
+ Timer: 'timer'
28
29
  };
29
30
  /**
30
31
  * @export
@@ -79,7 +80,8 @@ exports.ContentStateStartTypeEnum = {
79
80
  Progress: 'progress',
80
81
  Metrics: 'metrics',
81
82
  Stats: 'stats',
82
- Alert: 'alert'
83
+ Alert: 'alert',
84
+ Timer: 'timer'
83
85
  };
84
86
  /**
85
87
  * @export
@@ -134,7 +136,8 @@ exports.ContentStateUpdateTypeEnum = {
134
136
  Progress: 'progress',
135
137
  Metrics: 'metrics',
136
138
  Stats: 'stats',
137
- Alert: 'alert'
139
+ Alert: 'alert',
140
+ Timer: 'timer'
138
141
  };
139
142
  /**
140
143
  * @export
@@ -253,7 +256,8 @@ exports.StreamContentStateTypeEnum = {
253
256
  Progress: 'progress',
254
257
  Metrics: 'metrics',
255
258
  Stats: 'stats',
256
- Alert: 'alert'
259
+ Alert: 'alert',
260
+ Timer: 'timer'
257
261
  };
258
262
  /**
259
263
  * @export
@@ -27,6 +27,7 @@ declare const LiveActivityTypes: {
27
27
  readonly metrics: "metrics";
28
28
  readonly stats: "stats";
29
29
  readonly alert: "alert";
30
+ readonly timer: "timer";
30
31
  };
31
32
  export type LiveActivityType = (typeof LiveActivityTypes)[keyof typeof LiveActivityTypes];
32
33
  export type LiveActivityAlertIcon = {
@@ -45,6 +46,8 @@ export type LiveActivityContentState = Record<string, unknown> & {
45
46
  icon?: LiveActivityAlertIcon;
46
47
  badge?: LiveActivityAlertBadge;
47
48
  color?: string;
49
+ duration_seconds?: number;
50
+ counts_down?: boolean;
48
51
  };
49
52
  type LiveActivityAlertIconOptions = {
50
53
  color?: string;
@@ -86,6 +89,7 @@ export declare class LiveActivitiesResource {
86
89
  readonly metrics: "metrics";
87
90
  readonly stats: "stats";
88
91
  readonly alert: "alert";
92
+ readonly timer: "timer";
89
93
  };
90
94
  private readonly api;
91
95
  constructor(api: LiveActivitiesApi);
@@ -119,6 +123,7 @@ export declare class ActivitySmith {
119
123
  readonly metrics: "metrics";
120
124
  readonly stats: "stats";
121
125
  readonly alert: "alert";
126
+ readonly timer: "timer";
122
127
  };
123
128
  static readonly contentState: typeof contentState;
124
129
  static readonly alertIcon: typeof alertIcon;
@@ -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.6.0";
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 = {
@@ -11,6 +11,7 @@ const LiveActivityTypes = {
11
11
  metrics: "metrics",
12
12
  stats: "stats",
13
13
  alert: "alert",
14
+ timer: "timer",
14
15
  };
15
16
  function withTargetChannels(request) {
16
17
  const channels = request.channels;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "activitysmith",
3
- "version": "1.6.0",
3
+ "version": "1.8.0",
4
4
  "description": "Official ActivitySmith Node.js SDK",
5
5
  "keywords": [
6
6
  "activitysmith",