activitysmith 1.9.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3c618daeffaa021171b3dc5c77d820ea1c4abb8eec2545dcf7238a00fefa98e5
4
- data.tar.gz: 499260d8e84bb8c20dddfdbd0e26a19b3fbfdee738f1d9d802ea3505cb8aa17c
3
+ metadata.gz: 56e1c73a642c093215a09fe5e57aa7a5e33a5e6f7bfdce44e11ea731c36ec9e5
4
+ data.tar.gz: 0421b3c7ea2f1bc8d7b49de0d8b6eb9dfddc209161eebff46c4bc567cc65d90d
5
5
  SHA512:
6
- metadata.gz: 8d19ad31e4d0377df4885ba054933aa87a78368056735e4877e637ec9035aecb9b7436f83342a5e8db8415b0ccb0a0f532effb5269587a7dde72dc2e2a5b0b6d
7
- data.tar.gz: 91d7f07629f5ce83cffc2273bbb803b5710331d347d674005d1de3cfdd1fbe22291a9407b5c7b4f27593ea7e73437ab1e363f891aa8933b82b15f70f03becafc
6
+ metadata.gz: 93deb0d9008171575a0bbaaa8d6223bf9bbf0522ea5a1717c39ac4a0aa9fac52ef0b6ffe1fc51193506dd09113adae129c5ee986c46bbf32e8f5681fc6d8b7f5
7
+ data.tar.gz: 3b6d91d5fc7218823e0e045906d2a9a370aa3e8b7f8902e5ca94fcbf4ffad0ba2e847b5d5d3a7919c2449fcaaea7ace4682e18592a93fa9b243d1b8370bb0e6e
data/README.md CHANGED
@@ -23,6 +23,7 @@ See [API reference](https://activitysmith.com/docs/api-reference/introduction).
23
23
  - [Widgets](#widgets)
24
24
  - [App Icon Badge Count](#app-icon-badge-count)
25
25
  - [Channels](#channels)
26
+ - [Tags](#tags)
26
27
 
27
28
  ## Installation
28
29
 
@@ -616,6 +617,20 @@ activitysmith.live_activities.start(
616
617
  activitysmith.badge_count(3, channels: ["sales", "customer-success"])
617
618
  ```
618
619
 
620
+ ## Tags
621
+
622
+ Use `tags` to organize and filter your Push Notification and Live Activity history. Tags are created automatically when you first use them.
623
+
624
+ ```ruby
625
+ activitysmith.notifications.send(
626
+ {
627
+ title: "New subscription 💸",
628
+ message: "Customer upgraded to Pro plan",
629
+ tags: ["user:382", "billing"]
630
+ }
631
+ )
632
+ ```
633
+
619
634
  ## Error Handling
620
635
 
621
636
  ```ruby
@@ -19,8 +19,8 @@ module OpenapiClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Update App Icon Badge Count
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.
22
+ # Set App Icon Badge Count
23
+ # Shows a number on the ActivitySmith app icon.
24
24
  # @param app_icon_badge_count_update_request [AppIconBadgeCountUpdateRequest]
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @return [AppIconBadgeCountUpdateResponse]
@@ -29,8 +29,8 @@ module OpenapiClient
29
29
  data
30
30
  end
31
31
 
32
- # Update App Icon Badge Count
33
- # 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.
32
+ # Set App Icon Badge Count
33
+ # Shows a number on the ActivitySmith app icon.
34
34
  # @param app_icon_badge_count_update_request [AppIconBadgeCountUpdateRequest]
35
35
  # @param [Hash] opts the optional parameters
36
36
  # @return [Array<(AppIconBadgeCountUpdateResponse, Integer, Hash)>] AppIconBadgeCountUpdateResponse data, response status code and response headers
@@ -20,7 +20,7 @@ module OpenapiClient
20
20
  @api_client = api_client
21
21
  end
22
22
  # End a Live Activity (legacy manual lifecycle)
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
  # @param live_activity_end_request [LiveActivityEndRequest]
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @return [LiveActivityEndResponse]
@@ -30,7 +30,7 @@ module OpenapiClient
30
30
  end
31
31
 
32
32
  # End a Live Activity (legacy manual lifecycle)
33
- # 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.
33
+ # 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.
34
34
  # @param live_activity_end_request [LiveActivityEndRequest]
35
35
  # @param [Hash] opts the optional parameters
36
36
  # @return [Array<(LiveActivityEndResponse, Integer, Hash)>] LiveActivityEndResponse data, response status code and response headers
@@ -88,7 +88,7 @@ module OpenapiClient
88
88
  end
89
89
 
90
90
  # End a stream
91
- # 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.
91
+ # 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.
92
92
  # @param stream_key [String] Stable identifier for one ongoing thing. Allowed characters: letters, numbers, underscores, and hyphens.
93
93
  # @param [Hash] opts the optional parameters
94
94
  # @option opts [LiveActivityStreamDeleteRequest] :live_activity_stream_delete_request
@@ -99,7 +99,7 @@ module OpenapiClient
99
99
  end
100
100
 
101
101
  # End a stream
102
- # 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.
102
+ # 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.
103
103
  # @param stream_key [String] Stable identifier for one ongoing thing. Allowed characters: letters, numbers, underscores, and hyphens.
104
104
  # @param [Hash] opts the optional parameters
105
105
  # @option opts [LiveActivityStreamDeleteRequest] :live_activity_stream_delete_request
@@ -167,7 +167,7 @@ module OpenapiClient
167
167
  end
168
168
 
169
169
  # Start a new Live Activity or update an existing one
170
- # 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.
170
+ # 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.
171
171
  # @param stream_key [String] Stable identifier for one ongoing thing. Allowed characters: letters, numbers, underscores, and hyphens.
172
172
  # @param live_activity_stream_request [LiveActivityStreamRequest]
173
173
  # @param [Hash] opts the optional parameters
@@ -178,7 +178,7 @@ module OpenapiClient
178
178
  end
179
179
 
180
180
  # Start a new Live Activity or update an existing one
181
- # 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.
181
+ # 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.
182
182
  # @param stream_key [String] Stable identifier for one ongoing thing. Allowed characters: letters, numbers, underscores, and hyphens.
183
183
  # @param live_activity_stream_request [LiveActivityStreamRequest]
184
184
  # @param [Hash] opts the optional parameters
@@ -250,7 +250,7 @@ module OpenapiClient
250
250
  end
251
251
 
252
252
  # Start a Live Activity (legacy manual lifecycle)
253
- # 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.
253
+ # 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.
254
254
  # @param live_activity_start_request [LiveActivityStartRequest]
255
255
  # @param [Hash] opts the optional parameters
256
256
  # @return [LiveActivityStartResponse]
@@ -260,7 +260,7 @@ module OpenapiClient
260
260
  end
261
261
 
262
262
  # Start a Live Activity (legacy manual lifecycle)
263
- # 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.
263
+ # 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.
264
264
  # @param live_activity_start_request [LiveActivityStartRequest]
265
265
  # @param [Hash] opts the optional parameters
266
266
  # @return [Array<(LiveActivityStartResponse, Integer, Hash)>] LiveActivityStartResponse data, response status code and response headers
@@ -318,7 +318,7 @@ module OpenapiClient
318
318
  end
319
319
 
320
320
  # Update a Live Activity (legacy manual lifecycle)
321
- # 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.
321
+ # 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.
322
322
  # @param live_activity_update_request [LiveActivityUpdateRequest]
323
323
  # @param [Hash] opts the optional parameters
324
324
  # @return [LiveActivityUpdateResponse]
@@ -328,7 +328,7 @@ module OpenapiClient
328
328
  end
329
329
 
330
330
  # Update a Live Activity (legacy manual lifecycle)
331
- # 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.
331
+ # 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.
332
332
  # @param live_activity_update_request [LiveActivityUpdateRequest]
333
333
  # @param [Hash] opts the optional parameters
334
334
  # @return [Array<(LiveActivityUpdateResponse, Integer, Hash)>] LiveActivityUpdateResponse data, response status code and response headers
@@ -20,7 +20,7 @@ module OpenapiClient
20
20
  @api_client = api_client
21
21
  end
22
22
  # Send a push notification
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
  # @param push_notification_request [PushNotificationRequest]
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @return [PushNotificationResponse]
@@ -30,7 +30,7 @@ module OpenapiClient
30
30
  end
31
31
 
32
32
  # Send a push notification
33
- # 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. &#x60;media&#x60; cannot be combined with &#x60;actions&#x60;.
33
+ # 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. &#x60;media&#x60; cannot be combined with &#x60;actions&#x60;. Optional tags to organize and filter notification history.
34
34
  # @param push_notification_request [PushNotificationRequest]
35
35
  # @param [Hash] opts the optional parameters
36
36
  # @return [Array<(PushNotificationResponse, Integer, Hash)>] PushNotificationResponse data, response status code and response headers
@@ -14,7 +14,6 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module OpenapiClient
17
- # App Icon Badge Count update. Send badge 0 to clear the count.
18
17
  class AppIconBadgeCountUpdateRequest
19
18
  # The count to show on the ActivitySmith app icon. Send 0 to clear it.
20
19
  attr_accessor :badge
@@ -21,7 +21,7 @@ module OpenapiClient
21
21
 
22
22
  attr_accessor :type
23
23
 
24
- # 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.
24
+ # 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.
25
25
  attr_accessor :url
26
26
 
27
27
  # Webhook HTTP method. Used only when type=webhook.
@@ -22,7 +22,7 @@ module OpenapiClient
22
22
 
23
23
  attr_accessor :action
24
24
 
25
- # 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.
25
+ # Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
26
26
  attr_accessor :secondary_action
27
27
 
28
28
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -20,13 +20,16 @@ module OpenapiClient
20
20
 
21
21
  attr_accessor :action
22
22
 
23
- # 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.
23
+ # Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
24
24
  attr_accessor :secondary_action
25
25
 
26
26
  attr_accessor :alert
27
27
 
28
28
  attr_accessor :target
29
29
 
30
+ # Optional tags to organize and filter notification history.
31
+ attr_accessor :tags
32
+
30
33
  # Attribute mapping from ruby-style variable name to JSON key.
31
34
  def self.attribute_map
32
35
  {
@@ -34,7 +37,8 @@ module OpenapiClient
34
37
  :'action' => :'action',
35
38
  :'secondary_action' => :'secondary_action',
36
39
  :'alert' => :'alert',
37
- :'target' => :'target'
40
+ :'target' => :'target',
41
+ :'tags' => :'tags'
38
42
  }
39
43
  end
40
44
 
@@ -50,7 +54,8 @@ module OpenapiClient
50
54
  :'action' => :'LiveActivityAction',
51
55
  :'secondary_action' => :'LiveActivityAction',
52
56
  :'alert' => :'AlertPayload',
53
- :'target' => :'ChannelTarget'
57
+ :'target' => :'ChannelTarget',
58
+ :'tags' => :'Array<String>'
54
59
  }
55
60
  end
56
61
 
@@ -96,6 +101,12 @@ module OpenapiClient
96
101
  if attributes.key?(:'target')
97
102
  self.target = attributes[:'target']
98
103
  end
104
+
105
+ if attributes.key?(:'tags')
106
+ if (value = attributes[:'tags']).is_a?(Array)
107
+ self.tags = value
108
+ end
109
+ end
99
110
  end
100
111
 
101
112
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -127,7 +138,8 @@ module OpenapiClient
127
138
  action == o.action &&
128
139
  secondary_action == o.secondary_action &&
129
140
  alert == o.alert &&
130
- target == o.target
141
+ target == o.target &&
142
+ tags == o.tags
131
143
  end
132
144
 
133
145
  # @see the `==` method
@@ -139,7 +151,7 @@ module OpenapiClient
139
151
  # Calculates hash code according to all attributes.
140
152
  # @return [Integer] Hash code
141
153
  def hash
142
- [content_state, action, secondary_action, alert, target].hash
154
+ [content_state, action, secondary_action, alert, target, tags].hash
143
155
  end
144
156
 
145
157
  # Builds the object from hash
@@ -26,6 +26,9 @@ module OpenapiClient
26
26
 
27
27
  attr_accessor :effective_channel_slugs
28
28
 
29
+ # Optional tags to organize and filter notification history.
30
+ attr_accessor :tags
31
+
29
32
  attr_accessor :timestamp
30
33
 
31
34
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -36,6 +39,7 @@ module OpenapiClient
36
39
  :'users_notified' => :'users_notified',
37
40
  :'activity_id' => :'activity_id',
38
41
  :'effective_channel_slugs' => :'effective_channel_slugs',
42
+ :'tags' => :'tags',
39
43
  :'timestamp' => :'timestamp'
40
44
  }
41
45
  end
@@ -53,6 +57,7 @@ module OpenapiClient
53
57
  :'users_notified' => :'Integer',
54
58
  :'activity_id' => :'String',
55
59
  :'effective_channel_slugs' => :'Array<String>',
60
+ :'tags' => :'Array<String>',
56
61
  :'timestamp' => :'Time'
57
62
  }
58
63
  end
@@ -104,6 +109,12 @@ module OpenapiClient
104
109
  end
105
110
  end
106
111
 
112
+ if attributes.key?(:'tags')
113
+ if (value = attributes[:'tags']).is_a?(Array)
114
+ self.tags = value
115
+ end
116
+ end
117
+
107
118
  if attributes.key?(:'timestamp')
108
119
  self.timestamp = attributes[:'timestamp']
109
120
  else
@@ -151,6 +162,7 @@ module OpenapiClient
151
162
  users_notified == o.users_notified &&
152
163
  activity_id == o.activity_id &&
153
164
  effective_channel_slugs == o.effective_channel_slugs &&
165
+ tags == o.tags &&
154
166
  timestamp == o.timestamp
155
167
  end
156
168
 
@@ -163,7 +175,7 @@ module OpenapiClient
163
175
  # Calculates hash code according to all attributes.
164
176
  # @return [Integer] Hash code
165
177
  def hash
166
- [success, devices_notified, users_notified, activity_id, effective_channel_slugs, timestamp].hash
178
+ [success, devices_notified, users_notified, activity_id, effective_channel_slugs, tags, timestamp].hash
167
179
  end
168
180
 
169
181
  # Builds the object from hash
@@ -20,7 +20,7 @@ module OpenapiClient
20
20
 
21
21
  attr_accessor :action
22
22
 
23
- # 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.
23
+ # Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
24
24
  attr_accessor :secondary_action
25
25
 
26
26
  attr_accessor :alert
@@ -34,6 +34,9 @@ module OpenapiClient
34
34
 
35
35
  attr_accessor :effective_channel_slugs
36
36
 
37
+ # Optional tags to organize and filter notification history.
38
+ attr_accessor :tags
39
+
37
40
  attr_accessor :timestamp
38
41
 
39
42
  class EnumAttributeValidator
@@ -70,6 +73,7 @@ module OpenapiClient
70
73
  :'devices_queued' => :'devices_queued',
71
74
  :'users_notified' => :'users_notified',
72
75
  :'effective_channel_slugs' => :'effective_channel_slugs',
76
+ :'tags' => :'tags',
73
77
  :'timestamp' => :'timestamp'
74
78
  }
75
79
  end
@@ -91,6 +95,7 @@ module OpenapiClient
91
95
  :'devices_queued' => :'Integer',
92
96
  :'users_notified' => :'Integer',
93
97
  :'effective_channel_slugs' => :'Array<String>',
98
+ :'tags' => :'Array<String>',
94
99
  :'timestamp' => :'Time'
95
100
  }
96
101
  end
@@ -161,6 +166,12 @@ module OpenapiClient
161
166
  end
162
167
  end
163
168
 
169
+ if attributes.key?(:'tags')
170
+ if (value = attributes[:'tags']).is_a?(Array)
171
+ self.tags = value
172
+ end
173
+ end
174
+
164
175
  if attributes.key?(:'timestamp')
165
176
  self.timestamp = attributes[:'timestamp']
166
177
  else
@@ -229,6 +240,7 @@ module OpenapiClient
229
240
  devices_queued == o.devices_queued &&
230
241
  users_notified == o.users_notified &&
231
242
  effective_channel_slugs == o.effective_channel_slugs &&
243
+ tags == o.tags &&
232
244
  timestamp == o.timestamp
233
245
  end
234
246
 
@@ -241,7 +253,7 @@ module OpenapiClient
241
253
  # Calculates hash code according to all attributes.
242
254
  # @return [Integer] Hash code
243
255
  def hash
244
- [success, operation, stream_key, activity_id, previous_activity_id, devices_notified, devices_queued, users_notified, effective_channel_slugs, timestamp].hash
256
+ [success, operation, stream_key, activity_id, previous_activity_id, devices_notified, devices_queued, users_notified, effective_channel_slugs, tags, timestamp].hash
245
257
  end
246
258
 
247
259
  # Builds the object from hash
@@ -20,7 +20,7 @@ module OpenapiClient
20
20
 
21
21
  attr_accessor :action
22
22
 
23
- # 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.
23
+ # Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
24
24
  attr_accessor :secondary_action
25
25
 
26
26
  attr_accessor :alert
@@ -30,6 +30,9 @@ module OpenapiClient
30
30
 
31
31
  attr_accessor :target
32
32
 
33
+ # Optional tags to organize and filter notification history.
34
+ attr_accessor :tags
35
+
33
36
  # Attribute mapping from ruby-style variable name to JSON key.
34
37
  def self.attribute_map
35
38
  {
@@ -38,7 +41,8 @@ module OpenapiClient
38
41
  :'secondary_action' => :'secondary_action',
39
42
  :'alert' => :'alert',
40
43
  :'channels' => :'channels',
41
- :'target' => :'target'
44
+ :'target' => :'target',
45
+ :'tags' => :'tags'
42
46
  }
43
47
  end
44
48
 
@@ -55,7 +59,8 @@ module OpenapiClient
55
59
  :'secondary_action' => :'LiveActivityAction',
56
60
  :'alert' => :'AlertPayload',
57
61
  :'channels' => :'Array<String>',
58
- :'target' => :'ChannelTarget'
62
+ :'target' => :'ChannelTarget',
63
+ :'tags' => :'Array<String>'
59
64
  }
60
65
  end
61
66
 
@@ -107,6 +112,12 @@ module OpenapiClient
107
112
  if attributes.key?(:'target')
108
113
  self.target = attributes[:'target']
109
114
  end
115
+
116
+ if attributes.key?(:'tags')
117
+ if (value = attributes[:'tags']).is_a?(Array)
118
+ self.tags = value
119
+ end
120
+ end
110
121
  end
111
122
 
112
123
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -158,7 +169,8 @@ module OpenapiClient
158
169
  secondary_action == o.secondary_action &&
159
170
  alert == o.alert &&
160
171
  channels == o.channels &&
161
- target == o.target
172
+ target == o.target &&
173
+ tags == o.tags
162
174
  end
163
175
 
164
176
  # @see the `==` method
@@ -170,7 +182,7 @@ module OpenapiClient
170
182
  # Calculates hash code according to all attributes.
171
183
  # @return [Integer] Hash code
172
184
  def hash
173
- [content_state, action, secondary_action, alert, channels, target].hash
185
+ [content_state, action, secondary_action, alert, channels, target, tags].hash
174
186
  end
175
187
 
176
188
  # Builds the object from hash
@@ -22,7 +22,7 @@ module OpenapiClient
22
22
 
23
23
  attr_accessor :action
24
24
 
25
- # 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.
25
+ # Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
26
26
  attr_accessor :secondary_action
27
27
 
28
28
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -20,7 +20,7 @@ module OpenapiClient
20
20
 
21
21
  attr_accessor :type
22
22
 
23
- # 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.
23
+ # 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.
24
24
  attr_accessor :url
25
25
 
26
26
  # Webhook HTTP method. Used only when type=webhook.
@@ -24,7 +24,7 @@ module OpenapiClient
24
24
  # Optional HTTPS URL for an image, audio file, or video that users can preview or play when they expand the notification. If `redirection` is omitted, tapping the notification opens this URL. Cannot be combined with `actions`.
25
25
  attr_accessor :media
26
26
 
27
- # 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.
27
+ # 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.
28
28
  attr_accessor :redirection
29
29
 
30
30
  # Optional interactive actions shown when users expand the notification. Cannot be combined with `media`.
@@ -38,6 +38,9 @@ module OpenapiClient
38
38
 
39
39
  attr_accessor :target
40
40
 
41
+ # Optional tags to organize and filter notification history.
42
+ attr_accessor :tags
43
+
41
44
  # Attribute mapping from ruby-style variable name to JSON key.
42
45
  def self.attribute_map
43
46
  {
@@ -50,7 +53,8 @@ module OpenapiClient
50
53
  :'payload' => :'payload',
51
54
  :'badge' => :'badge',
52
55
  :'sound' => :'sound',
53
- :'target' => :'target'
56
+ :'target' => :'target',
57
+ :'tags' => :'tags'
54
58
  }
55
59
  end
56
60
 
@@ -71,7 +75,8 @@ module OpenapiClient
71
75
  :'payload' => :'Object',
72
76
  :'badge' => :'Integer',
73
77
  :'sound' => :'String',
74
- :'target' => :'ChannelTarget'
78
+ :'target' => :'ChannelTarget',
79
+ :'tags' => :'Array<String>'
75
80
  }
76
81
  end
77
82
 
@@ -139,6 +144,12 @@ module OpenapiClient
139
144
  if attributes.key?(:'target')
140
145
  self.target = attributes[:'target']
141
146
  end
147
+
148
+ if attributes.key?(:'tags')
149
+ if (value = attributes[:'tags']).is_a?(Array)
150
+ self.tags = value
151
+ end
152
+ end
142
153
  end
143
154
 
144
155
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -155,7 +166,7 @@ module OpenapiClient
155
166
  invalid_properties.push("invalid value for \"media\", must conform to the pattern #{pattern}.")
156
167
  end
157
168
 
158
- pattern = Regexp.new(/^(https|shortcuts):\/\//)
169
+ pattern = Regexp.new(/^(http|https|shortcuts):\/\//)
159
170
  if !@redirection.nil? && @redirection !~ pattern
160
171
  invalid_properties.push("invalid value for \"redirection\", must conform to the pattern #{pattern}.")
161
172
  end
@@ -173,7 +184,7 @@ module OpenapiClient
173
184
  warn '[DEPRECATED] the `valid?` method is obsolete'
174
185
  return false if @title.nil?
175
186
  return false if !@media.nil? && @media !~ Regexp.new(/^https:\/\//)
176
- return false if !@redirection.nil? && @redirection !~ Regexp.new(/^(https|shortcuts):\/\//)
187
+ return false if !@redirection.nil? && @redirection !~ Regexp.new(/^(http|https|shortcuts):\/\//)
177
188
  return false if !@actions.nil? && @actions.length > 4
178
189
  true
179
190
  end
@@ -200,7 +211,7 @@ module OpenapiClient
200
211
  fail ArgumentError, 'redirection cannot be nil'
201
212
  end
202
213
 
203
- pattern = Regexp.new(/^(https|shortcuts):\/\//)
214
+ pattern = Regexp.new(/^(http|https|shortcuts):\/\//)
204
215
  if redirection !~ pattern
205
216
  fail ArgumentError, "invalid value for \"redirection\", must conform to the pattern #{pattern}."
206
217
  end
@@ -236,7 +247,8 @@ module OpenapiClient
236
247
  payload == o.payload &&
237
248
  badge == o.badge &&
238
249
  sound == o.sound &&
239
- target == o.target
250
+ target == o.target &&
251
+ tags == o.tags
240
252
  end
241
253
 
242
254
  # @see the `==` method
@@ -248,7 +260,7 @@ module OpenapiClient
248
260
  # Calculates hash code according to all attributes.
249
261
  # @return [Integer] Hash code
250
262
  def hash
251
- [title, message, subtitle, media, redirection, actions, payload, badge, sound, target].hash
263
+ [title, message, subtitle, media, redirection, actions, payload, badge, sound, target, tags].hash
252
264
  end
253
265
 
254
266
  # Builds the object from hash
@@ -23,6 +23,9 @@ module OpenapiClient
23
23
 
24
24
  attr_accessor :effective_channel_slugs
25
25
 
26
+ # Optional tags to organize and filter notification history.
27
+ attr_accessor :tags
28
+
26
29
  attr_accessor :timestamp
27
30
 
28
31
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -32,6 +35,7 @@ module OpenapiClient
32
35
  :'devices_notified' => :'devices_notified',
33
36
  :'users_notified' => :'users_notified',
34
37
  :'effective_channel_slugs' => :'effective_channel_slugs',
38
+ :'tags' => :'tags',
35
39
  :'timestamp' => :'timestamp'
36
40
  }
37
41
  end
@@ -48,6 +52,7 @@ module OpenapiClient
48
52
  :'devices_notified' => :'Integer',
49
53
  :'users_notified' => :'Integer',
50
54
  :'effective_channel_slugs' => :'Array<String>',
55
+ :'tags' => :'Array<String>',
51
56
  :'timestamp' => :'Time'
52
57
  }
53
58
  end
@@ -93,6 +98,12 @@ module OpenapiClient
93
98
  end
94
99
  end
95
100
 
101
+ if attributes.key?(:'tags')
102
+ if (value = attributes[:'tags']).is_a?(Array)
103
+ self.tags = value
104
+ end
105
+ end
106
+
96
107
  if attributes.key?(:'timestamp')
97
108
  self.timestamp = attributes[:'timestamp']
98
109
  else
@@ -134,6 +145,7 @@ module OpenapiClient
134
145
  devices_notified == o.devices_notified &&
135
146
  users_notified == o.users_notified &&
136
147
  effective_channel_slugs == o.effective_channel_slugs &&
148
+ tags == o.tags &&
137
149
  timestamp == o.timestamp
138
150
  end
139
151
 
@@ -146,7 +158,7 @@ module OpenapiClient
146
158
  # Calculates hash code according to all attributes.
147
159
  # @return [Integer] Hash code
148
160
  def hash
149
- [success, devices_notified, users_notified, effective_channel_slugs, timestamp].hash
161
+ [success, devices_notified, users_notified, effective_channel_slugs, tags, timestamp].hash
150
162
  end
151
163
 
152
164
  # Builds the object from hash
@@ -11,5 +11,5 @@ Generator version: 7.7.0
11
11
  =end
12
12
 
13
13
  module OpenapiClient
14
- VERSION = '1.8.0'
14
+ VERSION = '1.10.0'
15
15
  end
@@ -38,8 +38,13 @@ module ActivitySmith
38
38
  @api = api
39
39
  end
40
40
 
41
- def start(request, opts = {})
42
- @api.start_live_activity(normalize_live_activity_request(normalize_channels_target(request)), opts)
41
+ def start(request = nil, opts = {}, tags: nil, **request_fields)
42
+ @api.start_live_activity(
43
+ normalize_live_activity_request(
44
+ normalize_channels_target(with_tags(combine_request(request, request_fields), tags))
45
+ ),
46
+ opts
47
+ )
43
48
  end
44
49
 
45
50
  def update(request, opts = {})
@@ -50,10 +55,12 @@ module ActivitySmith
50
55
  @api.end_live_activity(normalize_live_activity_request(request), opts)
51
56
  end
52
57
 
53
- def stream(stream_key, request, opts = {})
58
+ def stream(stream_key, request = nil, opts = {}, tags: nil, **request_fields)
54
59
  @api.reconcile_live_activity_stream(
55
60
  stream_key,
56
- normalize_live_activity_request(normalize_channels_target(request)),
61
+ normalize_live_activity_request(
62
+ normalize_channels_target(with_tags(combine_request(request, request_fields), tags))
63
+ ),
57
64
  opts
58
65
  )
59
66
  end
@@ -66,9 +73,9 @@ module ActivitySmith
66
73
  end
67
74
 
68
75
  # Backward-compatible aliases.
69
- def start_live_activity(live_activity_start_request, opts = {})
76
+ def start_live_activity(live_activity_start_request, opts = {}, tags: nil)
70
77
  @api.start_live_activity(
71
- normalize_live_activity_request(normalize_channels_target(live_activity_start_request)),
78
+ normalize_live_activity_request(normalize_channels_target(with_tags(live_activity_start_request, tags))),
72
79
  opts
73
80
  )
74
81
  end
@@ -81,10 +88,10 @@ module ActivitySmith
81
88
  @api.end_live_activity(normalize_live_activity_request(live_activity_end_request), opts)
82
89
  end
83
90
 
84
- def reconcile_live_activity_stream(stream_key, live_activity_stream_request, opts = {})
91
+ def reconcile_live_activity_stream(stream_key, live_activity_stream_request, opts = {}, tags: nil)
85
92
  @api.reconcile_live_activity_stream(
86
93
  stream_key,
87
- normalize_live_activity_request(normalize_channels_target(live_activity_stream_request)),
94
+ normalize_live_activity_request(normalize_channels_target(with_tags(live_activity_stream_request, tags))),
88
95
  opts
89
96
  )
90
97
  end
@@ -110,6 +117,21 @@ module ActivitySmith
110
117
 
111
118
  private
112
119
 
120
+ def combine_request(request, request_fields)
121
+ return request if request_fields.empty?
122
+ return request_fields if request.nil?
123
+ raise ArgumentError, "ActivitySmith: keyword request fields can only be combined with a Hash request" unless request.is_a?(Hash)
124
+
125
+ request.merge(request_fields)
126
+ end
127
+
128
+ def with_tags(request, tags)
129
+ return request if tags.nil?
130
+ raise ArgumentError, "ActivitySmith: tags can only be combined with a Hash request" unless request.is_a?(Hash)
131
+
132
+ request.merge(tags: tags)
133
+ end
134
+
113
135
  def normalize_live_activity_request(request)
114
136
  return request unless request.is_a?(Hash)
115
137
 
@@ -6,15 +6,15 @@ module ActivitySmith
6
6
  @api = api
7
7
  end
8
8
 
9
- def send(request, opts = {})
10
- normalized = normalize_channels_target(request)
9
+ def send(request = nil, opts = {}, tags: nil, **request_fields)
10
+ normalized = normalize_channels_target(with_tags(combine_request(request, request_fields), tags))
11
11
  assert_valid_media_actions!(normalized)
12
12
  @api.send_push_notification(normalized, opts)
13
13
  end
14
14
 
15
15
  # Backward-compatible alias.
16
- def send_push_notification(push_notification_request, opts = {})
17
- normalized = normalize_channels_target(push_notification_request)
16
+ def send_push_notification(push_notification_request, opts = {}, tags: nil)
17
+ normalized = normalize_channels_target(with_tags(push_notification_request, tags))
18
18
  assert_valid_media_actions!(normalized)
19
19
  @api.send_push_notification(normalized, opts)
20
20
  end
@@ -31,6 +31,21 @@ module ActivitySmith
31
31
 
32
32
  private
33
33
 
34
+ def combine_request(request, request_fields)
35
+ return request if request_fields.empty?
36
+ return request_fields if request.nil?
37
+ raise ArgumentError, "ActivitySmith: keyword request fields can only be combined with a Hash request" unless request.is_a?(Hash)
38
+
39
+ request.merge(request_fields)
40
+ end
41
+
42
+ def with_tags(request, tags)
43
+ return request if tags.nil?
44
+ raise ArgumentError, "ActivitySmith: tags can only be combined with a Hash request" unless request.is_a?(Hash)
45
+
46
+ request.merge(tags: tags)
47
+ end
48
+
34
49
  def normalize_channels_target(request)
35
50
  return request unless request.is_a?(Hash)
36
51
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActivitySmith
4
- VERSION = "1.9.0"
4
+ VERSION = "1.10.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activitysmith
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.0
4
+ version: 1.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ActivitySmith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-07-11 00:00:00.000000000 Z
11
+ date: 2026-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json