activitysmith 1.7.0 → 1.9.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 +110 -16
- package/dist/generated/apis/AppIconBadgesApi.d.ts +31 -0
- package/dist/generated/apis/AppIconBadgesApi.js +58 -0
- package/dist/generated/apis/LiveActivitiesApi.d.ts +10 -10
- package/dist/generated/apis/LiveActivitiesApi.js +10 -10
- package/dist/generated/apis/index.d.ts +1 -0
- package/dist/generated/apis/index.js +1 -0
- package/dist/generated/models/index.d.ts +103 -46
- package/dist/src/ActivitySmith.d.ts +7 -1
- package/dist/src/ActivitySmith.js +10 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,8 +20,9 @@ See [API reference](https://activitysmith.com/docs/api-reference/introduction)
|
|
|
20
20
|
- [Live Activity Action](#live-activity-action)
|
|
21
21
|
- [Icons and Badges](#icons-and-badges)
|
|
22
22
|
- [Live Activity Colors](#live-activity-colors)
|
|
23
|
-
- [Channels](#channels)
|
|
24
23
|
- [Widgets](#widgets)
|
|
24
|
+
- [App Icon Badge Count](#app-icon-badge-count)
|
|
25
|
+
- [Channels](#channels)
|
|
25
26
|
|
|
26
27
|
## Installation
|
|
27
28
|
|
|
@@ -286,14 +287,14 @@ await activitysmith.liveActivities.endStream("prod-web-1", {
|
|
|
286
287
|
|
|
287
288
|
### Live Activity Action
|
|
288
289
|
|
|
289
|
-
Live Activities can include
|
|
290
|
+
Live Activities can include an action button.
|
|
290
291
|
|
|
291
292
|
- `open_url`: open an HTTPS URL.
|
|
292
|
-
- `open_url` with a `shortcuts
|
|
293
|
+
- `open_url` with a `shortcuts://` URL: run an Apple Shortcut, for example to open an app.
|
|
293
294
|
- `webhook`: trigger a backend GET/POST workflow.
|
|
294
295
|
|
|
295
296
|
<p align="center">
|
|
296
|
-
<img src="https://cdn.activitysmith.com/features/live-activity-
|
|
297
|
+
<img src="https://cdn.activitysmith.com/features/metrics-live-activity-action.png" alt="Live Activity with action button" width="680" />
|
|
297
298
|
</p>
|
|
298
299
|
|
|
299
300
|
#### Open URL action
|
|
@@ -360,6 +361,55 @@ await activitysmith.liveActivities.stream("search-reindex", {
|
|
|
360
361
|
});
|
|
361
362
|
```
|
|
362
363
|
|
|
364
|
+
#### Secondary action
|
|
365
|
+
|
|
366
|
+
<p align="center">
|
|
367
|
+
<img src="https://cdn.activitysmith.com/features/live-activity-secondary-action.png" alt="Alert Live Activity with primary and secondary action buttons" width="680" />
|
|
368
|
+
</p>
|
|
369
|
+
|
|
370
|
+
Use `secondary_action` when you want a second button beside the primary `action`.
|
|
371
|
+
|
|
372
|
+
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.
|
|
373
|
+
|
|
374
|
+
```ts
|
|
375
|
+
await activitysmith.liveActivities.stream("agent-approval", {
|
|
376
|
+
content_state: {
|
|
377
|
+
title: "Approval Needed",
|
|
378
|
+
message: "Should I send the follow-up email to Brightlane?",
|
|
379
|
+
type: "alert",
|
|
380
|
+
color: "green",
|
|
381
|
+
icon: {
|
|
382
|
+
symbol: "sparkles",
|
|
383
|
+
color: "green",
|
|
384
|
+
},
|
|
385
|
+
badge: {
|
|
386
|
+
title: "Agent",
|
|
387
|
+
color: "green",
|
|
388
|
+
},
|
|
389
|
+
},
|
|
390
|
+
action: {
|
|
391
|
+
title: "Send",
|
|
392
|
+
type: "webhook",
|
|
393
|
+
url: "https://agent.example.com/live-activity/approve",
|
|
394
|
+
method: "POST",
|
|
395
|
+
body: {
|
|
396
|
+
approval_id: "approval_01JY3J7Q9S0P8M1V5PZK7DR4M2",
|
|
397
|
+
decision: "send",
|
|
398
|
+
},
|
|
399
|
+
},
|
|
400
|
+
secondary_action: {
|
|
401
|
+
title: "Deny",
|
|
402
|
+
type: "webhook",
|
|
403
|
+
url: "https://agent.example.com/live-activity/deny",
|
|
404
|
+
method: "POST",
|
|
405
|
+
body: {
|
|
406
|
+
approval_id: "approval_01JY3J7Q9S0P8M1V5PZK7DR4M2",
|
|
407
|
+
decision: "deny",
|
|
408
|
+
},
|
|
409
|
+
},
|
|
410
|
+
});
|
|
411
|
+
```
|
|
412
|
+
|
|
363
413
|
### Icons and Badges
|
|
364
414
|
|
|
365
415
|
Add more context to Live Activities with icons and badges.
|
|
@@ -419,18 +469,6 @@ Choose from these colors for the Live Activity accent, including progress bars a
|
|
|
419
469
|
|
|
420
470
|
`lime`, `green`, `cyan`, `blue`, `purple`, `magenta`, `red`, `orange`, `yellow`, `gray`
|
|
421
471
|
|
|
422
|
-
## Channels
|
|
423
|
-
|
|
424
|
-
Channels are used to target specific team members or devices. Can be used for both push notifications and live activities.
|
|
425
|
-
|
|
426
|
-
```ts
|
|
427
|
-
await activitysmith.notifications.send({
|
|
428
|
-
title: "New subscription 💸",
|
|
429
|
-
message: "Customer upgraded to Pro plan",
|
|
430
|
-
channels: ["sales", "customer-success"], // Optional
|
|
431
|
-
});
|
|
432
|
-
```
|
|
433
|
-
|
|
434
472
|
## Widgets
|
|
435
473
|
|
|
436
474
|
<p align="center">
|
|
@@ -455,6 +493,62 @@ String metric values work too.
|
|
|
455
493
|
await activitysmith.metrics.update("prod.status", "healthy");
|
|
456
494
|
```
|
|
457
495
|
|
|
496
|
+
## App Icon Badge Count
|
|
497
|
+
|
|
498
|
+
<p align="center">
|
|
499
|
+
<img src="https://cdn.activitysmith.com/features/badge-count.png" alt="ActivitySmith app icon with an App Icon Badge Count" width="680" />
|
|
500
|
+
</p>
|
|
501
|
+
|
|
502
|
+
Show the number you care about on your ActivitySmith app icon. Track MRR, a customer count, a stock price, or any other value you want to keep in view.
|
|
503
|
+
|
|
504
|
+
Set or update the badge value.
|
|
505
|
+
|
|
506
|
+
```ts
|
|
507
|
+
await activitysmith.badgeCount(8333);
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
To clear the badge, set its value to 0.
|
|
511
|
+
|
|
512
|
+
```ts
|
|
513
|
+
await activitysmith.badgeCount(0);
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
## Channels
|
|
517
|
+
|
|
518
|
+
Use `channels` to target specific team members or devices
|
|
519
|
+
|
|
520
|
+
### Push Notifications
|
|
521
|
+
|
|
522
|
+
```ts
|
|
523
|
+
await activitysmith.notifications.send({
|
|
524
|
+
title: "New subscription 💸",
|
|
525
|
+
message: "Customer upgraded to Pro plan",
|
|
526
|
+
channels: ["sales", "customer-success"],
|
|
527
|
+
});
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
### Live Activities
|
|
531
|
+
|
|
532
|
+
```ts
|
|
533
|
+
await activitysmith.liveActivities.start({
|
|
534
|
+
content_state: {
|
|
535
|
+
title: "Nightly Database Backup",
|
|
536
|
+
subtitle: "verify restore",
|
|
537
|
+
type: "progress",
|
|
538
|
+
percentage: 62,
|
|
539
|
+
},
|
|
540
|
+
channels: ["sales", "customer-success"],
|
|
541
|
+
});
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
### App Icon Badge Count
|
|
545
|
+
|
|
546
|
+
```ts
|
|
547
|
+
await activitysmith.badgeCount(3, {
|
|
548
|
+
channels: ["sales", "customer-success"],
|
|
549
|
+
});
|
|
550
|
+
```
|
|
551
|
+
|
|
458
552
|
## Error Handling
|
|
459
553
|
|
|
460
554
|
```ts
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ActivitySmith API
|
|
3
|
+
* Send push notifications and Live Activities to your own devices via a single API key.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { AppIconBadgeCountUpdateRequest, AppIconBadgeCountUpdateResponse } from '../models/index';
|
|
14
|
+
export interface UpdateAppIconBadgeCountRequest {
|
|
15
|
+
appIconBadgeCountUpdateRequest: AppIconBadgeCountUpdateRequest;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
export declare class AppIconBadgesApi extends runtime.BaseAPI {
|
|
21
|
+
/**
|
|
22
|
+
* Updates the App Icon Badge Count on devices matched by API key scope and optional target channels. Send `badge: 0` to clear the count. Badge updates are independent of push notifications and do not create a push notification history item.
|
|
23
|
+
* Update App Icon Badge Count
|
|
24
|
+
*/
|
|
25
|
+
updateAppIconBadgeCountRaw(requestParameters: UpdateAppIconBadgeCountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AppIconBadgeCountUpdateResponse>>;
|
|
26
|
+
/**
|
|
27
|
+
* Updates the App Icon Badge Count on devices matched by API key scope and optional target channels. Send `badge: 0` to clear the count. Badge updates are independent of push notifications and do not create a push notification history item.
|
|
28
|
+
* Update App Icon Badge Count
|
|
29
|
+
*/
|
|
30
|
+
updateAppIconBadgeCount(requestParameters: UpdateAppIconBadgeCountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AppIconBadgeCountUpdateResponse>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* ActivitySmith API
|
|
6
|
+
* Send push notifications and Live Activities to your own devices via a single API key.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.AppIconBadgesApi = void 0;
|
|
17
|
+
const runtime = require("../runtime");
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
class AppIconBadgesApi extends runtime.BaseAPI {
|
|
22
|
+
/**
|
|
23
|
+
* Updates the App Icon Badge Count on devices matched by API key scope and optional target channels. Send `badge: 0` to clear the count. Badge updates are independent of push notifications and do not create a push notification history item.
|
|
24
|
+
* Update App Icon Badge Count
|
|
25
|
+
*/
|
|
26
|
+
async updateAppIconBadgeCountRaw(requestParameters, initOverrides) {
|
|
27
|
+
if (requestParameters['appIconBadgeCountUpdateRequest'] == null) {
|
|
28
|
+
throw new runtime.RequiredError('appIconBadgeCountUpdateRequest', 'Required parameter "appIconBadgeCountUpdateRequest" was null or undefined when calling updateAppIconBadgeCount().');
|
|
29
|
+
}
|
|
30
|
+
const queryParameters = {};
|
|
31
|
+
const headerParameters = {};
|
|
32
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
33
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
34
|
+
const token = this.configuration.accessToken;
|
|
35
|
+
const tokenString = await token("apiKeyAuth", []);
|
|
36
|
+
if (tokenString) {
|
|
37
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
const response = await this.request({
|
|
41
|
+
path: `/badge`,
|
|
42
|
+
method: 'POST',
|
|
43
|
+
headers: headerParameters,
|
|
44
|
+
query: queryParameters,
|
|
45
|
+
body: requestParameters['appIconBadgeCountUpdateRequest'],
|
|
46
|
+
}, initOverrides);
|
|
47
|
+
return new runtime.JSONApiResponse(response);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Updates the App Icon Badge Count on devices matched by API key scope and optional target channels. Send `badge: 0` to clear the count. Badge updates are independent of push notifications and do not create a push notification history item.
|
|
51
|
+
* Update App Icon Badge Count
|
|
52
|
+
*/
|
|
53
|
+
async updateAppIconBadgeCount(requestParameters, initOverrides) {
|
|
54
|
+
const response = await this.updateAppIconBadgeCountRaw(requestParameters, initOverrides);
|
|
55
|
+
return await response.value();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.AppIconBadgesApi = AppIconBadgesApi;
|
|
@@ -33,52 +33,52 @@ export interface UpdateLiveActivityRequest {
|
|
|
33
33
|
*/
|
|
34
34
|
export declare class LiveActivitiesApi extends runtime.BaseAPI {
|
|
35
35
|
/**
|
|
36
|
-
* Legacy manual lifecycle endpoint. For new integrations, use DELETE /live-activity/stream/{stream_key} to end a managed Live Activity stream. This endpoint remains supported for existing integrations and advanced lifecycle control. Ends a Live Activity and archives its lifecycle. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start.
|
|
36
|
+
* Legacy manual lifecycle endpoint. For new integrations, use DELETE /live-activity/stream/{stream_key} to end a managed Live Activity stream. This endpoint remains supported for existing integrations and advanced lifecycle control. Ends a Live Activity and archives its lifecycle. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only.
|
|
37
37
|
* End a Live Activity (legacy manual lifecycle)
|
|
38
38
|
*/
|
|
39
39
|
endLiveActivityRaw(requestParameters: EndLiveActivityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LiveActivityEndResponse>>;
|
|
40
40
|
/**
|
|
41
|
-
* Legacy manual lifecycle endpoint. For new integrations, use DELETE /live-activity/stream/{stream_key} to end a managed Live Activity stream. This endpoint remains supported for existing integrations and advanced lifecycle control. Ends a Live Activity and archives its lifecycle. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start.
|
|
41
|
+
* Legacy manual lifecycle endpoint. For new integrations, use DELETE /live-activity/stream/{stream_key} to end a managed Live Activity stream. This endpoint remains supported for existing integrations and advanced lifecycle control. Ends a Live Activity and archives its lifecycle. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only.
|
|
42
42
|
* End a Live Activity (legacy manual lifecycle)
|
|
43
43
|
*/
|
|
44
44
|
endLiveActivity(requestParameters: EndLiveActivityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LiveActivityEndResponse>;
|
|
45
45
|
/**
|
|
46
|
-
* Use this endpoint when the process you are tracking is finished and you no longer want the Live Activity on your devices. ActivitySmith ends the current Live Activity for this stream and dismisses it from devices. If you need direct lifecycle control, use /live-activity/start, /live-activity/update, and /live-activity/end instead.
|
|
46
|
+
* Use this endpoint when the process you are tracking is finished and you no longer want the Live Activity on your devices. ActivitySmith ends the current Live Activity for this stream and dismisses it from devices. If you need direct lifecycle control, use /live-activity/start, /live-activity/update, and /live-activity/end instead. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only.
|
|
47
47
|
* End a stream
|
|
48
48
|
*/
|
|
49
49
|
endLiveActivityStreamRaw(requestParameters: EndLiveActivityStreamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LiveActivityStreamDeleteResponse>>;
|
|
50
50
|
/**
|
|
51
|
-
* Use this endpoint when the process you are tracking is finished and you no longer want the Live Activity on your devices. ActivitySmith ends the current Live Activity for this stream and dismisses it from devices. If you need direct lifecycle control, use /live-activity/start, /live-activity/update, and /live-activity/end instead.
|
|
51
|
+
* Use this endpoint when the process you are tracking is finished and you no longer want the Live Activity on your devices. ActivitySmith ends the current Live Activity for this stream and dismisses it from devices. If you need direct lifecycle control, use /live-activity/start, /live-activity/update, and /live-activity/end instead. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only.
|
|
52
52
|
* End a stream
|
|
53
53
|
*/
|
|
54
54
|
endLiveActivityStream(requestParameters: EndLiveActivityStreamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LiveActivityStreamDeleteResponse>;
|
|
55
55
|
/**
|
|
56
|
-
* Use a stable stream_key for each ongoing thing you want to show as a Live Activity. Send the latest content_state whenever it changes, and ActivitySmith will keep the Live Activity in sync. For timer streams, send duration_seconds to start or reset the timer; omit duration_seconds on later updates to preserve the existing timer window.
|
|
56
|
+
* Use a stable stream_key for each ongoing thing you want to show as a Live Activity. Send the latest content_state whenever it changes, and ActivitySmith will keep the Live Activity in sync. For timer streams, send duration_seconds to start or reset the timer; omit duration_seconds on later updates to preserve the existing timer window. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only.
|
|
57
57
|
* Start a new Live Activity or update an existing one
|
|
58
58
|
*/
|
|
59
59
|
reconcileLiveActivityStreamRaw(requestParameters: ReconcileLiveActivityStreamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LiveActivityStreamPutResponse>>;
|
|
60
60
|
/**
|
|
61
|
-
* Use a stable stream_key for each ongoing thing you want to show as a Live Activity. Send the latest content_state whenever it changes, and ActivitySmith will keep the Live Activity in sync. For timer streams, send duration_seconds to start or reset the timer; omit duration_seconds on later updates to preserve the existing timer window.
|
|
61
|
+
* Use a stable stream_key for each ongoing thing you want to show as a Live Activity. Send the latest content_state whenever it changes, and ActivitySmith will keep the Live Activity in sync. For timer streams, send duration_seconds to start or reset the timer; omit duration_seconds on later updates to preserve the existing timer window. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only.
|
|
62
62
|
* Start a new Live Activity or update an existing one
|
|
63
63
|
*/
|
|
64
64
|
reconcileLiveActivityStream(requestParameters: ReconcileLiveActivityStreamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LiveActivityStreamPutResponse>;
|
|
65
65
|
/**
|
|
66
|
-
* Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Starts a Live Activity on devices matched by API key scope and optional target channels. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes.
|
|
66
|
+
* Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Starts a Live Activity on devices matched by API key scope and optional target channels. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only.
|
|
67
67
|
* Start a Live Activity (legacy manual lifecycle)
|
|
68
68
|
*/
|
|
69
69
|
startLiveActivityRaw(requestParameters: StartLiveActivityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LiveActivityStartResponse>>;
|
|
70
70
|
/**
|
|
71
|
-
* Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Starts a Live Activity on devices matched by API key scope and optional target channels. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes.
|
|
71
|
+
* Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Starts a Live Activity on devices matched by API key scope and optional target channels. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only.
|
|
72
72
|
* Start a Live Activity (legacy manual lifecycle)
|
|
73
73
|
*/
|
|
74
74
|
startLiveActivity(requestParameters: StartLiveActivityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LiveActivityStartResponse>;
|
|
75
75
|
/**
|
|
76
|
-
* Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Updates an existing Live Activity. If the per-activity token is not registered yet, the update is queued. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes. For timer activities, send duration_seconds only when you want to reset the timer window; omit it to keep the current timer running.
|
|
76
|
+
* Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Updates an existing Live Activity. If the per-activity token is not registered yet, the update is queued. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes. For timer activities, send duration_seconds only when you want to reset the timer window; omit it to keep the current timer running. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only.
|
|
77
77
|
* Update a Live Activity (legacy manual lifecycle)
|
|
78
78
|
*/
|
|
79
79
|
updateLiveActivityRaw(requestParameters: UpdateLiveActivityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LiveActivityUpdateResponse>>;
|
|
80
80
|
/**
|
|
81
|
-
* Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Updates an existing Live Activity. If the per-activity token is not registered yet, the update is queued. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes. For timer activities, send duration_seconds only when you want to reset the timer window; omit it to keep the current timer running.
|
|
81
|
+
* Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Updates an existing Live Activity. If the per-activity token is not registered yet, the update is queued. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes. For timer activities, send duration_seconds only when you want to reset the timer window; omit it to keep the current timer running. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only.
|
|
82
82
|
* Update a Live Activity (legacy manual lifecycle)
|
|
83
83
|
*/
|
|
84
84
|
updateLiveActivity(requestParameters: UpdateLiveActivityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LiveActivityUpdateResponse>;
|
|
@@ -20,7 +20,7 @@ const runtime = require("../runtime");
|
|
|
20
20
|
*/
|
|
21
21
|
class LiveActivitiesApi extends runtime.BaseAPI {
|
|
22
22
|
/**
|
|
23
|
-
* Legacy manual lifecycle endpoint. For new integrations, use DELETE /live-activity/stream/{stream_key} to end a managed Live Activity stream. This endpoint remains supported for existing integrations and advanced lifecycle control. Ends a Live Activity and archives its lifecycle. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start.
|
|
23
|
+
* Legacy manual lifecycle endpoint. For new integrations, use DELETE /live-activity/stream/{stream_key} to end a managed Live Activity stream. This endpoint remains supported for existing integrations and advanced lifecycle control. Ends a Live Activity and archives its lifecycle. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only.
|
|
24
24
|
* End a Live Activity (legacy manual lifecycle)
|
|
25
25
|
*/
|
|
26
26
|
async endLiveActivityRaw(requestParameters, initOverrides) {
|
|
@@ -47,7 +47,7 @@ class LiveActivitiesApi extends runtime.BaseAPI {
|
|
|
47
47
|
return new runtime.JSONApiResponse(response);
|
|
48
48
|
}
|
|
49
49
|
/**
|
|
50
|
-
* Legacy manual lifecycle endpoint. For new integrations, use DELETE /live-activity/stream/{stream_key} to end a managed Live Activity stream. This endpoint remains supported for existing integrations and advanced lifecycle control. Ends a Live Activity and archives its lifecycle. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start.
|
|
50
|
+
* Legacy manual lifecycle endpoint. For new integrations, use DELETE /live-activity/stream/{stream_key} to end a managed Live Activity stream. This endpoint remains supported for existing integrations and advanced lifecycle control. Ends a Live Activity and archives its lifecycle. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only.
|
|
51
51
|
* End a Live Activity (legacy manual lifecycle)
|
|
52
52
|
*/
|
|
53
53
|
async endLiveActivity(requestParameters, initOverrides) {
|
|
@@ -55,7 +55,7 @@ class LiveActivitiesApi extends runtime.BaseAPI {
|
|
|
55
55
|
return await response.value();
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
|
-
* Use this endpoint when the process you are tracking is finished and you no longer want the Live Activity on your devices. ActivitySmith ends the current Live Activity for this stream and dismisses it from devices. If you need direct lifecycle control, use /live-activity/start, /live-activity/update, and /live-activity/end instead.
|
|
58
|
+
* Use this endpoint when the process you are tracking is finished and you no longer want the Live Activity on your devices. ActivitySmith ends the current Live Activity for this stream and dismisses it from devices. If you need direct lifecycle control, use /live-activity/start, /live-activity/update, and /live-activity/end instead. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only.
|
|
59
59
|
* End a stream
|
|
60
60
|
*/
|
|
61
61
|
async endLiveActivityStreamRaw(requestParameters, initOverrides) {
|
|
@@ -82,7 +82,7 @@ class LiveActivitiesApi extends runtime.BaseAPI {
|
|
|
82
82
|
return new runtime.JSONApiResponse(response);
|
|
83
83
|
}
|
|
84
84
|
/**
|
|
85
|
-
* Use this endpoint when the process you are tracking is finished and you no longer want the Live Activity on your devices. ActivitySmith ends the current Live Activity for this stream and dismisses it from devices. If you need direct lifecycle control, use /live-activity/start, /live-activity/update, and /live-activity/end instead.
|
|
85
|
+
* Use this endpoint when the process you are tracking is finished and you no longer want the Live Activity on your devices. ActivitySmith ends the current Live Activity for this stream and dismisses it from devices. If you need direct lifecycle control, use /live-activity/start, /live-activity/update, and /live-activity/end instead. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only.
|
|
86
86
|
* End a stream
|
|
87
87
|
*/
|
|
88
88
|
async endLiveActivityStream(requestParameters, initOverrides) {
|
|
@@ -90,7 +90,7 @@ class LiveActivitiesApi extends runtime.BaseAPI {
|
|
|
90
90
|
return await response.value();
|
|
91
91
|
}
|
|
92
92
|
/**
|
|
93
|
-
* Use a stable stream_key for each ongoing thing you want to show as a Live Activity. Send the latest content_state whenever it changes, and ActivitySmith will keep the Live Activity in sync. For timer streams, send duration_seconds to start or reset the timer; omit duration_seconds on later updates to preserve the existing timer window.
|
|
93
|
+
* Use a stable stream_key for each ongoing thing you want to show as a Live Activity. Send the latest content_state whenever it changes, and ActivitySmith will keep the Live Activity in sync. For timer streams, send duration_seconds to start or reset the timer; omit duration_seconds on later updates to preserve the existing timer window. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only.
|
|
94
94
|
* Start a new Live Activity or update an existing one
|
|
95
95
|
*/
|
|
96
96
|
async reconcileLiveActivityStreamRaw(requestParameters, initOverrides) {
|
|
@@ -120,7 +120,7 @@ class LiveActivitiesApi extends runtime.BaseAPI {
|
|
|
120
120
|
return new runtime.JSONApiResponse(response);
|
|
121
121
|
}
|
|
122
122
|
/**
|
|
123
|
-
* Use a stable stream_key for each ongoing thing you want to show as a Live Activity. Send the latest content_state whenever it changes, and ActivitySmith will keep the Live Activity in sync. For timer streams, send duration_seconds to start or reset the timer; omit duration_seconds on later updates to preserve the existing timer window.
|
|
123
|
+
* Use a stable stream_key for each ongoing thing you want to show as a Live Activity. Send the latest content_state whenever it changes, and ActivitySmith will keep the Live Activity in sync. For timer streams, send duration_seconds to start or reset the timer; omit duration_seconds on later updates to preserve the existing timer window. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only.
|
|
124
124
|
* Start a new Live Activity or update an existing one
|
|
125
125
|
*/
|
|
126
126
|
async reconcileLiveActivityStream(requestParameters, initOverrides) {
|
|
@@ -128,7 +128,7 @@ class LiveActivitiesApi extends runtime.BaseAPI {
|
|
|
128
128
|
return await response.value();
|
|
129
129
|
}
|
|
130
130
|
/**
|
|
131
|
-
* Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Starts a Live Activity on devices matched by API key scope and optional target channels. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes.
|
|
131
|
+
* Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Starts a Live Activity on devices matched by API key scope and optional target channels. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only.
|
|
132
132
|
* Start a Live Activity (legacy manual lifecycle)
|
|
133
133
|
*/
|
|
134
134
|
async startLiveActivityRaw(requestParameters, initOverrides) {
|
|
@@ -155,7 +155,7 @@ class LiveActivitiesApi extends runtime.BaseAPI {
|
|
|
155
155
|
return new runtime.JSONApiResponse(response);
|
|
156
156
|
}
|
|
157
157
|
/**
|
|
158
|
-
* Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Starts a Live Activity on devices matched by API key scope and optional target channels. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes.
|
|
158
|
+
* Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Starts a Live Activity on devices matched by API key scope and optional target channels. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only.
|
|
159
159
|
* Start a Live Activity (legacy manual lifecycle)
|
|
160
160
|
*/
|
|
161
161
|
async startLiveActivity(requestParameters, initOverrides) {
|
|
@@ -163,7 +163,7 @@ class LiveActivitiesApi extends runtime.BaseAPI {
|
|
|
163
163
|
return await response.value();
|
|
164
164
|
}
|
|
165
165
|
/**
|
|
166
|
-
* Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Updates an existing Live Activity. If the per-activity token is not registered yet, the update is queued. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes. For timer activities, send duration_seconds only when you want to reset the timer window; omit it to keep the current timer running.
|
|
166
|
+
* Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Updates an existing Live Activity. If the per-activity token is not registered yet, the update is queued. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes. For timer activities, send duration_seconds only when you want to reset the timer window; omit it to keep the current timer running. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only.
|
|
167
167
|
* Update a Live Activity (legacy manual lifecycle)
|
|
168
168
|
*/
|
|
169
169
|
async updateLiveActivityRaw(requestParameters, initOverrides) {
|
|
@@ -190,7 +190,7 @@ class LiveActivitiesApi extends runtime.BaseAPI {
|
|
|
190
190
|
return new runtime.JSONApiResponse(response);
|
|
191
191
|
}
|
|
192
192
|
/**
|
|
193
|
-
* Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Updates an existing Live Activity. If the per-activity token is not registered yet, the update is queued. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes. For timer activities, send duration_seconds only when you want to reset the timer window; omit it to keep the current timer running.
|
|
193
|
+
* Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Updates an existing Live Activity. If the per-activity token is not registered yet, the update is queued. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes. For timer activities, send duration_seconds only when you want to reset the timer window; omit it to keep the current timer running. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only.
|
|
194
194
|
* Update a Live Activity (legacy manual lifecycle)
|
|
195
195
|
*/
|
|
196
196
|
async updateLiveActivity(requestParameters, initOverrides) {
|
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
/* tslint:disable */
|
|
18
18
|
/* eslint-disable */
|
|
19
|
+
__exportStar(require("./AppIconBadgesApi"), exports);
|
|
19
20
|
__exportStar(require("./LiveActivitiesApi"), exports);
|
|
20
21
|
__exportStar(require("./MetricsApi"), exports);
|
|
21
22
|
__exportStar(require("./PushNotificationsApi"), exports);
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* @interface ActivityMetric
|
|
5
5
|
*/
|
|
6
6
|
export interface ActivityMetric {
|
|
7
|
-
[key: string]: any | any;
|
|
8
7
|
/**
|
|
9
8
|
*
|
|
10
9
|
* @type {string}
|
|
@@ -58,7 +57,6 @@ export type ActivityMetricValue = number | string;
|
|
|
58
57
|
* @interface AlertPayload
|
|
59
58
|
*/
|
|
60
59
|
export interface AlertPayload {
|
|
61
|
-
[key: string]: any | any;
|
|
62
60
|
/**
|
|
63
61
|
*
|
|
64
62
|
* @type {string}
|
|
@@ -72,13 +70,74 @@ export interface AlertPayload {
|
|
|
72
70
|
*/
|
|
73
71
|
body?: string;
|
|
74
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* App Icon Badge Count update. Send badge 0 to clear the count.
|
|
75
|
+
* @export
|
|
76
|
+
* @interface AppIconBadgeCountUpdateRequest
|
|
77
|
+
*/
|
|
78
|
+
export interface AppIconBadgeCountUpdateRequest {
|
|
79
|
+
/**
|
|
80
|
+
* The count to show on the ActivitySmith app icon. Send 0 to clear it.
|
|
81
|
+
* @type {number}
|
|
82
|
+
* @memberof AppIconBadgeCountUpdateRequest
|
|
83
|
+
*/
|
|
84
|
+
badge: number;
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @type {ChannelTarget}
|
|
88
|
+
* @memberof AppIconBadgeCountUpdateRequest
|
|
89
|
+
*/
|
|
90
|
+
target?: ChannelTarget;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
*
|
|
94
|
+
* @export
|
|
95
|
+
* @interface AppIconBadgeCountUpdateResponse
|
|
96
|
+
*/
|
|
97
|
+
export interface AppIconBadgeCountUpdateResponse {
|
|
98
|
+
/**
|
|
99
|
+
*
|
|
100
|
+
* @type {boolean}
|
|
101
|
+
* @memberof AppIconBadgeCountUpdateResponse
|
|
102
|
+
*/
|
|
103
|
+
success: boolean;
|
|
104
|
+
/**
|
|
105
|
+
*
|
|
106
|
+
* @type {number}
|
|
107
|
+
* @memberof AppIconBadgeCountUpdateResponse
|
|
108
|
+
*/
|
|
109
|
+
badge: number;
|
|
110
|
+
/**
|
|
111
|
+
*
|
|
112
|
+
* @type {number}
|
|
113
|
+
* @memberof AppIconBadgeCountUpdateResponse
|
|
114
|
+
*/
|
|
115
|
+
devices_notified: number;
|
|
116
|
+
/**
|
|
117
|
+
*
|
|
118
|
+
* @type {number}
|
|
119
|
+
* @memberof AppIconBadgeCountUpdateResponse
|
|
120
|
+
*/
|
|
121
|
+
users_notified: number;
|
|
122
|
+
/**
|
|
123
|
+
*
|
|
124
|
+
* @type {Array<string>}
|
|
125
|
+
* @memberof AppIconBadgeCountUpdateResponse
|
|
126
|
+
*/
|
|
127
|
+
effective_channel_slugs: Array<string>;
|
|
128
|
+
/**
|
|
129
|
+
*
|
|
130
|
+
* @type {string}
|
|
131
|
+
* @memberof AppIconBadgeCountUpdateResponse
|
|
132
|
+
*/
|
|
133
|
+
timestamp: string;
|
|
134
|
+
}
|
|
75
135
|
/**
|
|
76
136
|
*
|
|
77
137
|
* @export
|
|
78
138
|
* @interface BadRequestError
|
|
79
139
|
*/
|
|
80
140
|
export interface BadRequestError {
|
|
81
|
-
[key: string]: any | any;
|
|
82
141
|
/**
|
|
83
142
|
*
|
|
84
143
|
* @type {string}
|
|
@@ -98,7 +157,6 @@ export interface BadRequestError {
|
|
|
98
157
|
* @interface ChannelTarget
|
|
99
158
|
*/
|
|
100
159
|
export interface ChannelTarget {
|
|
101
|
-
[key: string]: any | any;
|
|
102
160
|
/**
|
|
103
161
|
* Channel slugs. When omitted, API key scope determines recipients.
|
|
104
162
|
* @type {Array<string>}
|
|
@@ -112,7 +170,6 @@ export interface ChannelTarget {
|
|
|
112
170
|
* @interface ContentStateEnd
|
|
113
171
|
*/
|
|
114
172
|
export interface ContentStateEnd {
|
|
115
|
-
[key: string]: any | any;
|
|
116
173
|
/**
|
|
117
174
|
*
|
|
118
175
|
* @type {string}
|
|
@@ -204,7 +261,7 @@ export interface ContentStateEnd {
|
|
|
204
261
|
*/
|
|
205
262
|
type?: ContentStateEndTypeEnum;
|
|
206
263
|
/**
|
|
207
|
-
* Optional. Accent color for progress, segmented_progress, metrics, and timer Live Activities. For Alert Live Activities, this tints
|
|
264
|
+
* Optional. Accent color for progress, segmented_progress, metrics, and timer Live Activities. For Alert Live Activities, this tints action and secondary_action buttons when included.
|
|
208
265
|
* @type {string}
|
|
209
266
|
* @memberof ContentStateEnd
|
|
210
267
|
*/
|
|
@@ -294,7 +351,6 @@ export type ContentStateEndStepColorsEnum = typeof ContentStateEndStepColorsEnum
|
|
|
294
351
|
* @interface ContentStateStart
|
|
295
352
|
*/
|
|
296
353
|
export interface ContentStateStart {
|
|
297
|
-
[key: string]: any | any;
|
|
298
354
|
/**
|
|
299
355
|
*
|
|
300
356
|
* @type {string}
|
|
@@ -386,7 +442,7 @@ export interface ContentStateStart {
|
|
|
386
442
|
*/
|
|
387
443
|
type: ContentStateStartTypeEnum;
|
|
388
444
|
/**
|
|
389
|
-
* Optional. Accent color for progress, segmented_progress, metrics, and timer Live Activities. For Alert Live Activities, this tints
|
|
445
|
+
* Optional. Accent color for progress, segmented_progress, metrics, and timer Live Activities. For Alert Live Activities, this tints action and secondary_action buttons when included.
|
|
390
446
|
* @type {string}
|
|
391
447
|
* @memberof ContentStateStart
|
|
392
448
|
*/
|
|
@@ -470,7 +526,6 @@ export type ContentStateStartStepColorsEnum = typeof ContentStateStartStepColors
|
|
|
470
526
|
* @interface ContentStateUpdate
|
|
471
527
|
*/
|
|
472
528
|
export interface ContentStateUpdate {
|
|
473
|
-
[key: string]: any | any;
|
|
474
529
|
/**
|
|
475
530
|
*
|
|
476
531
|
* @type {string}
|
|
@@ -562,7 +617,7 @@ export interface ContentStateUpdate {
|
|
|
562
617
|
*/
|
|
563
618
|
type?: ContentStateUpdateTypeEnum;
|
|
564
619
|
/**
|
|
565
|
-
* Optional. Accent color for progress, segmented_progress, metrics, and timer Live Activities. For Alert Live Activities, this tints
|
|
620
|
+
* Optional. Accent color for progress, segmented_progress, metrics, and timer Live Activities. For Alert Live Activities, this tints action and secondary_action buttons when included.
|
|
566
621
|
* @type {string}
|
|
567
622
|
* @memberof ContentStateUpdate
|
|
568
623
|
*/
|
|
@@ -646,7 +701,6 @@ export type ContentStateUpdateStepColorsEnum = typeof ContentStateUpdateStepColo
|
|
|
646
701
|
* @interface ForbiddenError
|
|
647
702
|
*/
|
|
648
703
|
export interface ForbiddenError {
|
|
649
|
-
[key: string]: any | any;
|
|
650
704
|
/**
|
|
651
705
|
*
|
|
652
706
|
* @type {string}
|
|
@@ -661,7 +715,7 @@ export interface ForbiddenError {
|
|
|
661
715
|
message: string;
|
|
662
716
|
}
|
|
663
717
|
/**
|
|
664
|
-
* Optional
|
|
718
|
+
* Optional action button shown in the Live Activity UI. Use action for the primary button, or secondary_action for a secondary button on alert, progress, and segmented_progress Live Activities.
|
|
665
719
|
* @export
|
|
666
720
|
* @interface LiveActivityAction
|
|
667
721
|
*/
|
|
@@ -693,12 +747,10 @@ export interface LiveActivityAction {
|
|
|
693
747
|
method?: LiveActivityWebhookMethod;
|
|
694
748
|
/**
|
|
695
749
|
* Optional webhook payload body. Used only when type=webhook.
|
|
696
|
-
* @type {
|
|
750
|
+
* @type {object}
|
|
697
751
|
* @memberof LiveActivityAction
|
|
698
752
|
*/
|
|
699
|
-
body?:
|
|
700
|
-
[key: string]: any;
|
|
701
|
-
};
|
|
753
|
+
body?: object;
|
|
702
754
|
}
|
|
703
755
|
/**
|
|
704
756
|
*
|
|
@@ -715,7 +767,6 @@ export type LiveActivityActionType = typeof LiveActivityActionType[keyof typeof
|
|
|
715
767
|
* @interface LiveActivityAlertBadge
|
|
716
768
|
*/
|
|
717
769
|
export interface LiveActivityAlertBadge {
|
|
718
|
-
[key: string]: any | any;
|
|
719
770
|
/**
|
|
720
771
|
*
|
|
721
772
|
* @type {string}
|
|
@@ -735,7 +786,6 @@ export interface LiveActivityAlertBadge {
|
|
|
735
786
|
* @interface LiveActivityAlertIcon
|
|
736
787
|
*/
|
|
737
788
|
export interface LiveActivityAlertIcon {
|
|
738
|
-
[key: string]: any | any;
|
|
739
789
|
/**
|
|
740
790
|
* Apple SF Symbol name.
|
|
741
791
|
* @type {string}
|
|
@@ -772,7 +822,6 @@ export type LiveActivityColor = typeof LiveActivityColor[keyof typeof LiveActivi
|
|
|
772
822
|
* @interface LiveActivityEndRequest
|
|
773
823
|
*/
|
|
774
824
|
export interface LiveActivityEndRequest {
|
|
775
|
-
[key: string]: any | any;
|
|
776
825
|
/**
|
|
777
826
|
*
|
|
778
827
|
* @type {string}
|
|
@@ -791,6 +840,12 @@ export interface LiveActivityEndRequest {
|
|
|
791
840
|
* @memberof LiveActivityEndRequest
|
|
792
841
|
*/
|
|
793
842
|
action?: LiveActivityAction;
|
|
843
|
+
/**
|
|
844
|
+
* 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.
|
|
845
|
+
* @type {LiveActivityAction}
|
|
846
|
+
* @memberof LiveActivityEndRequest
|
|
847
|
+
*/
|
|
848
|
+
secondary_action?: LiveActivityAction;
|
|
794
849
|
}
|
|
795
850
|
/**
|
|
796
851
|
* Returned after a Live Activity end event is sent or queued.
|
|
@@ -798,7 +853,6 @@ export interface LiveActivityEndRequest {
|
|
|
798
853
|
* @interface LiveActivityEndResponse
|
|
799
854
|
*/
|
|
800
855
|
export interface LiveActivityEndResponse {
|
|
801
|
-
[key: string]: any | any;
|
|
802
856
|
/**
|
|
803
857
|
*
|
|
804
858
|
* @type {boolean}
|
|
@@ -836,7 +890,6 @@ export interface LiveActivityEndResponse {
|
|
|
836
890
|
* @interface LiveActivityLimitError
|
|
837
891
|
*/
|
|
838
892
|
export interface LiveActivityLimitError {
|
|
839
|
-
[key: string]: any | any;
|
|
840
893
|
/**
|
|
841
894
|
*
|
|
842
895
|
* @type {string}
|
|
@@ -868,7 +921,6 @@ export interface LiveActivityLimitError {
|
|
|
868
921
|
* @interface LiveActivityStartRequest
|
|
869
922
|
*/
|
|
870
923
|
export interface LiveActivityStartRequest {
|
|
871
|
-
[key: string]: any | any;
|
|
872
924
|
/**
|
|
873
925
|
*
|
|
874
926
|
* @type {ContentStateStart}
|
|
@@ -881,6 +933,12 @@ export interface LiveActivityStartRequest {
|
|
|
881
933
|
* @memberof LiveActivityStartRequest
|
|
882
934
|
*/
|
|
883
935
|
action?: LiveActivityAction;
|
|
936
|
+
/**
|
|
937
|
+
* 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.
|
|
938
|
+
* @type {LiveActivityAction}
|
|
939
|
+
* @memberof LiveActivityStartRequest
|
|
940
|
+
*/
|
|
941
|
+
secondary_action?: LiveActivityAction;
|
|
884
942
|
/**
|
|
885
943
|
*
|
|
886
944
|
* @type {AlertPayload}
|
|
@@ -900,7 +958,6 @@ export interface LiveActivityStartRequest {
|
|
|
900
958
|
* @interface LiveActivityStartResponse
|
|
901
959
|
*/
|
|
902
960
|
export interface LiveActivityStartResponse {
|
|
903
|
-
[key: string]: any | any;
|
|
904
961
|
/**
|
|
905
962
|
*
|
|
906
963
|
* @type {boolean}
|
|
@@ -944,7 +1001,6 @@ export interface LiveActivityStartResponse {
|
|
|
944
1001
|
* @interface LiveActivityStreamDeleteRequest
|
|
945
1002
|
*/
|
|
946
1003
|
export interface LiveActivityStreamDeleteRequest {
|
|
947
|
-
[key: string]: any | any;
|
|
948
1004
|
/**
|
|
949
1005
|
*
|
|
950
1006
|
* @type {StreamContentState}
|
|
@@ -957,6 +1013,12 @@ export interface LiveActivityStreamDeleteRequest {
|
|
|
957
1013
|
* @memberof LiveActivityStreamDeleteRequest
|
|
958
1014
|
*/
|
|
959
1015
|
action?: LiveActivityAction;
|
|
1016
|
+
/**
|
|
1017
|
+
* 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.
|
|
1018
|
+
* @type {LiveActivityAction}
|
|
1019
|
+
* @memberof LiveActivityStreamDeleteRequest
|
|
1020
|
+
*/
|
|
1021
|
+
secondary_action?: LiveActivityAction;
|
|
960
1022
|
/**
|
|
961
1023
|
*
|
|
962
1024
|
* @type {AlertPayload}
|
|
@@ -970,7 +1032,6 @@ export interface LiveActivityStreamDeleteRequest {
|
|
|
970
1032
|
* @interface LiveActivityStreamDeleteResponse
|
|
971
1033
|
*/
|
|
972
1034
|
export interface LiveActivityStreamDeleteResponse {
|
|
973
|
-
[key: string]: any | any;
|
|
974
1035
|
/**
|
|
975
1036
|
*
|
|
976
1037
|
* @type {boolean}
|
|
@@ -1027,7 +1088,6 @@ export type LiveActivityStreamDeleteResponseOperationEnum = typeof LiveActivityS
|
|
|
1027
1088
|
* @interface LiveActivityStreamPutResponse
|
|
1028
1089
|
*/
|
|
1029
1090
|
export interface LiveActivityStreamPutResponse {
|
|
1030
|
-
[key: string]: any | any;
|
|
1031
1091
|
/**
|
|
1032
1092
|
*
|
|
1033
1093
|
* @type {boolean}
|
|
@@ -1106,7 +1166,6 @@ export type LiveActivityStreamPutResponseOperationEnum = typeof LiveActivityStre
|
|
|
1106
1166
|
* @interface LiveActivityStreamRequest
|
|
1107
1167
|
*/
|
|
1108
1168
|
export interface LiveActivityStreamRequest {
|
|
1109
|
-
[key: string]: any | any;
|
|
1110
1169
|
/**
|
|
1111
1170
|
*
|
|
1112
1171
|
* @type {StreamContentState}
|
|
@@ -1119,6 +1178,12 @@ export interface LiveActivityStreamRequest {
|
|
|
1119
1178
|
* @memberof LiveActivityStreamRequest
|
|
1120
1179
|
*/
|
|
1121
1180
|
action?: LiveActivityAction;
|
|
1181
|
+
/**
|
|
1182
|
+
* 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.
|
|
1183
|
+
* @type {LiveActivityAction}
|
|
1184
|
+
* @memberof LiveActivityStreamRequest
|
|
1185
|
+
*/
|
|
1186
|
+
secondary_action?: LiveActivityAction;
|
|
1122
1187
|
/**
|
|
1123
1188
|
*
|
|
1124
1189
|
* @type {AlertPayload}
|
|
@@ -1144,7 +1209,6 @@ export interface LiveActivityStreamRequest {
|
|
|
1144
1209
|
* @interface LiveActivityUpdateRequest
|
|
1145
1210
|
*/
|
|
1146
1211
|
export interface LiveActivityUpdateRequest {
|
|
1147
|
-
[key: string]: any | any;
|
|
1148
1212
|
/**
|
|
1149
1213
|
*
|
|
1150
1214
|
* @type {string}
|
|
@@ -1163,6 +1227,12 @@ export interface LiveActivityUpdateRequest {
|
|
|
1163
1227
|
* @memberof LiveActivityUpdateRequest
|
|
1164
1228
|
*/
|
|
1165
1229
|
action?: LiveActivityAction;
|
|
1230
|
+
/**
|
|
1231
|
+
* 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.
|
|
1232
|
+
* @type {LiveActivityAction}
|
|
1233
|
+
* @memberof LiveActivityUpdateRequest
|
|
1234
|
+
*/
|
|
1235
|
+
secondary_action?: LiveActivityAction;
|
|
1166
1236
|
}
|
|
1167
1237
|
/**
|
|
1168
1238
|
* Returned after a Live Activity update is sent or queued.
|
|
@@ -1170,7 +1240,6 @@ export interface LiveActivityUpdateRequest {
|
|
|
1170
1240
|
* @interface LiveActivityUpdateResponse
|
|
1171
1241
|
*/
|
|
1172
1242
|
export interface LiveActivityUpdateResponse {
|
|
1173
|
-
[key: string]: any | any;
|
|
1174
1243
|
/**
|
|
1175
1244
|
*
|
|
1176
1245
|
* @type {boolean}
|
|
@@ -1217,7 +1286,6 @@ export type LiveActivityWebhookMethod = typeof LiveActivityWebhookMethod[keyof t
|
|
|
1217
1286
|
* @interface MetricError
|
|
1218
1287
|
*/
|
|
1219
1288
|
export interface MetricError {
|
|
1220
|
-
[key: string]: any | any;
|
|
1221
1289
|
/**
|
|
1222
1290
|
*
|
|
1223
1291
|
* @type {string}
|
|
@@ -1237,7 +1305,6 @@ export interface MetricError {
|
|
|
1237
1305
|
* @interface MetricValueUpdateRequest
|
|
1238
1306
|
*/
|
|
1239
1307
|
export interface MetricValueUpdateRequest {
|
|
1240
|
-
[key: string]: any | any;
|
|
1241
1308
|
/**
|
|
1242
1309
|
*
|
|
1243
1310
|
* @type {MetricValueUpdateRequestValue}
|
|
@@ -1263,7 +1330,6 @@ export type MetricValueUpdateRequestValue = number | string;
|
|
|
1263
1330
|
* @interface MetricValueUpdateResponse
|
|
1264
1331
|
*/
|
|
1265
1332
|
export interface MetricValueUpdateResponse {
|
|
1266
|
-
[key: string]: any | any;
|
|
1267
1333
|
/**
|
|
1268
1334
|
*
|
|
1269
1335
|
* @type {boolean}
|
|
@@ -1277,7 +1343,6 @@ export interface MetricValueUpdateResponse {
|
|
|
1277
1343
|
* @interface NoRecipientsError
|
|
1278
1344
|
*/
|
|
1279
1345
|
export interface NoRecipientsError {
|
|
1280
|
-
[key: string]: any | any;
|
|
1281
1346
|
/**
|
|
1282
1347
|
*
|
|
1283
1348
|
* @type {string}
|
|
@@ -1303,7 +1368,6 @@ export interface NoRecipientsError {
|
|
|
1303
1368
|
* @interface NotFoundError
|
|
1304
1369
|
*/
|
|
1305
1370
|
export interface NotFoundError {
|
|
1306
|
-
[key: string]: any | any;
|
|
1307
1371
|
/**
|
|
1308
1372
|
*
|
|
1309
1373
|
* @type {string}
|
|
@@ -1350,12 +1414,10 @@ export interface PushNotificationAction {
|
|
|
1350
1414
|
method?: PushNotificationWebhookMethod;
|
|
1351
1415
|
/**
|
|
1352
1416
|
* Optional webhook payload body. Used only when type=webhook.
|
|
1353
|
-
* @type {
|
|
1417
|
+
* @type {object}
|
|
1354
1418
|
* @memberof PushNotificationAction
|
|
1355
1419
|
*/
|
|
1356
|
-
body?:
|
|
1357
|
-
[key: string]: any;
|
|
1358
|
-
};
|
|
1420
|
+
body?: object;
|
|
1359
1421
|
}
|
|
1360
1422
|
/**
|
|
1361
1423
|
*
|
|
@@ -1411,12 +1473,10 @@ export interface PushNotificationRequest {
|
|
|
1411
1473
|
actions?: Array<PushNotificationAction>;
|
|
1412
1474
|
/**
|
|
1413
1475
|
*
|
|
1414
|
-
* @type {
|
|
1476
|
+
* @type {object}
|
|
1415
1477
|
* @memberof PushNotificationRequest
|
|
1416
1478
|
*/
|
|
1417
|
-
payload?:
|
|
1418
|
-
[key: string]: any;
|
|
1419
|
-
};
|
|
1479
|
+
payload?: object;
|
|
1420
1480
|
/**
|
|
1421
1481
|
*
|
|
1422
1482
|
* @type {number}
|
|
@@ -1442,7 +1502,6 @@ export interface PushNotificationRequest {
|
|
|
1442
1502
|
* @interface PushNotificationResponse
|
|
1443
1503
|
*/
|
|
1444
1504
|
export interface PushNotificationResponse {
|
|
1445
|
-
[key: string]: any | any;
|
|
1446
1505
|
/**
|
|
1447
1506
|
*
|
|
1448
1507
|
* @type {boolean}
|
|
@@ -1489,7 +1548,6 @@ export type PushNotificationWebhookMethod = typeof PushNotificationWebhookMethod
|
|
|
1489
1548
|
* @interface RateLimitError
|
|
1490
1549
|
*/
|
|
1491
1550
|
export interface RateLimitError {
|
|
1492
|
-
[key: string]: any | any;
|
|
1493
1551
|
/**
|
|
1494
1552
|
*
|
|
1495
1553
|
* @type {string}
|
|
@@ -1515,7 +1573,6 @@ export type SendPushNotification429Response = LiveActivityLimitError | RateLimit
|
|
|
1515
1573
|
* @interface StreamContentState
|
|
1516
1574
|
*/
|
|
1517
1575
|
export interface StreamContentState {
|
|
1518
|
-
[key: string]: any | any;
|
|
1519
1576
|
/**
|
|
1520
1577
|
*
|
|
1521
1578
|
* @type {string}
|
|
@@ -1583,7 +1640,7 @@ export interface StreamContentState {
|
|
|
1583
1640
|
*/
|
|
1584
1641
|
type?: StreamContentStateTypeEnum;
|
|
1585
1642
|
/**
|
|
1586
|
-
* Optional. Accent color for progress, segmented_progress, metrics, and timer Live Activities. For Alert Live Activities, this tints
|
|
1643
|
+
* Optional. Accent color for progress, segmented_progress, metrics, and timer Live Activities. For Alert Live Activities, this tints action and secondary_action buttons when included.
|
|
1587
1644
|
* @type {string}
|
|
1588
1645
|
* @memberof StreamContentState
|
|
1589
1646
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AppIconBadgesApi, LiveActivitiesApi, MetricsApi, PushNotificationsApi } from "../generated/index";
|
|
2
2
|
export interface ActivitySmithOptions {
|
|
3
3
|
apiKey: string;
|
|
4
4
|
}
|
|
@@ -18,9 +18,13 @@ type MetricUpdateRequestBody = MetricUpdateParameters["metricValueUpdateRequest"
|
|
|
18
18
|
type MetricValue = MetricUpdateRequestBody["value"];
|
|
19
19
|
type MetricUpdateOptions = Omit<MetricUpdateRequestBody, "value">;
|
|
20
20
|
type MetricInitOverrides = Parameters<MetricsApi["updateMetricValue"]>[1];
|
|
21
|
+
type AppIconBadgeInitOverrides = Parameters<AppIconBadgesApi["updateAppIconBadgeCount"]>[1];
|
|
21
22
|
type PushSendRequest = PushRequestBody & {
|
|
22
23
|
channels?: string[];
|
|
23
24
|
};
|
|
25
|
+
export type BadgeCountOptions = {
|
|
26
|
+
channels?: string[];
|
|
27
|
+
};
|
|
24
28
|
declare const LiveActivityTypes: {
|
|
25
29
|
readonly segmentedProgress: "segmented_progress";
|
|
26
30
|
readonly progress: "progress";
|
|
@@ -131,6 +135,8 @@ export declare class ActivitySmith {
|
|
|
131
135
|
readonly notifications: NotificationsResource;
|
|
132
136
|
readonly liveActivities: LiveActivitiesResource;
|
|
133
137
|
readonly metrics: MetricsResource;
|
|
138
|
+
private readonly appIconBadgesApi;
|
|
134
139
|
constructor(opts: ActivitySmithOptions);
|
|
140
|
+
badgeCount(badge: number, options?: BadgeCountOptions, initOverrides?: AppIconBadgeInitOverrides): Promise<import("../generated/models").AppIconBadgeCountUpdateResponse>;
|
|
135
141
|
}
|
|
136
142
|
export {};
|
|
@@ -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.9.0";
|
|
6
6
|
const SDK_HEADER_NAME = "X-ActivitySmith-SDK";
|
|
7
7
|
const SDK_HEADER_VALUE = `node-v${SDK_VERSION}`;
|
|
8
8
|
const LiveActivityTypes = {
|
|
@@ -186,6 +186,15 @@ class ActivitySmith {
|
|
|
186
186
|
this.notifications = new NotificationsResource(new index_1.PushNotificationsApi(config));
|
|
187
187
|
this.liveActivities = new LiveActivitiesResource(new index_1.LiveActivitiesApi(config));
|
|
188
188
|
this.metrics = new MetricsResource(new index_1.MetricsApi(config));
|
|
189
|
+
this.appIconBadgesApi = new index_1.AppIconBadgesApi(config);
|
|
190
|
+
}
|
|
191
|
+
badgeCount(badge, options = {}, initOverrides) {
|
|
192
|
+
return this.appIconBadgesApi.updateAppIconBadgeCount({
|
|
193
|
+
appIconBadgeCountUpdateRequest: withTargetChannels({
|
|
194
|
+
badge,
|
|
195
|
+
...options,
|
|
196
|
+
}),
|
|
197
|
+
}, initOverrides);
|
|
189
198
|
}
|
|
190
199
|
}
|
|
191
200
|
exports.ActivitySmith = ActivitySmith;
|