activitysmith 1.8.0 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -20,8 +20,10 @@ 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)
26
+ - [Tags](#tags)
25
27
 
26
28
  ## Installation
27
29
 
@@ -468,18 +470,6 @@ Choose from these colors for the Live Activity accent, including progress bars a
468
470
 
469
471
  `lime`, `green`, `cyan`, `blue`, `purple`, `magenta`, `red`, `orange`, `yellow`, `gray`
470
472
 
471
- ## Channels
472
-
473
- Channels are used to target specific team members or devices. Can be used for both push notifications and live activities.
474
-
475
- ```ts
476
- await activitysmith.notifications.send({
477
- title: "New subscription 💸",
478
- message: "Customer upgraded to Pro plan",
479
- channels: ["sales", "customer-success"], // Optional
480
- });
481
- ```
482
-
483
473
  ## Widgets
484
474
 
485
475
  <p align="center">
@@ -504,6 +494,74 @@ String metric values work too.
504
494
  await activitysmith.metrics.update("prod.status", "healthy");
505
495
  ```
506
496
 
497
+ ## App Icon Badge Count
498
+
499
+ <p align="center">
500
+ <img src="https://cdn.activitysmith.com/features/badge-count.png" alt="ActivitySmith app icon with an App Icon Badge Count" width="680" />
501
+ </p>
502
+
503
+ 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.
504
+
505
+ Set or update the badge value.
506
+
507
+ ```ts
508
+ await activitysmith.badgeCount(8333);
509
+ ```
510
+
511
+ To clear the badge, set its value to 0.
512
+
513
+ ```ts
514
+ await activitysmith.badgeCount(0);
515
+ ```
516
+
517
+ ## Channels
518
+
519
+ Use `channels` to target specific team members or devices
520
+
521
+ ### Push Notifications
522
+
523
+ ```ts
524
+ await activitysmith.notifications.send({
525
+ title: "New subscription 💸",
526
+ message: "Customer upgraded to Pro plan",
527
+ channels: ["sales", "customer-success"],
528
+ });
529
+ ```
530
+
531
+ ### Live Activities
532
+
533
+ ```ts
534
+ await activitysmith.liveActivities.start({
535
+ content_state: {
536
+ title: "Nightly Database Backup",
537
+ subtitle: "verify restore",
538
+ type: "progress",
539
+ percentage: 62,
540
+ },
541
+ channels: ["sales", "customer-success"],
542
+ });
543
+ ```
544
+
545
+ ### App Icon Badge Count
546
+
547
+ ```ts
548
+ await activitysmith.badgeCount(3, {
549
+ channels: ["sales", "customer-success"],
550
+ });
551
+ ```
552
+
553
+ ## Tags
554
+
555
+ Use `tags` to organize and filter your Push Notification and Live Activity history. Tags are created automatically when you first use them.
556
+
557
+ ```ts
558
+ await activitysmith.notifications.send({
559
+ title: "New subscription 💸",
560
+ message: "Customer upgraded to Pro plan",
561
+ tags: ["user:382", "billing"],
562
+ });
563
+ ```
564
+
507
565
  ## Error Handling
508
566
 
509
567
  ```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
+ * Shows a number on the ActivitySmith app icon.
23
+ * Set App Icon Badge Count
24
+ */
25
+ updateAppIconBadgeCountRaw(requestParameters: UpdateAppIconBadgeCountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AppIconBadgeCountUpdateResponse>>;
26
+ /**
27
+ * Shows a number on the ActivitySmith app icon.
28
+ * Set 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
+ * Shows a number on the ActivitySmith app icon.
24
+ * Set 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
+ * Shows a number on the ActivitySmith app icon.
51
+ * Set 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. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only.
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.
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. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only.
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.
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 segmented_progress Live Activities only.
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.
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 segmented_progress Live Activities only.
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.
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 segmented_progress Live Activities only.
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. 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 segmented_progress Live Activities only.
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. 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 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.
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. 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 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.
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. 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 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.
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.
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. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only.
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.
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. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only.
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.
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. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only.
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.
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 segmented_progress Live Activities only.
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.
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 segmented_progress Live Activities only.
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.
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 segmented_progress Live Activities only.
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. 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 segmented_progress Live Activities only.
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. 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 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.
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. 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 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.
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. 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 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.
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.
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. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only.
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.
194
194
  * Update a Live Activity (legacy manual lifecycle)
195
195
  */
196
196
  async updateLiveActivity(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`.
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.
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`.
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.
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`.
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.
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`.
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.
51
51
  * Send a push notification
52
52
  */
53
53
  async sendPushNotification(requestParameters, initOverrides) {
@@ -1,3 +1,4 @@
1
+ export * from './AppIconBadgesApi';
1
2
  export * from './LiveActivitiesApi';
2
3
  export * from './MetricsApi';
3
4
  export * from './PushNotificationsApi';
@@ -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
+ *
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}
@@ -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}
@@ -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}
@@ -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}
@@ -680,7 +734,7 @@ export interface LiveActivityAction {
680
734
  */
681
735
  type: LiveActivityActionType;
682
736
  /**
683
- * Action URL. For open_url, use an HTTPS URL or a shortcuts://run-shortcut?name=... URL that runs a specific iPhone Shortcut. For webhook, use an HTTPS URL called by the ActivitySmith backend.
737
+ * Action URL. For open_url, use an HTTP or HTTPS URL or a shortcuts://run-shortcut?name=... URL that runs a specific iPhone Shortcut. For webhook, use an HTTPS URL called by the ActivitySmith backend.
684
738
  * @type {string}
685
739
  * @memberof LiveActivityAction
686
740
  */
@@ -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 {{ [key: string]: any; }}
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}
@@ -792,7 +841,7 @@ export interface LiveActivityEndRequest {
792
841
  */
793
842
  action?: LiveActivityAction;
794
843
  /**
795
- * Optional secondary action button. Supported only for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
844
+ * Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
796
845
  * @type {LiveActivityAction}
797
846
  * @memberof LiveActivityEndRequest
798
847
  */
@@ -804,7 +853,6 @@ export interface LiveActivityEndRequest {
804
853
  * @interface LiveActivityEndResponse
805
854
  */
806
855
  export interface LiveActivityEndResponse {
807
- [key: string]: any | any;
808
856
  /**
809
857
  *
810
858
  * @type {boolean}
@@ -842,7 +890,6 @@ export interface LiveActivityEndResponse {
842
890
  * @interface LiveActivityLimitError
843
891
  */
844
892
  export interface LiveActivityLimitError {
845
- [key: string]: any | any;
846
893
  /**
847
894
  *
848
895
  * @type {string}
@@ -874,7 +921,6 @@ export interface LiveActivityLimitError {
874
921
  * @interface LiveActivityStartRequest
875
922
  */
876
923
  export interface LiveActivityStartRequest {
877
- [key: string]: any | any;
878
924
  /**
879
925
  *
880
926
  * @type {ContentStateStart}
@@ -888,7 +934,7 @@ export interface LiveActivityStartRequest {
888
934
  */
889
935
  action?: LiveActivityAction;
890
936
  /**
891
- * Optional secondary action button. Supported only for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
937
+ * Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
892
938
  * @type {LiveActivityAction}
893
939
  * @memberof LiveActivityStartRequest
894
940
  */
@@ -905,6 +951,12 @@ export interface LiveActivityStartRequest {
905
951
  * @memberof LiveActivityStartRequest
906
952
  */
907
953
  target?: ChannelTarget;
954
+ /**
955
+ * Optional tags to organize and filter notification history.
956
+ * @type {Array<string>}
957
+ * @memberof LiveActivityStartRequest
958
+ */
959
+ tags?: Array<string>;
908
960
  }
909
961
  /**
910
962
  * Returned after a Live Activity starts. Save activity_id and use it for all later updates and for the final end call.
@@ -912,7 +964,6 @@ export interface LiveActivityStartRequest {
912
964
  * @interface LiveActivityStartResponse
913
965
  */
914
966
  export interface LiveActivityStartResponse {
915
- [key: string]: any | any;
916
967
  /**
917
968
  *
918
969
  * @type {boolean}
@@ -943,6 +994,12 @@ export interface LiveActivityStartResponse {
943
994
  * @memberof LiveActivityStartResponse
944
995
  */
945
996
  effective_channel_slugs?: Array<string>;
997
+ /**
998
+ * Optional tags to organize and filter notification history.
999
+ * @type {Array<string>}
1000
+ * @memberof LiveActivityStartResponse
1001
+ */
1002
+ tags?: Array<string>;
946
1003
  /**
947
1004
  *
948
1005
  * @type {string}
@@ -956,7 +1013,6 @@ export interface LiveActivityStartResponse {
956
1013
  * @interface LiveActivityStreamDeleteRequest
957
1014
  */
958
1015
  export interface LiveActivityStreamDeleteRequest {
959
- [key: string]: any | any;
960
1016
  /**
961
1017
  *
962
1018
  * @type {StreamContentState}
@@ -970,7 +1026,7 @@ export interface LiveActivityStreamDeleteRequest {
970
1026
  */
971
1027
  action?: LiveActivityAction;
972
1028
  /**
973
- * Optional secondary action button. Supported only for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
1029
+ * Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
974
1030
  * @type {LiveActivityAction}
975
1031
  * @memberof LiveActivityStreamDeleteRequest
976
1032
  */
@@ -988,7 +1044,6 @@ export interface LiveActivityStreamDeleteRequest {
988
1044
  * @interface LiveActivityStreamDeleteResponse
989
1045
  */
990
1046
  export interface LiveActivityStreamDeleteResponse {
991
- [key: string]: any | any;
992
1047
  /**
993
1048
  *
994
1049
  * @type {boolean}
@@ -1045,7 +1100,6 @@ export type LiveActivityStreamDeleteResponseOperationEnum = typeof LiveActivityS
1045
1100
  * @interface LiveActivityStreamPutResponse
1046
1101
  */
1047
1102
  export interface LiveActivityStreamPutResponse {
1048
- [key: string]: any | any;
1049
1103
  /**
1050
1104
  *
1051
1105
  * @type {boolean}
@@ -1100,6 +1154,12 @@ export interface LiveActivityStreamPutResponse {
1100
1154
  * @memberof LiveActivityStreamPutResponse
1101
1155
  */
1102
1156
  effective_channel_slugs?: Array<string>;
1157
+ /**
1158
+ * Optional tags to organize and filter notification history.
1159
+ * @type {Array<string>}
1160
+ * @memberof LiveActivityStreamPutResponse
1161
+ */
1162
+ tags?: Array<string>;
1103
1163
  /**
1104
1164
  *
1105
1165
  * @type {string}
@@ -1124,7 +1184,6 @@ export type LiveActivityStreamPutResponseOperationEnum = typeof LiveActivityStre
1124
1184
  * @interface LiveActivityStreamRequest
1125
1185
  */
1126
1186
  export interface LiveActivityStreamRequest {
1127
- [key: string]: any | any;
1128
1187
  /**
1129
1188
  *
1130
1189
  * @type {StreamContentState}
@@ -1138,7 +1197,7 @@ export interface LiveActivityStreamRequest {
1138
1197
  */
1139
1198
  action?: LiveActivityAction;
1140
1199
  /**
1141
- * Optional secondary action button. Supported only for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
1200
+ * Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
1142
1201
  * @type {LiveActivityAction}
1143
1202
  * @memberof LiveActivityStreamRequest
1144
1203
  */
@@ -1161,6 +1220,12 @@ export interface LiveActivityStreamRequest {
1161
1220
  * @memberof LiveActivityStreamRequest
1162
1221
  */
1163
1222
  target?: ChannelTarget;
1223
+ /**
1224
+ * Optional tags to organize and filter notification history.
1225
+ * @type {Array<string>}
1226
+ * @memberof LiveActivityStreamRequest
1227
+ */
1228
+ tags?: Array<string>;
1164
1229
  }
1165
1230
  /**
1166
1231
  * Update an existing Live Activity by activity_id.
@@ -1168,7 +1233,6 @@ export interface LiveActivityStreamRequest {
1168
1233
  * @interface LiveActivityUpdateRequest
1169
1234
  */
1170
1235
  export interface LiveActivityUpdateRequest {
1171
- [key: string]: any | any;
1172
1236
  /**
1173
1237
  *
1174
1238
  * @type {string}
@@ -1188,7 +1252,7 @@ export interface LiveActivityUpdateRequest {
1188
1252
  */
1189
1253
  action?: LiveActivityAction;
1190
1254
  /**
1191
- * Optional secondary action button. Supported only for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
1255
+ * Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
1192
1256
  * @type {LiveActivityAction}
1193
1257
  * @memberof LiveActivityUpdateRequest
1194
1258
  */
@@ -1200,7 +1264,6 @@ export interface LiveActivityUpdateRequest {
1200
1264
  * @interface LiveActivityUpdateResponse
1201
1265
  */
1202
1266
  export interface LiveActivityUpdateResponse {
1203
- [key: string]: any | any;
1204
1267
  /**
1205
1268
  *
1206
1269
  * @type {boolean}
@@ -1247,7 +1310,6 @@ export type LiveActivityWebhookMethod = typeof LiveActivityWebhookMethod[keyof t
1247
1310
  * @interface MetricError
1248
1311
  */
1249
1312
  export interface MetricError {
1250
- [key: string]: any | any;
1251
1313
  /**
1252
1314
  *
1253
1315
  * @type {string}
@@ -1267,7 +1329,6 @@ export interface MetricError {
1267
1329
  * @interface MetricValueUpdateRequest
1268
1330
  */
1269
1331
  export interface MetricValueUpdateRequest {
1270
- [key: string]: any | any;
1271
1332
  /**
1272
1333
  *
1273
1334
  * @type {MetricValueUpdateRequestValue}
@@ -1293,7 +1354,6 @@ export type MetricValueUpdateRequestValue = number | string;
1293
1354
  * @interface MetricValueUpdateResponse
1294
1355
  */
1295
1356
  export interface MetricValueUpdateResponse {
1296
- [key: string]: any | any;
1297
1357
  /**
1298
1358
  *
1299
1359
  * @type {boolean}
@@ -1307,7 +1367,6 @@ export interface MetricValueUpdateResponse {
1307
1367
  * @interface NoRecipientsError
1308
1368
  */
1309
1369
  export interface NoRecipientsError {
1310
- [key: string]: any | any;
1311
1370
  /**
1312
1371
  *
1313
1372
  * @type {string}
@@ -1333,7 +1392,6 @@ export interface NoRecipientsError {
1333
1392
  * @interface NotFoundError
1334
1393
  */
1335
1394
  export interface NotFoundError {
1336
- [key: string]: any | any;
1337
1395
  /**
1338
1396
  *
1339
1397
  * @type {string}
@@ -1367,7 +1425,7 @@ export interface PushNotificationAction {
1367
1425
  */
1368
1426
  type: PushNotificationActionType;
1369
1427
  /**
1370
- * Action URL. For open_url, use an HTTPS URL or a shortcuts://run-shortcut?name=... URL that runs a specific iPhone Shortcut. For webhook, use an HTTPS URL called by the ActivitySmith backend.
1428
+ * Action URL. For open_url, use an HTTP or HTTPS URL or a shortcuts://run-shortcut?name=... URL that runs a specific iPhone Shortcut. For webhook, use an HTTPS URL called by the ActivitySmith backend.
1371
1429
  * @type {string}
1372
1430
  * @memberof PushNotificationAction
1373
1431
  */
@@ -1380,12 +1438,10 @@ export interface PushNotificationAction {
1380
1438
  method?: PushNotificationWebhookMethod;
1381
1439
  /**
1382
1440
  * Optional webhook payload body. Used only when type=webhook.
1383
- * @type {{ [key: string]: any; }}
1441
+ * @type {object}
1384
1442
  * @memberof PushNotificationAction
1385
1443
  */
1386
- body?: {
1387
- [key: string]: any;
1388
- };
1444
+ body?: object;
1389
1445
  }
1390
1446
  /**
1391
1447
  *
@@ -1428,7 +1484,7 @@ export interface PushNotificationRequest {
1428
1484
  */
1429
1485
  media?: string;
1430
1486
  /**
1431
- * Optional HTTPS URL or shortcuts://run-shortcut?name=... URL opened when the user taps the notification body. Use shortcuts://run-shortcut?name=... to run a specific iPhone Shortcut that already exists on the user's device. Overrides the default tap target from `media` when both are provided.
1487
+ * Optional HTTP URL, HTTPS URL, or shortcuts://run-shortcut?name=... URL opened when the user taps the notification body. Use shortcuts://run-shortcut?name=... to run a specific iPhone Shortcut that already exists on the user's device. Overrides the default tap target from `media` when both are provided.
1432
1488
  * @type {string}
1433
1489
  * @memberof PushNotificationRequest
1434
1490
  */
@@ -1441,12 +1497,10 @@ export interface PushNotificationRequest {
1441
1497
  actions?: Array<PushNotificationAction>;
1442
1498
  /**
1443
1499
  *
1444
- * @type {{ [key: string]: any; }}
1500
+ * @type {object}
1445
1501
  * @memberof PushNotificationRequest
1446
1502
  */
1447
- payload?: {
1448
- [key: string]: any;
1449
- };
1503
+ payload?: object;
1450
1504
  /**
1451
1505
  *
1452
1506
  * @type {number}
@@ -1465,6 +1519,12 @@ export interface PushNotificationRequest {
1465
1519
  * @memberof PushNotificationRequest
1466
1520
  */
1467
1521
  target?: ChannelTarget;
1522
+ /**
1523
+ * Optional tags to organize and filter notification history.
1524
+ * @type {Array<string>}
1525
+ * @memberof PushNotificationRequest
1526
+ */
1527
+ tags?: Array<string>;
1468
1528
  }
1469
1529
  /**
1470
1530
  *
@@ -1472,7 +1532,6 @@ export interface PushNotificationRequest {
1472
1532
  * @interface PushNotificationResponse
1473
1533
  */
1474
1534
  export interface PushNotificationResponse {
1475
- [key: string]: any | any;
1476
1535
  /**
1477
1536
  *
1478
1537
  * @type {boolean}
@@ -1497,6 +1556,12 @@ export interface PushNotificationResponse {
1497
1556
  * @memberof PushNotificationResponse
1498
1557
  */
1499
1558
  effective_channel_slugs?: Array<string>;
1559
+ /**
1560
+ * Optional tags to organize and filter notification history.
1561
+ * @type {Array<string>}
1562
+ * @memberof PushNotificationResponse
1563
+ */
1564
+ tags?: Array<string>;
1500
1565
  /**
1501
1566
  *
1502
1567
  * @type {string}
@@ -1519,7 +1584,6 @@ export type PushNotificationWebhookMethod = typeof PushNotificationWebhookMethod
1519
1584
  * @interface RateLimitError
1520
1585
  */
1521
1586
  export interface RateLimitError {
1522
- [key: string]: any | any;
1523
1587
  /**
1524
1588
  *
1525
1589
  * @type {string}
@@ -1545,7 +1609,6 @@ export type SendPushNotification429Response = LiveActivityLimitError | RateLimit
1545
1609
  * @interface StreamContentState
1546
1610
  */
1547
1611
  export interface StreamContentState {
1548
- [key: string]: any | any;
1549
1612
  /**
1550
1613
  *
1551
1614
  * @type {string}
@@ -1,4 +1,4 @@
1
- import { PushNotificationsApi, LiveActivitiesApi, MetricsApi } from "../generated/index";
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.8.0";
5
+ const SDK_VERSION = "1.10.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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "activitysmith",
3
- "version": "1.8.0",
3
+ "version": "1.10.0",
4
4
  "description": "Official ActivitySmith Node.js SDK",
5
5
  "keywords": [
6
6
  "activitysmith",