activitysmith 1.11.0 → 1.13.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 +112 -23
- package/dist/generated/apis/LiveActivitiesApi.d.ts +10 -10
- package/dist/generated/apis/LiveActivitiesApi.js +10 -10
- package/dist/generated/apis/MetricsApi.d.ts +2 -2
- package/dist/generated/apis/MetricsApi.js +2 -2
- package/dist/generated/apis/PushNotificationsApi.d.ts +2 -2
- package/dist/generated/apis/PushNotificationsApi.js +2 -2
- package/dist/generated/models/index.d.ts +141 -37
- package/dist/generated/models/index.js +32 -5
- package/dist/src/ActivitySmith.d.ts +10 -0
- package/dist/src/ActivitySmith.js +12 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -38,6 +38,20 @@ await activitysmith.notifications.send({
|
|
|
38
38
|
});
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
+
### Custom Push Notification Icons
|
|
42
|
+
|
|
43
|
+

|
|
44
|
+
|
|
45
|
+
Set `icon` to a publicly accessible HTTPS image URL to show an avatar or service logo alongside a smaller ActivitySmith app icon. With a custom icon, iOS may omit `subtitle` from the notification.
|
|
46
|
+
|
|
47
|
+
```js
|
|
48
|
+
await activitysmith.notifications.send({
|
|
49
|
+
title: "MRR just crossed $10,000 🎉",
|
|
50
|
+
message: "Up 18% this month from 31 new subscriptions.",
|
|
51
|
+
icon: "https://cdn.activitysmith.com/integrations/icons/stripe.png",
|
|
52
|
+
});
|
|
53
|
+
```
|
|
54
|
+
|
|
41
55
|
### Rich Push Notifications with Media
|
|
42
56
|
|
|
43
57
|

|
|
@@ -128,14 +142,70 @@ await activitysmith.notifications.send({
|
|
|
128
142
|
});
|
|
129
143
|
```
|
|
130
144
|
|
|
145
|
+
### Push Notification Interruption Levels
|
|
146
|
+
|
|
147
|
+

|
|
148
|
+
|
|
149
|
+
Use `interruption_level` to choose how urgently iOS presents a Push Notification. Omit it for normal delivery. Explicit `active` has the same behavior as the default.
|
|
150
|
+
|
|
151
|
+
| Value | Behavior |
|
|
152
|
+
| --- | --- |
|
|
153
|
+
| `passive` | Appears quietly in the notification list, without sound or waking the screen. |
|
|
154
|
+
| `active` | Normal delivery, subject to the device's notification settings and Focus. This is the default. |
|
|
155
|
+
| `time-sensitive` | Can bypass Scheduled Summary and Focus when the user allows Time Sensitive Notifications for ActivitySmith. |
|
|
156
|
+
|
|
157
|
+
See Apple's [interruption levels](https://developer.apple.com/documentation/usernotifications/unnotificationinterruptionlevel) for the system behavior.
|
|
158
|
+
|
|
159
|
+
The SDK also exports these values as `ActivitySmith.pushInterruptionLevels.passive`, `.active`, and `.timeSensitive`.
|
|
160
|
+
|
|
161
|
+
#### Passive
|
|
162
|
+
|
|
163
|
+
```js
|
|
164
|
+
await activitysmith.notifications.send({
|
|
165
|
+
title: "Daily summary",
|
|
166
|
+
message: "All scheduled jobs completed successfully.",
|
|
167
|
+
interruption_level: "passive",
|
|
168
|
+
});
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
#### Active (default)
|
|
172
|
+
|
|
173
|
+
```js
|
|
174
|
+
await activitysmith.notifications.send({
|
|
175
|
+
title: "Deployment complete",
|
|
176
|
+
message: "Your latest changes are live.",
|
|
177
|
+
interruption_level: "active",
|
|
178
|
+
});
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Removing `interruption_level` from this example produces the same delivery behavior.
|
|
182
|
+
|
|
183
|
+
#### Time Sensitive
|
|
184
|
+
|
|
185
|
+
```js
|
|
186
|
+
await activitysmith.notifications.send({
|
|
187
|
+
title: "🚨 checkout-api is down",
|
|
188
|
+
message: "500 errors on 62% of requests. Customers can't complete payments.",
|
|
189
|
+
interruption_level: "time-sensitive",
|
|
190
|
+
});
|
|
191
|
+
```
|
|
192
|
+
|
|
131
193
|
## Live Activities
|
|
132
194
|
|
|
133
195
|
Choose the Live Activity type that matches what you want to show:
|
|
134
196
|
|
|
197
|
+

|
|
198
|
+
|
|
199
|
+
**Value**: Show a single value on your Lock Screen, such as revenue, a queue count, or a temperature.
|
|
200
|
+
|
|
135
201
|

|
|
136
202
|
|
|
137
203
|
**Stats**: Show up to 8 labeled values on your Lock Screen, from revenue and orders to uptime and conversion.
|
|
138
204
|
|
|
205
|
+

|
|
206
|
+
|
|
207
|
+
**Alert**: Show status updates with a clear message, badge, and icon. When you add an action button, `color` controls the button tint.
|
|
208
|
+
|
|
139
209
|

|
|
140
210
|
|
|
141
211
|
**Metrics**: Track two related values with segmented bars, such as CPU and memory.
|
|
@@ -148,10 +218,6 @@ Choose the Live Activity type that matches what you want to show:
|
|
|
148
218
|
|
|
149
219
|
**Progress**: Show percentage progress for jobs that move continuously toward completion.
|
|
150
220
|
|
|
151
|
-

|
|
152
|
-
|
|
153
|
-
**Alert**: Show status updates with a clear message, badge, and icon. When you add an action button, `color` controls the button tint.
|
|
154
|
-
|
|
155
221
|

|
|
156
222
|
|
|
157
223
|
**Timer**: Count down from a duration, or count up from 00:00 while a job runs.
|
|
@@ -160,6 +226,25 @@ Choose the Live Activity type that matches what you want to show:
|
|
|
160
226
|
|
|
161
227
|
Use a stable `streamKey` to identify the metric, job, deployment, or system you want to keep visible. The first `stream(...)` call starts the Live Activity. Later calls with the same `streamKey` update it.
|
|
162
228
|
|
|
229
|
+
#### Value
|
|
230
|
+
|
|
231
|
+

|
|
232
|
+
|
|
233
|
+
```ts
|
|
234
|
+
await activitysmith.liveActivities.stream("revenue-today", {
|
|
235
|
+
content_state: ActivitySmith.contentState({
|
|
236
|
+
title: "Revenue",
|
|
237
|
+
type: "value",
|
|
238
|
+
value: "$1,240",
|
|
239
|
+
color: "green",
|
|
240
|
+
icon: ActivitySmith.alertIcon("dollarsign.circle", { color: "green" }),
|
|
241
|
+
badge: ActivitySmith.alertBadge("↑ 18%", { color: "purple" }),
|
|
242
|
+
}),
|
|
243
|
+
});
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
Send a string or number in `value`. Strings keep their formatting, including currency symbols, units, and decimal places.
|
|
247
|
+
|
|
163
248
|
#### Stats
|
|
164
249
|
|
|
165
250
|

|
|
@@ -182,6 +267,22 @@ await activitysmith.liveActivities.stream("sales-hourly", {
|
|
|
182
267
|
});
|
|
183
268
|
```
|
|
184
269
|
|
|
270
|
+
#### Alert
|
|
271
|
+
|
|
272
|
+

|
|
273
|
+
|
|
274
|
+
```ts
|
|
275
|
+
await activitysmith.liveActivities.stream("customer-ops", {
|
|
276
|
+
content_state: ActivitySmith.contentState({
|
|
277
|
+
title: "Reactivation",
|
|
278
|
+
message: "Lumen came back after 2 weeks",
|
|
279
|
+
type: "alert",
|
|
280
|
+
icon: ActivitySmith.alertIcon("cloud.sun", { color: "yellow" }),
|
|
281
|
+
badge: ActivitySmith.alertBadge("Customer", { color: "magenta" }),
|
|
282
|
+
}),
|
|
283
|
+
});
|
|
284
|
+
```
|
|
285
|
+
|
|
185
286
|
#### Metrics
|
|
186
287
|
|
|
187
288
|

|
|
@@ -231,22 +332,6 @@ await activitysmith.liveActivities.stream("search-reindex", {
|
|
|
231
332
|
});
|
|
232
333
|
```
|
|
233
334
|
|
|
234
|
-
#### Alert
|
|
235
|
-
|
|
236
|
-

|
|
237
|
-
|
|
238
|
-
```ts
|
|
239
|
-
await activitysmith.liveActivities.stream("customer-ops", {
|
|
240
|
-
content_state: ActivitySmith.contentState({
|
|
241
|
-
title: "Reactivation",
|
|
242
|
-
message: "Lumen came back after 2 weeks",
|
|
243
|
-
type: "alert",
|
|
244
|
-
icon: ActivitySmith.alertIcon("cloud.sun", { color: "yellow" }),
|
|
245
|
-
badge: ActivitySmith.alertBadge("Customer", { color: "magenta" }),
|
|
246
|
-
}),
|
|
247
|
-
});
|
|
248
|
-
```
|
|
249
|
-
|
|
250
335
|
#### Timer
|
|
251
336
|
|
|
252
337
|

|
|
@@ -292,7 +377,7 @@ Add more context to Live Activities with icons and badges.
|
|
|
292
377
|
|
|
293
378
|
#### Icon
|
|
294
379
|
|
|
295
|
-
Supported Live Activity types: `stats`, `
|
|
380
|
+
Supported Live Activity types: `value`, `stats`, `alert`, `metrics`, `segmented_progress`, `progress`, and `timer`.
|
|
296
381
|
|
|
297
382
|

|
|
298
383
|
|
|
@@ -319,7 +404,7 @@ The `icon.symbol` value is an Apple SF Symbol name. Browse the catalog with one
|
|
|
319
404
|
|
|
320
405
|
#### Badge
|
|
321
406
|
|
|
322
|
-
Badges are supported by `alert`, `
|
|
407
|
+
Badges are supported by `value`, `alert`, `segmented_progress`, and `progress` Live Activities.
|
|
323
408
|
|
|
324
409
|

|
|
325
410
|
|
|
@@ -427,7 +512,7 @@ await activitysmith.liveActivities.stream("search-reindex", {
|
|
|
427
512
|
|
|
428
513
|
Use `secondary_action` when you want a second button beside the primary `action`.
|
|
429
514
|
|
|
430
|
-
The secondary action button is supported for `alert`, `
|
|
515
|
+
The secondary action button is supported for `value`, `alert`, `segmented_progress`, and `progress` Live Activities. Both buttons use the same `open_url`, `webhook`, and Apple Shortcut payload shapes.
|
|
431
516
|
|
|
432
517
|
```ts
|
|
433
518
|
await activitysmith.liveActivities.stream("agent-approval", {
|
|
@@ -604,3 +689,7 @@ try {
|
|
|
604
689
|
### [NPM Package](https://www.npmjs.com/package/activitysmith)
|
|
605
690
|
|
|
606
691
|
Install the ActivitySmith Node.js SDK from npm
|
|
692
|
+
|
|
693
|
+
### [Source Code](https://github.com/ActivitySmithHQ/activitysmith-node)
|
|
694
|
+
|
|
695
|
+
View the Node.js SDK source on GitHub
|
|
@@ -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
|
|
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, timer, and value 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, segmented_progress, and value Live Activities.
|
|
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
|
|
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, timer, and value 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, segmented_progress, and value Live Activities.
|
|
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. Use secondary_action for a second button on alert, progress, and
|
|
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, segmented_progress, and value Live Activities.
|
|
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. Use secondary_action for a second button on alert, progress, and
|
|
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, segmented_progress, and value Live Activities.
|
|
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. Use secondary_action for a second button on alert, progress, and
|
|
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, segmented_progress, and value Live Activities. Optional tags to organize and filter notification history. On later stream updates, omit tags to keep the current tags, send tags again to replace them, or send an empty array to clear them.
|
|
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. Use secondary_action for a second button on alert, progress, and
|
|
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, segmented_progress, and value Live Activities. Optional tags to organize and filter notification history. On later stream updates, omit tags to keep the current tags, send tags again to replace them, or send an empty array to clear them.
|
|
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
|
|
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, timer, and value 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, segmented_progress, and value Live Activities. Optional tags to organize and filter notification history.
|
|
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
|
|
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, timer, and value 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, segmented_progress, and value Live Activities. Optional tags to organize and filter notification history.
|
|
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
|
|
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, timer, and value 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, segmented_progress, and value Live Activities.
|
|
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
|
|
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, timer, and value 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, segmented_progress, and value Live Activities.
|
|
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
|
|
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, timer, and value 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, segmented_progress, and value Live Activities.
|
|
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
|
|
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, timer, and value 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, segmented_progress, and value Live Activities.
|
|
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. Use secondary_action for a second button on alert, progress, and
|
|
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, segmented_progress, and value Live Activities.
|
|
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. Use secondary_action for a second button on alert, progress, and
|
|
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, segmented_progress, and value Live Activities.
|
|
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. Use secondary_action for a second button on alert, progress, and
|
|
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, segmented_progress, and value Live Activities. Optional tags to organize and filter notification history. On later stream updates, omit tags to keep the current tags, send tags again to replace them, or send an empty array to clear them.
|
|
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. Use secondary_action for a second button on alert, progress, and
|
|
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, segmented_progress, and value Live Activities. Optional tags to organize and filter notification history. On later stream updates, omit tags to keep the current tags, send tags again to replace them, or send an empty array to clear them.
|
|
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
|
|
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, timer, and value 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, segmented_progress, and value Live Activities. Optional tags to organize and filter notification history.
|
|
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
|
|
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, timer, and value 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, segmented_progress, and value Live Activities. Optional tags to organize and filter notification history.
|
|
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
|
|
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, timer, and value 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, segmented_progress, and value Live Activities.
|
|
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
|
|
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, timer, and value 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, segmented_progress, and value Live Activities.
|
|
194
194
|
* Update a Live Activity (legacy manual lifecycle)
|
|
195
195
|
*/
|
|
196
196
|
async updateLiveActivity(requestParameters, initOverrides) {
|
|
@@ -20,12 +20,12 @@ export interface UpdateMetricValueRequest {
|
|
|
20
20
|
*/
|
|
21
21
|
export declare class MetricsApi extends runtime.BaseAPI {
|
|
22
22
|
/**
|
|
23
|
-
* Updates the latest value for a metric displayed in ActivitySmith widgets. Create the metric in the web app first, then update its value using the key.
|
|
23
|
+
* Updates the latest value for a metric displayed in ActivitySmith widgets. Create the metric in the web app first, then update its value using the key. Metric updates have an independent 300-requests-per-minute account allowance. They do not consume the Push Notification, badge, or Live Activity allowances.
|
|
24
24
|
* Update a widget metric value
|
|
25
25
|
*/
|
|
26
26
|
updateMetricValueRaw(requestParameters: UpdateMetricValueRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MetricValueUpdateResponse>>;
|
|
27
27
|
/**
|
|
28
|
-
* Updates the latest value for a metric displayed in ActivitySmith widgets. Create the metric in the web app first, then update its value using the key.
|
|
28
|
+
* Updates the latest value for a metric displayed in ActivitySmith widgets. Create the metric in the web app first, then update its value using the key. Metric updates have an independent 300-requests-per-minute account allowance. They do not consume the Push Notification, badge, or Live Activity allowances.
|
|
29
29
|
* Update a widget metric value
|
|
30
30
|
*/
|
|
31
31
|
updateMetricValue(requestParameters: UpdateMetricValueRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MetricValueUpdateResponse>;
|
|
@@ -20,7 +20,7 @@ const runtime = require("../runtime");
|
|
|
20
20
|
*/
|
|
21
21
|
class MetricsApi extends runtime.BaseAPI {
|
|
22
22
|
/**
|
|
23
|
-
* Updates the latest value for a metric displayed in ActivitySmith widgets. Create the metric in the web app first, then update its value using the key.
|
|
23
|
+
* Updates the latest value for a metric displayed in ActivitySmith widgets. Create the metric in the web app first, then update its value using the key. Metric updates have an independent 300-requests-per-minute account allowance. They do not consume the Push Notification, badge, or Live Activity allowances.
|
|
24
24
|
* Update a widget metric value
|
|
25
25
|
*/
|
|
26
26
|
async updateMetricValueRaw(requestParameters, initOverrides) {
|
|
@@ -50,7 +50,7 @@ class MetricsApi extends runtime.BaseAPI {
|
|
|
50
50
|
return new runtime.JSONApiResponse(response);
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
|
-
* Updates the latest value for a metric displayed in ActivitySmith widgets. Create the metric in the web app first, then update its value using the key.
|
|
53
|
+
* Updates the latest value for a metric displayed in ActivitySmith widgets. Create the metric in the web app first, then update its value using the key. Metric updates have an independent 300-requests-per-minute account allowance. They do not consume the Push Notification, badge, or Live Activity allowances.
|
|
54
54
|
* Update a widget metric value
|
|
55
55
|
*/
|
|
56
56
|
async updateMetricValue(requestParameters, initOverrides) {
|
|
@@ -19,12 +19,12 @@ export interface SendPushNotificationRequest {
|
|
|
19
19
|
*/
|
|
20
20
|
export declare class PushNotificationsApi extends runtime.BaseAPI {
|
|
21
21
|
/**
|
|
22
|
-
* Sends a push notification to devices matched by API key scope and optional target channels. Supports optional redirection URL, optional media preview or playback when the notification is expanded, and up to 4 interactive actions. `media` cannot be combined with `actions`. Optional tags to organize and filter notification history.
|
|
22
|
+
* Sends a push notification to devices matched by API key scope and optional target channels. Supports optional redirection URL, optional media preview or playback when the notification is expanded, and up to 4 interactive actions. `media` cannot be combined with `actions`. Optional `icon` shows a custom image, such as a service logo or avatar, next to a smaller app icon. Optional `interruption_level` sets how urgently iOS presents the notification. Optional tags to organize and filter notification history.
|
|
23
23
|
* Send a push notification
|
|
24
24
|
*/
|
|
25
25
|
sendPushNotificationRaw(requestParameters: SendPushNotificationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PushNotificationResponse>>;
|
|
26
26
|
/**
|
|
27
|
-
* Sends a push notification to devices matched by API key scope and optional target channels. Supports optional redirection URL, optional media preview or playback when the notification is expanded, and up to 4 interactive actions. `media` cannot be combined with `actions`. Optional tags to organize and filter notification history.
|
|
27
|
+
* Sends a push notification to devices matched by API key scope and optional target channels. Supports optional redirection URL, optional media preview or playback when the notification is expanded, and up to 4 interactive actions. `media` cannot be combined with `actions`. Optional `icon` shows a custom image, such as a service logo or avatar, next to a smaller app icon. Optional `interruption_level` sets how urgently iOS presents the notification. Optional tags to organize and filter notification history.
|
|
28
28
|
* Send a push notification
|
|
29
29
|
*/
|
|
30
30
|
sendPushNotification(requestParameters: SendPushNotificationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PushNotificationResponse>;
|
|
@@ -20,7 +20,7 @@ const runtime = require("../runtime");
|
|
|
20
20
|
*/
|
|
21
21
|
class PushNotificationsApi extends runtime.BaseAPI {
|
|
22
22
|
/**
|
|
23
|
-
* Sends a push notification to devices matched by API key scope and optional target channels. Supports optional redirection URL, optional media preview or playback when the notification is expanded, and up to 4 interactive actions. `media` cannot be combined with `actions`. Optional tags to organize and filter notification history.
|
|
23
|
+
* Sends a push notification to devices matched by API key scope and optional target channels. Supports optional redirection URL, optional media preview or playback when the notification is expanded, and up to 4 interactive actions. `media` cannot be combined with `actions`. Optional `icon` shows a custom image, such as a service logo or avatar, next to a smaller app icon. Optional `interruption_level` sets how urgently iOS presents the notification. Optional tags to organize and filter notification history.
|
|
24
24
|
* Send a push notification
|
|
25
25
|
*/
|
|
26
26
|
async sendPushNotificationRaw(requestParameters, initOverrides) {
|
|
@@ -47,7 +47,7 @@ class PushNotificationsApi extends runtime.BaseAPI {
|
|
|
47
47
|
return new runtime.JSONApiResponse(response);
|
|
48
48
|
}
|
|
49
49
|
/**
|
|
50
|
-
* Sends a push notification to devices matched by API key scope and optional target channels. Supports optional redirection URL, optional media preview or playback when the notification is expanded, and up to 4 interactive actions. `media` cannot be combined with `actions`. Optional tags to organize and filter notification history.
|
|
50
|
+
* Sends a push notification to devices matched by API key scope and optional target channels. Supports optional redirection URL, optional media preview or playback when the notification is expanded, and up to 4 interactive actions. `media` cannot be combined with `actions`. Optional `icon` shows a custom image, such as a service logo or avatar, next to a smaller app icon. Optional `interruption_level` sets how urgently iOS presents the notification. Optional tags to organize and filter notification history.
|
|
51
51
|
* Send a push notification
|
|
52
52
|
*/
|
|
53
53
|
async sendPushNotification(requestParameters, initOverrides) {
|
|
@@ -235,6 +235,65 @@ export interface BadRequestError {
|
|
|
235
235
|
*/
|
|
236
236
|
message: string;
|
|
237
237
|
}
|
|
238
|
+
/**
|
|
239
|
+
*
|
|
240
|
+
* @export
|
|
241
|
+
* @interface BillingBlockedError
|
|
242
|
+
*/
|
|
243
|
+
export interface BillingBlockedError {
|
|
244
|
+
/**
|
|
245
|
+
*
|
|
246
|
+
* @type {string}
|
|
247
|
+
* @memberof BillingBlockedError
|
|
248
|
+
*/
|
|
249
|
+
error: BillingBlockedErrorErrorEnum;
|
|
250
|
+
/**
|
|
251
|
+
*
|
|
252
|
+
* @type {string}
|
|
253
|
+
* @memberof BillingBlockedError
|
|
254
|
+
*/
|
|
255
|
+
message: string;
|
|
256
|
+
/**
|
|
257
|
+
*
|
|
258
|
+
* @type {BillingBlockedErrorTrialPeriod}
|
|
259
|
+
* @memberof BillingBlockedError
|
|
260
|
+
*/
|
|
261
|
+
trial_period?: BillingBlockedErrorTrialPeriod;
|
|
262
|
+
/**
|
|
263
|
+
*
|
|
264
|
+
* @type {string}
|
|
265
|
+
* @memberof BillingBlockedError
|
|
266
|
+
*/
|
|
267
|
+
upgrade_url: string;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* @export
|
|
271
|
+
*/
|
|
272
|
+
export declare const BillingBlockedErrorErrorEnum: {
|
|
273
|
+
readonly TrialExpired: "trial_expired";
|
|
274
|
+
readonly TrialExhausted: "trial_exhausted";
|
|
275
|
+
readonly BillingOverageCapReached: "billing_overage_cap_reached";
|
|
276
|
+
};
|
|
277
|
+
export type BillingBlockedErrorErrorEnum = typeof BillingBlockedErrorErrorEnum[keyof typeof BillingBlockedErrorErrorEnum];
|
|
278
|
+
/**
|
|
279
|
+
*
|
|
280
|
+
* @export
|
|
281
|
+
* @interface BillingBlockedErrorTrialPeriod
|
|
282
|
+
*/
|
|
283
|
+
export interface BillingBlockedErrorTrialPeriod {
|
|
284
|
+
/**
|
|
285
|
+
*
|
|
286
|
+
* @type {string}
|
|
287
|
+
* @memberof BillingBlockedErrorTrialPeriod
|
|
288
|
+
*/
|
|
289
|
+
started_at: string;
|
|
290
|
+
/**
|
|
291
|
+
*
|
|
292
|
+
* @type {string}
|
|
293
|
+
* @memberof BillingBlockedErrorTrialPeriod
|
|
294
|
+
*/
|
|
295
|
+
ends_at: string;
|
|
296
|
+
}
|
|
238
297
|
/**
|
|
239
298
|
*
|
|
240
299
|
* @export
|
|
@@ -249,7 +308,7 @@ export interface ChannelTarget {
|
|
|
249
308
|
channels: Array<string>;
|
|
250
309
|
}
|
|
251
310
|
/**
|
|
252
|
-
* 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
|
|
311
|
+
* 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 value include a string or number in value; strings preserve currency, units, and other formatting. 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, segmented_progress, and value. Type is optional when ending an existing activity. You can send an updated number_of_steps here if the workflow changed after start.
|
|
253
312
|
* @export
|
|
254
313
|
* @interface ContentStateEnd
|
|
255
314
|
*/
|
|
@@ -285,11 +344,11 @@ export interface ContentStateEnd {
|
|
|
285
344
|
*/
|
|
286
345
|
percentage?: number;
|
|
287
346
|
/**
|
|
288
|
-
*
|
|
289
|
-
* @type {
|
|
347
|
+
* For type=value, the required prominent readout (string or finite number); strings preserve exact formatting. For type=progress, a numeric progress value used with upper_limit.
|
|
348
|
+
* @type {LiveActivityValue}
|
|
290
349
|
* @memberof ContentStateEnd
|
|
291
350
|
*/
|
|
292
|
-
value?:
|
|
351
|
+
value?: LiveActivityValue;
|
|
293
352
|
/**
|
|
294
353
|
* Maximum progress value. Use with value for type=progress.
|
|
295
354
|
* @type {number}
|
|
@@ -327,13 +386,13 @@ export interface ContentStateEnd {
|
|
|
327
386
|
*/
|
|
328
387
|
message?: string;
|
|
329
388
|
/**
|
|
330
|
-
* Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, stats, and
|
|
389
|
+
* Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, stats, timer, and value.
|
|
331
390
|
* @type {LiveActivityAlertIcon}
|
|
332
391
|
* @memberof ContentStateEnd
|
|
333
392
|
*/
|
|
334
393
|
icon?: LiveActivityAlertIcon;
|
|
335
394
|
/**
|
|
336
|
-
* Optional badge. Supported by alert, progress, and
|
|
395
|
+
* Optional badge. Supported by alert, progress, segmented_progress, and value.
|
|
337
396
|
* @type {LiveActivityAlertBadge}
|
|
338
397
|
* @memberof ContentStateEnd
|
|
339
398
|
*/
|
|
@@ -345,7 +404,7 @@ export interface ContentStateEnd {
|
|
|
345
404
|
*/
|
|
346
405
|
type?: ContentStateEndTypeEnum;
|
|
347
406
|
/**
|
|
348
|
-
* Optional. Accent color for progress, segmented_progress, metrics, and
|
|
407
|
+
* Optional. Accent color for progress, segmented_progress, metrics, timer, and value Live Activities. For Alert Live Activities, this tints action and secondary_action buttons when included.
|
|
349
408
|
* @type {string}
|
|
350
409
|
* @memberof ContentStateEnd
|
|
351
410
|
*/
|
|
@@ -379,6 +438,7 @@ export declare const ContentStateEndTypeEnum: {
|
|
|
379
438
|
readonly Stats: "stats";
|
|
380
439
|
readonly Alert: "alert";
|
|
381
440
|
readonly Timer: "timer";
|
|
441
|
+
readonly Value: "value";
|
|
382
442
|
};
|
|
383
443
|
export type ContentStateEndTypeEnum = typeof ContentStateEndTypeEnum[keyof typeof ContentStateEndTypeEnum];
|
|
384
444
|
/**
|
|
@@ -430,7 +490,7 @@ export declare const ContentStateEndStepColorsEnum: {
|
|
|
430
490
|
};
|
|
431
491
|
export type ContentStateEndStepColorsEnum = typeof ContentStateEndStepColorsEnum[keyof typeof ContentStateEndStepColorsEnum];
|
|
432
492
|
/**
|
|
433
|
-
* 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
|
|
493
|
+
* 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 value include a string or number in value; strings preserve currency, units, and other formatting. 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, segmented_progress, and value. For segmented_progress, number_of_steps is not locked and can be changed in later update or end calls.
|
|
434
494
|
* @export
|
|
435
495
|
* @interface ContentStateStart
|
|
436
496
|
*/
|
|
@@ -466,11 +526,11 @@ export interface ContentStateStart {
|
|
|
466
526
|
*/
|
|
467
527
|
percentage?: number;
|
|
468
528
|
/**
|
|
469
|
-
*
|
|
470
|
-
* @type {
|
|
529
|
+
* For type=value, the required prominent readout (string or finite number); strings preserve exact formatting. For type=progress, a numeric progress value used with upper_limit.
|
|
530
|
+
* @type {LiveActivityValue}
|
|
471
531
|
* @memberof ContentStateStart
|
|
472
532
|
*/
|
|
473
|
-
value?:
|
|
533
|
+
value?: LiveActivityValue;
|
|
474
534
|
/**
|
|
475
535
|
* Maximum progress value. Use with value for type=progress.
|
|
476
536
|
* @type {number}
|
|
@@ -508,13 +568,13 @@ export interface ContentStateStart {
|
|
|
508
568
|
*/
|
|
509
569
|
message?: string;
|
|
510
570
|
/**
|
|
511
|
-
* Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, stats, and
|
|
571
|
+
* Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, stats, timer, and value.
|
|
512
572
|
* @type {LiveActivityAlertIcon}
|
|
513
573
|
* @memberof ContentStateStart
|
|
514
574
|
*/
|
|
515
575
|
icon?: LiveActivityAlertIcon;
|
|
516
576
|
/**
|
|
517
|
-
* Optional badge. Supported by alert, progress, and
|
|
577
|
+
* Optional badge. Supported by alert, progress, segmented_progress, and value.
|
|
518
578
|
* @type {LiveActivityAlertBadge}
|
|
519
579
|
* @memberof ContentStateStart
|
|
520
580
|
*/
|
|
@@ -526,7 +586,7 @@ export interface ContentStateStart {
|
|
|
526
586
|
*/
|
|
527
587
|
type: ContentStateStartTypeEnum;
|
|
528
588
|
/**
|
|
529
|
-
* Optional. Accent color for progress, segmented_progress, metrics, and
|
|
589
|
+
* Optional. Accent color for progress, segmented_progress, metrics, timer, and value Live Activities. For Alert Live Activities, this tints action and secondary_action buttons when included.
|
|
530
590
|
* @type {string}
|
|
531
591
|
* @memberof ContentStateStart
|
|
532
592
|
*/
|
|
@@ -554,6 +614,7 @@ export declare const ContentStateStartTypeEnum: {
|
|
|
554
614
|
readonly Stats: "stats";
|
|
555
615
|
readonly Alert: "alert";
|
|
556
616
|
readonly Timer: "timer";
|
|
617
|
+
readonly Value: "value";
|
|
557
618
|
};
|
|
558
619
|
export type ContentStateStartTypeEnum = typeof ContentStateStartTypeEnum[keyof typeof ContentStateStartTypeEnum];
|
|
559
620
|
/**
|
|
@@ -605,7 +666,7 @@ export declare const ContentStateStartStepColorsEnum: {
|
|
|
605
666
|
};
|
|
606
667
|
export type ContentStateStartStepColorsEnum = typeof ContentStateStartStepColorsEnum[keyof typeof ContentStateStartStepColorsEnum];
|
|
607
668
|
/**
|
|
608
|
-
* 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
|
|
669
|
+
* 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 value include a string or number in value; strings preserve currency, units, and other formatting. 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, segmented_progress, and value. Type is optional when updating an existing activity. You can increase or decrease number_of_steps during updates.
|
|
609
670
|
* @export
|
|
610
671
|
* @interface ContentStateUpdate
|
|
611
672
|
*/
|
|
@@ -641,11 +702,11 @@ export interface ContentStateUpdate {
|
|
|
641
702
|
*/
|
|
642
703
|
percentage?: number;
|
|
643
704
|
/**
|
|
644
|
-
*
|
|
645
|
-
* @type {
|
|
705
|
+
* For type=value, the required prominent readout (string or finite number); strings preserve exact formatting. For type=progress, a numeric progress value used with upper_limit.
|
|
706
|
+
* @type {LiveActivityValue}
|
|
646
707
|
* @memberof ContentStateUpdate
|
|
647
708
|
*/
|
|
648
|
-
value?:
|
|
709
|
+
value?: LiveActivityValue;
|
|
649
710
|
/**
|
|
650
711
|
* Maximum progress value. Use with value for type=progress.
|
|
651
712
|
* @type {number}
|
|
@@ -683,13 +744,13 @@ export interface ContentStateUpdate {
|
|
|
683
744
|
*/
|
|
684
745
|
message?: string;
|
|
685
746
|
/**
|
|
686
|
-
* Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, stats, and
|
|
747
|
+
* Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, stats, timer, and value.
|
|
687
748
|
* @type {LiveActivityAlertIcon}
|
|
688
749
|
* @memberof ContentStateUpdate
|
|
689
750
|
*/
|
|
690
751
|
icon?: LiveActivityAlertIcon;
|
|
691
752
|
/**
|
|
692
|
-
* Optional badge. Supported by alert, progress, and
|
|
753
|
+
* Optional badge. Supported by alert, progress, segmented_progress, and value.
|
|
693
754
|
* @type {LiveActivityAlertBadge}
|
|
694
755
|
* @memberof ContentStateUpdate
|
|
695
756
|
*/
|
|
@@ -701,7 +762,7 @@ export interface ContentStateUpdate {
|
|
|
701
762
|
*/
|
|
702
763
|
type?: ContentStateUpdateTypeEnum;
|
|
703
764
|
/**
|
|
704
|
-
* Optional. Accent color for progress, segmented_progress, metrics, and
|
|
765
|
+
* Optional. Accent color for progress, segmented_progress, metrics, timer, and value Live Activities. For Alert Live Activities, this tints action and secondary_action buttons when included.
|
|
705
766
|
* @type {string}
|
|
706
767
|
* @memberof ContentStateUpdate
|
|
707
768
|
*/
|
|
@@ -729,6 +790,7 @@ export declare const ContentStateUpdateTypeEnum: {
|
|
|
729
790
|
readonly Stats: "stats";
|
|
730
791
|
readonly Alert: "alert";
|
|
731
792
|
readonly Timer: "timer";
|
|
793
|
+
readonly Value: "value";
|
|
732
794
|
};
|
|
733
795
|
export type ContentStateUpdateTypeEnum = typeof ContentStateUpdateTypeEnum[keyof typeof ContentStateUpdateTypeEnum];
|
|
734
796
|
/**
|
|
@@ -799,7 +861,7 @@ export interface ForbiddenError {
|
|
|
799
861
|
message: string;
|
|
800
862
|
}
|
|
801
863
|
/**
|
|
802
|
-
* 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
|
|
864
|
+
* 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, segmented_progress, and value Live Activities.
|
|
803
865
|
* @export
|
|
804
866
|
* @interface LiveActivityAction
|
|
805
867
|
*/
|
|
@@ -939,7 +1001,7 @@ export interface LiveActivityEndRequest {
|
|
|
939
1001
|
*/
|
|
940
1002
|
action?: LiveActivityAction;
|
|
941
1003
|
/**
|
|
942
|
-
* Optional secondary action button. Supported for alert, progress, and
|
|
1004
|
+
* Optional secondary action button. Supported for alert, progress, segmented_progress, and value Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
|
|
943
1005
|
* @type {LiveActivityAction}
|
|
944
1006
|
* @memberof LiveActivityEndRequest
|
|
945
1007
|
*/
|
|
@@ -1052,7 +1114,7 @@ export interface LiveActivityStartRequest {
|
|
|
1052
1114
|
*/
|
|
1053
1115
|
action?: LiveActivityAction;
|
|
1054
1116
|
/**
|
|
1055
|
-
* Optional secondary action button. Supported for alert, progress, and
|
|
1117
|
+
* Optional secondary action button. Supported for alert, progress, segmented_progress, and value Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
|
|
1056
1118
|
* @type {LiveActivityAction}
|
|
1057
1119
|
* @memberof LiveActivityStartRequest
|
|
1058
1120
|
*/
|
|
@@ -1158,7 +1220,7 @@ export interface LiveActivityStreamDeleteRequest {
|
|
|
1158
1220
|
*/
|
|
1159
1221
|
action?: LiveActivityAction;
|
|
1160
1222
|
/**
|
|
1161
|
-
* Optional secondary action button. Supported for alert, progress, and
|
|
1223
|
+
* Optional secondary action button. Supported for alert, progress, segmented_progress, and value Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
|
|
1162
1224
|
* @type {LiveActivityAction}
|
|
1163
1225
|
* @memberof LiveActivityStreamDeleteRequest
|
|
1164
1226
|
*/
|
|
@@ -1337,7 +1399,7 @@ export interface LiveActivityStreamRequest {
|
|
|
1337
1399
|
*/
|
|
1338
1400
|
action?: LiveActivityAction;
|
|
1339
1401
|
/**
|
|
1340
|
-
* Optional secondary action button. Supported for alert, progress, and
|
|
1402
|
+
* Optional secondary action button. Supported for alert, progress, segmented_progress, and value Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
|
|
1341
1403
|
* @type {LiveActivityAction}
|
|
1342
1404
|
* @memberof LiveActivityStreamRequest
|
|
1343
1405
|
*/
|
|
@@ -1406,7 +1468,7 @@ export interface LiveActivityUpdateRequest {
|
|
|
1406
1468
|
*/
|
|
1407
1469
|
action?: LiveActivityAction;
|
|
1408
1470
|
/**
|
|
1409
|
-
* Optional secondary action button. Supported for alert, progress, and
|
|
1471
|
+
* Optional secondary action button. Supported for alert, progress, segmented_progress, and value Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
|
|
1410
1472
|
* @type {LiveActivityAction}
|
|
1411
1473
|
* @memberof LiveActivityUpdateRequest
|
|
1412
1474
|
*/
|
|
@@ -1449,6 +1511,12 @@ export interface LiveActivityUpdateResponse {
|
|
|
1449
1511
|
*/
|
|
1450
1512
|
timestamp: string;
|
|
1451
1513
|
}
|
|
1514
|
+
/**
|
|
1515
|
+
* @type LiveActivityValue
|
|
1516
|
+
* A formatted string or finite numeric Live Activity value. String formatting is preserved.
|
|
1517
|
+
* @export
|
|
1518
|
+
*/
|
|
1519
|
+
export type LiveActivityValue = number | string;
|
|
1452
1520
|
/**
|
|
1453
1521
|
*
|
|
1454
1522
|
* @export
|
|
@@ -1565,6 +1633,16 @@ export interface NotFoundError {
|
|
|
1565
1633
|
*/
|
|
1566
1634
|
message: string;
|
|
1567
1635
|
}
|
|
1636
|
+
/**
|
|
1637
|
+
* How urgently iOS presents the notification. `passive` arrives quietly in the notification list without sound or lighting up the screen. `active` is normal delivery and the default when omitted. `time-sensitive` can break through Focus and Scheduled Summary when the user allows Time Sensitive Notifications for ActivitySmith.
|
|
1638
|
+
* @export
|
|
1639
|
+
*/
|
|
1640
|
+
export declare const PushInterruptionLevel: {
|
|
1641
|
+
readonly Passive: "passive";
|
|
1642
|
+
readonly Active: "active";
|
|
1643
|
+
readonly TimeSensitive: "time-sensitive";
|
|
1644
|
+
};
|
|
1645
|
+
export type PushInterruptionLevel = typeof PushInterruptionLevel[keyof typeof PushInterruptionLevel];
|
|
1568
1646
|
/**
|
|
1569
1647
|
*
|
|
1570
1648
|
* @export
|
|
@@ -1645,6 +1723,18 @@ export interface PushNotificationRequest {
|
|
|
1645
1723
|
* @memberof PushNotificationRequest
|
|
1646
1724
|
*/
|
|
1647
1725
|
subtitle?: string;
|
|
1726
|
+
/**
|
|
1727
|
+
* Optional HTTPS image URL without credentials for a custom notification icon. If the image cannot be loaded, the app icon is used. iOS may omit subtitle when displaying a custom icon.
|
|
1728
|
+
* @type {string}
|
|
1729
|
+
* @memberof PushNotificationRequest
|
|
1730
|
+
*/
|
|
1731
|
+
icon?: string;
|
|
1732
|
+
/**
|
|
1733
|
+
* Optional. How urgently iOS presents the notification: `passive` (quiet, no sound or screen wake), `active` (default), or `time-sensitive` (can break through Focus and Scheduled Summary when allowed). Omit for normal delivery.
|
|
1734
|
+
* @type {PushInterruptionLevel}
|
|
1735
|
+
* @memberof PushNotificationRequest
|
|
1736
|
+
*/
|
|
1737
|
+
interruption_level?: PushInterruptionLevel;
|
|
1648
1738
|
/**
|
|
1649
1739
|
* Optional HTTPS URL for an image, audio file, or video that users can preview or play when they expand the notification. If `redirection` is omitted, tapping the notification opens this URL. Cannot be combined with `actions`.
|
|
1650
1740
|
* @type {string}
|
|
@@ -1695,19 +1785,19 @@ export interface PushNotificationRequest {
|
|
|
1695
1785
|
tags?: Array<string>;
|
|
1696
1786
|
}
|
|
1697
1787
|
/**
|
|
1698
|
-
*
|
|
1788
|
+
* Apple APNs acceptance result. Acceptance does not confirm device delivery or presentation. Alerts remain eligible for APNs delivery retries for 24 hours; device settings and APNs storage policies still apply.
|
|
1699
1789
|
* @export
|
|
1700
1790
|
* @interface PushNotificationResponse
|
|
1701
1791
|
*/
|
|
1702
1792
|
export interface PushNotificationResponse {
|
|
1703
1793
|
/**
|
|
1704
|
-
*
|
|
1794
|
+
* True when APNs accepts the notification for at least one targeted device.
|
|
1705
1795
|
* @type {boolean}
|
|
1706
1796
|
* @memberof PushNotificationResponse
|
|
1707
1797
|
*/
|
|
1708
1798
|
success: boolean;
|
|
1709
1799
|
/**
|
|
1710
|
-
*
|
|
1800
|
+
* Number of device tokens for which APNs accepted the notification, without confirming on-device delivery.
|
|
1711
1801
|
* @type {number}
|
|
1712
1802
|
* @memberof PushNotificationResponse
|
|
1713
1803
|
*/
|
|
@@ -1752,6 +1842,12 @@ export type PushNotificationWebhookMethod = typeof PushNotificationWebhookMethod
|
|
|
1752
1842
|
* @interface RateLimitError
|
|
1753
1843
|
*/
|
|
1754
1844
|
export interface RateLimitError {
|
|
1845
|
+
/**
|
|
1846
|
+
*
|
|
1847
|
+
* @type {string}
|
|
1848
|
+
* @memberof RateLimitError
|
|
1849
|
+
*/
|
|
1850
|
+
code?: RateLimitErrorCodeEnum;
|
|
1755
1851
|
/**
|
|
1756
1852
|
*
|
|
1757
1853
|
* @type {string}
|
|
@@ -1765,6 +1861,13 @@ export interface RateLimitError {
|
|
|
1765
1861
|
*/
|
|
1766
1862
|
message: string;
|
|
1767
1863
|
}
|
|
1864
|
+
/**
|
|
1865
|
+
* @export
|
|
1866
|
+
*/
|
|
1867
|
+
export declare const RateLimitErrorCodeEnum: {
|
|
1868
|
+
readonly RateLimited: "rate_limited";
|
|
1869
|
+
};
|
|
1870
|
+
export type RateLimitErrorCodeEnum = typeof RateLimitErrorCodeEnum[keyof typeof RateLimitErrorCodeEnum];
|
|
1768
1871
|
/**
|
|
1769
1872
|
* @type SendPushNotification429Response
|
|
1770
1873
|
*
|
|
@@ -1772,7 +1875,7 @@ export interface RateLimitError {
|
|
|
1772
1875
|
*/
|
|
1773
1876
|
export type SendPushNotification429Response = LiveActivityLimitError | RateLimitError;
|
|
1774
1877
|
/**
|
|
1775
|
-
* 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
|
|
1878
|
+
* 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, timer, and value 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.
|
|
1776
1879
|
* @export
|
|
1777
1880
|
* @interface StreamContentState
|
|
1778
1881
|
*/
|
|
@@ -1808,11 +1911,11 @@ export interface StreamContentState {
|
|
|
1808
1911
|
*/
|
|
1809
1912
|
percentage?: number;
|
|
1810
1913
|
/**
|
|
1811
|
-
*
|
|
1812
|
-
* @type {
|
|
1914
|
+
* For type=value, the required prominent readout (string or finite number); strings preserve exact formatting. For progress, a numeric progress value used with upper_limit.
|
|
1915
|
+
* @type {LiveActivityValue}
|
|
1813
1916
|
* @memberof StreamContentState
|
|
1814
1917
|
*/
|
|
1815
|
-
value?:
|
|
1918
|
+
value?: LiveActivityValue;
|
|
1816
1919
|
/**
|
|
1817
1920
|
* Maximum progress value. Use with value for progress.
|
|
1818
1921
|
* @type {number}
|
|
@@ -1844,7 +1947,7 @@ export interface StreamContentState {
|
|
|
1844
1947
|
*/
|
|
1845
1948
|
type?: StreamContentStateTypeEnum;
|
|
1846
1949
|
/**
|
|
1847
|
-
* Optional. Accent color for progress, segmented_progress, metrics, and
|
|
1950
|
+
* Optional. Accent color for progress, segmented_progress, metrics, timer, and value Live Activities. For Alert Live Activities, this tints action and secondary_action buttons when included.
|
|
1848
1951
|
* @type {string}
|
|
1849
1952
|
* @memberof StreamContentState
|
|
1850
1953
|
*/
|
|
@@ -1874,13 +1977,13 @@ export interface StreamContentState {
|
|
|
1874
1977
|
*/
|
|
1875
1978
|
message?: string;
|
|
1876
1979
|
/**
|
|
1877
|
-
* Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, stats, and
|
|
1980
|
+
* Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, stats, timer, and value.
|
|
1878
1981
|
* @type {LiveActivityAlertIcon}
|
|
1879
1982
|
* @memberof StreamContentState
|
|
1880
1983
|
*/
|
|
1881
1984
|
icon?: LiveActivityAlertIcon;
|
|
1882
1985
|
/**
|
|
1883
|
-
* Optional badge. Supported by alert, progress, and
|
|
1986
|
+
* Optional badge. Supported by alert, progress, segmented_progress, and value.
|
|
1884
1987
|
* @type {LiveActivityAlertBadge}
|
|
1885
1988
|
* @memberof StreamContentState
|
|
1886
1989
|
*/
|
|
@@ -1908,6 +2011,7 @@ export declare const StreamContentStateTypeEnum: {
|
|
|
1908
2011
|
readonly Stats: "stats";
|
|
1909
2012
|
readonly Alert: "alert";
|
|
1910
2013
|
readonly Timer: "timer";
|
|
2014
|
+
readonly Value: "value";
|
|
1911
2015
|
};
|
|
1912
2016
|
export type StreamContentStateTypeEnum = typeof StreamContentStateTypeEnum[keyof typeof StreamContentStateTypeEnum];
|
|
1913
2017
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StreamContentStateStepColorsEnum = exports.StreamContentStateStepColorEnum = exports.StreamContentStateColorEnum = exports.StreamContentStateTypeEnum = exports.PushNotificationWebhookMethod = exports.PushNotificationActionType = exports.LiveActivityWebhookMethod = exports.LiveActivityStreamPutResponseOperationEnum = exports.LiveActivityStreamDeleteResponseOperationEnum = exports.LiveActivityColor = exports.LiveActivityActionType = exports.ContentStateUpdateStepColorsEnum = exports.ContentStateUpdateStepColorEnum = exports.ContentStateUpdateColorEnum = exports.ContentStateUpdateTypeEnum = exports.ContentStateStartStepColorsEnum = exports.ContentStateStartStepColorEnum = exports.ContentStateStartColorEnum = exports.ContentStateStartTypeEnum = exports.ContentStateEndStepColorsEnum = exports.ContentStateEndStepColorEnum = exports.ContentStateEndColorEnum = exports.ContentStateEndTypeEnum = exports.AppIconBadgeCountUpdateErrorCodeEnum = exports.ActivityMetricColorEnum = void 0;
|
|
3
|
+
exports.StreamContentStateStepColorsEnum = exports.StreamContentStateStepColorEnum = exports.StreamContentStateColorEnum = exports.StreamContentStateTypeEnum = exports.RateLimitErrorCodeEnum = exports.PushNotificationWebhookMethod = exports.PushNotificationActionType = exports.PushInterruptionLevel = exports.LiveActivityWebhookMethod = exports.LiveActivityStreamPutResponseOperationEnum = exports.LiveActivityStreamDeleteResponseOperationEnum = exports.LiveActivityColor = exports.LiveActivityActionType = exports.ContentStateUpdateStepColorsEnum = exports.ContentStateUpdateStepColorEnum = exports.ContentStateUpdateColorEnum = exports.ContentStateUpdateTypeEnum = exports.ContentStateStartStepColorsEnum = exports.ContentStateStartStepColorEnum = exports.ContentStateStartColorEnum = exports.ContentStateStartTypeEnum = exports.ContentStateEndStepColorsEnum = exports.ContentStateEndStepColorEnum = exports.ContentStateEndColorEnum = exports.ContentStateEndTypeEnum = exports.BillingBlockedErrorErrorEnum = exports.AppIconBadgeCountUpdateErrorCodeEnum = exports.ActivityMetricColorEnum = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* @export
|
|
6
6
|
*/
|
|
@@ -23,6 +23,14 @@ exports.AppIconBadgeCountUpdateErrorCodeEnum = {
|
|
|
23
23
|
DeviceDisconnected: 'badge_device_disconnected',
|
|
24
24
|
UpdateFailed: 'badge_update_failed'
|
|
25
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* @export
|
|
28
|
+
*/
|
|
29
|
+
exports.BillingBlockedErrorErrorEnum = {
|
|
30
|
+
TrialExpired: 'trial_expired',
|
|
31
|
+
TrialExhausted: 'trial_exhausted',
|
|
32
|
+
BillingOverageCapReached: 'billing_overage_cap_reached'
|
|
33
|
+
};
|
|
26
34
|
/**
|
|
27
35
|
* @export
|
|
28
36
|
*/
|
|
@@ -32,7 +40,8 @@ exports.ContentStateEndTypeEnum = {
|
|
|
32
40
|
Metrics: 'metrics',
|
|
33
41
|
Stats: 'stats',
|
|
34
42
|
Alert: 'alert',
|
|
35
|
-
Timer: 'timer'
|
|
43
|
+
Timer: 'timer',
|
|
44
|
+
Value: 'value'
|
|
36
45
|
};
|
|
37
46
|
/**
|
|
38
47
|
* @export
|
|
@@ -88,7 +97,8 @@ exports.ContentStateStartTypeEnum = {
|
|
|
88
97
|
Metrics: 'metrics',
|
|
89
98
|
Stats: 'stats',
|
|
90
99
|
Alert: 'alert',
|
|
91
|
-
Timer: 'timer'
|
|
100
|
+
Timer: 'timer',
|
|
101
|
+
Value: 'value'
|
|
92
102
|
};
|
|
93
103
|
/**
|
|
94
104
|
* @export
|
|
@@ -144,7 +154,8 @@ exports.ContentStateUpdateTypeEnum = {
|
|
|
144
154
|
Metrics: 'metrics',
|
|
145
155
|
Stats: 'stats',
|
|
146
156
|
Alert: 'alert',
|
|
147
|
-
Timer: 'timer'
|
|
157
|
+
Timer: 'timer',
|
|
158
|
+
Value: 'value'
|
|
148
159
|
};
|
|
149
160
|
/**
|
|
150
161
|
* @export
|
|
@@ -239,6 +250,15 @@ exports.LiveActivityWebhookMethod = {
|
|
|
239
250
|
Get: 'GET',
|
|
240
251
|
Post: 'POST'
|
|
241
252
|
};
|
|
253
|
+
/**
|
|
254
|
+
* How urgently iOS presents the notification. `passive` arrives quietly in the notification list without sound or lighting up the screen. `active` is normal delivery and the default when omitted. `time-sensitive` can break through Focus and Scheduled Summary when the user allows Time Sensitive Notifications for ActivitySmith.
|
|
255
|
+
* @export
|
|
256
|
+
*/
|
|
257
|
+
exports.PushInterruptionLevel = {
|
|
258
|
+
Passive: 'passive',
|
|
259
|
+
Active: 'active',
|
|
260
|
+
TimeSensitive: 'time-sensitive'
|
|
261
|
+
};
|
|
242
262
|
/**
|
|
243
263
|
*
|
|
244
264
|
* @export
|
|
@@ -255,6 +275,12 @@ exports.PushNotificationWebhookMethod = {
|
|
|
255
275
|
Get: 'GET',
|
|
256
276
|
Post: 'POST'
|
|
257
277
|
};
|
|
278
|
+
/**
|
|
279
|
+
* @export
|
|
280
|
+
*/
|
|
281
|
+
exports.RateLimitErrorCodeEnum = {
|
|
282
|
+
RateLimited: 'rate_limited'
|
|
283
|
+
};
|
|
258
284
|
/**
|
|
259
285
|
* @export
|
|
260
286
|
*/
|
|
@@ -264,7 +290,8 @@ exports.StreamContentStateTypeEnum = {
|
|
|
264
290
|
Metrics: 'metrics',
|
|
265
291
|
Stats: 'stats',
|
|
266
292
|
Alert: 'alert',
|
|
267
|
-
Timer: 'timer'
|
|
293
|
+
Timer: 'timer',
|
|
294
|
+
Value: 'value'
|
|
268
295
|
};
|
|
269
296
|
/**
|
|
270
297
|
* @export
|
|
@@ -36,6 +36,7 @@ declare const LiveActivityTypes: {
|
|
|
36
36
|
readonly stats: "stats";
|
|
37
37
|
readonly alert: "alert";
|
|
38
38
|
readonly timer: "timer";
|
|
39
|
+
readonly value: "value";
|
|
39
40
|
};
|
|
40
41
|
export type LiveActivityType = (typeof LiveActivityTypes)[keyof typeof LiveActivityTypes];
|
|
41
42
|
export type LiveActivityAlertIcon = {
|
|
@@ -51,6 +52,7 @@ export type LiveActivityContentState = Record<string, unknown> & {
|
|
|
51
52
|
subtitle?: string;
|
|
52
53
|
type?: LiveActivityType | string;
|
|
53
54
|
message?: string;
|
|
55
|
+
value?: string | number;
|
|
54
56
|
icon?: LiveActivityAlertIcon;
|
|
55
57
|
badge?: LiveActivityAlertBadge;
|
|
56
58
|
color?: string;
|
|
@@ -98,6 +100,7 @@ export declare class LiveActivitiesResource {
|
|
|
98
100
|
readonly stats: "stats";
|
|
99
101
|
readonly alert: "alert";
|
|
100
102
|
readonly timer: "timer";
|
|
103
|
+
readonly value: "value";
|
|
101
104
|
};
|
|
102
105
|
private readonly api;
|
|
103
106
|
constructor(api: LiveActivitiesApi);
|
|
@@ -132,10 +135,17 @@ export declare class ActivitySmith {
|
|
|
132
135
|
readonly stats: "stats";
|
|
133
136
|
readonly alert: "alert";
|
|
134
137
|
readonly timer: "timer";
|
|
138
|
+
readonly value: "value";
|
|
135
139
|
};
|
|
136
140
|
static readonly contentState: typeof contentState;
|
|
137
141
|
static readonly alertIcon: typeof alertIcon;
|
|
138
142
|
static readonly alertBadge: typeof alertBadge;
|
|
143
|
+
/** Push Notification interruption levels. */
|
|
144
|
+
static readonly pushInterruptionLevels: {
|
|
145
|
+
readonly passive: "passive";
|
|
146
|
+
readonly active: "active";
|
|
147
|
+
readonly timeSensitive: "time-sensitive";
|
|
148
|
+
};
|
|
139
149
|
readonly notifications: NotificationsResource;
|
|
140
150
|
readonly liveActivities: LiveActivitiesResource;
|
|
141
151
|
readonly metrics: MetricsResource;
|
|
@@ -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.13.0";
|
|
6
6
|
const SDK_HEADER_NAME = "X-ActivitySmith-SDK";
|
|
7
7
|
const DEFAULT_SDK_NAME = "node";
|
|
8
8
|
const SDK_HEADER_VALUE = `${DEFAULT_SDK_NAME}-v${SDK_VERSION}`;
|
|
@@ -13,6 +13,7 @@ const LiveActivityTypes = {
|
|
|
13
13
|
stats: "stats",
|
|
14
14
|
alert: "alert",
|
|
15
15
|
timer: "timer",
|
|
16
|
+
value: "value",
|
|
16
17
|
};
|
|
17
18
|
function withTargetChannels(request) {
|
|
18
19
|
const channels = request.channels;
|
|
@@ -64,7 +65,11 @@ function hasActionsValue(actions) {
|
|
|
64
65
|
}
|
|
65
66
|
return actions !== null && actions !== undefined;
|
|
66
67
|
}
|
|
68
|
+
const PUSH_INTERRUPTION_LEVELS = Object.values(index_1.PushInterruptionLevel);
|
|
67
69
|
function assertValidPushRequest(request) {
|
|
70
|
+
if (request.interruption_level !== undefined && !PUSH_INTERRUPTION_LEVELS.includes(request.interruption_level)) {
|
|
71
|
+
throw new Error("ActivitySmith: interruption_level must be passive, active, or time-sensitive");
|
|
72
|
+
}
|
|
68
73
|
if (hasMediaValue(request.media) && hasActionsValue(request.actions)) {
|
|
69
74
|
throw new Error("ActivitySmith: media cannot be combined with actions");
|
|
70
75
|
}
|
|
@@ -217,3 +222,9 @@ ActivitySmith.liveActivityTypes = LiveActivityTypes;
|
|
|
217
222
|
ActivitySmith.contentState = contentState;
|
|
218
223
|
ActivitySmith.alertIcon = alertIcon;
|
|
219
224
|
ActivitySmith.alertBadge = alertBadge;
|
|
225
|
+
/** Push Notification interruption levels. */
|
|
226
|
+
ActivitySmith.pushInterruptionLevels = {
|
|
227
|
+
passive: index_1.PushInterruptionLevel.Passive,
|
|
228
|
+
active: index_1.PushInterruptionLevel.Active,
|
|
229
|
+
timeSensitive: index_1.PushInterruptionLevel.TimeSensitive,
|
|
230
|
+
};
|