activitysmith 1.16.0 → 1.18.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 +4 -4
- data/README.md +32 -3
- data/generated/activitysmith_openapi/models/live_activity_action.rb +12 -2
- data/generated/activitysmith_openapi/models/live_activity_end_request.rb +2 -2
- data/generated/activitysmith_openapi/models/live_activity_start_request.rb +43 -5
- data/generated/activitysmith_openapi/models/live_activity_stream_delete_request.rb +2 -2
- data/generated/activitysmith_openapi/models/live_activity_stream_request.rb +44 -6
- data/generated/activitysmith_openapi/models/live_activity_update_request.rb +44 -6
- data/generated/activitysmith_openapi/models/push_notification_replace_request.rb +2 -0
- data/generated/activitysmith_openapi/models/push_notification_request.rb +2 -0
- data/generated/activitysmith_openapi/version.rb +1 -1
- data/generated/openapi-source.json +2 -2
- data/lib/activitysmith/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 45aa0d2a789f1527ab67da6f57ec3f6b3ab103674b143345b298f29c757223d9
|
|
4
|
+
data.tar.gz: 16b48bb9ed134bb6beaf98e2322d95481d8bb59206b886ae6101c950564bd62b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9d19a2de6ca4326e22f78a82f13ff2fe3b5fe0bfd359120bb8cabde7edc7da0621ca5c66199a0cd32c1e3b96108071459c20e476906b24099508a3fbcb3793f7
|
|
7
|
+
data.tar.gz: 77aa6d68d9a391863d451b99fd2a26d8daeaa36c70d2abd49aa3f3ae4b8ac64f8b64d23e2f19cdd8887fd96e178d472962715841313f4a95fbf85a1ecf98ff29
|
data/README.md
CHANGED
|
@@ -562,15 +562,20 @@ Choose from these colors for the Live Activity accent, including progress bars a
|
|
|
562
562
|
|
|
563
563
|
Live Activities can include an action button.
|
|
564
564
|
|
|
565
|
-
- `open_url`: Open a web page
|
|
565
|
+
- `open_url`: Open a web page, run an iOS Shortcut, or open an app
|
|
566
566
|
- `webhook`: Trigger a backend GET/POST workflow
|
|
567
567
|
|
|
568
568
|
#### Open URL action
|
|
569
569
|
|
|
570
|
-
Open a web page
|
|
570
|
+
Open a web page, run an iOS Shortcut, or open an app when someone taps the button. Supported links:
|
|
571
571
|
|
|
572
572
|
- **HTTP/HTTPS:** Web pages, e.g. `https://example.com`
|
|
573
573
|
- **Shortcuts:** Run Jarvis with `shortcuts://run-shortcut?name=Jarvis` <!-- full-width -->
|
|
574
|
+
- **App deep links:** Installed apps or specific content within them
|
|
575
|
+
- **Spotify:** A track, e.g. `spotify:track:6rqhFgbbKwnb9MLmUQDhG6`
|
|
576
|
+
- **Termius:** `termius://` to open the app
|
|
577
|
+
- **Claude:** `claude://code` to open the Code tab
|
|
578
|
+
- **ChatGPT:** `chatgpt://` to open the app <!-- Verify ChatGPT URL scheme on iOS before publishing -->
|
|
574
579
|
|
|
575
580
|
```ruby
|
|
576
581
|
activitysmith.live_activities.stream(
|
|
@@ -618,6 +623,30 @@ activitysmith.live_activities.stream(
|
|
|
618
623
|
)
|
|
619
624
|
```
|
|
620
625
|
|
|
626
|
+
#### End after the tap
|
|
627
|
+
|
|
628
|
+
Set `dismiss_after_action` on an `open_url` button to end the Live Activity when someone taps it. The button opens its link, then the Live Activity ends.
|
|
629
|
+
|
|
630
|
+
```ruby
|
|
631
|
+
activitysmith.live_activities.stream(
|
|
632
|
+
"agent-review",
|
|
633
|
+
{
|
|
634
|
+
content_state: {
|
|
635
|
+
title: "Review Ready",
|
|
636
|
+
message: "Claude finished the checkout refactor.",
|
|
637
|
+
type: "alert",
|
|
638
|
+
color: "green"
|
|
639
|
+
},
|
|
640
|
+
action: {
|
|
641
|
+
title: "Open Claude",
|
|
642
|
+
type: "open_url",
|
|
643
|
+
url: "claude://code",
|
|
644
|
+
dismiss_after_action: true
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
)
|
|
648
|
+
```
|
|
649
|
+
|
|
621
650
|
#### Webhook action
|
|
622
651
|
|
|
623
652
|
```ruby
|
|
@@ -691,7 +720,7 @@ activitysmith.live_activities.stream(
|
|
|
691
720
|
|
|
692
721
|
### Live Activity Sounds
|
|
693
722
|
|
|
694
|
-
Starting a Live Activity plays the Live Activities sound picked in the ActivitySmith app. Updates and ends are silent. Set `sound` on a start, update, or end to choose its sound, with the same values as [Push Notification Sounds](#push-notification-sounds). A sound on an update or end
|
|
723
|
+
Starting a Live Activity plays the Live Activities sound picked in the ActivitySmith app. Updates and ends are silent. Set `sound` on a start, update, or end to choose its sound, with the same values as [Push Notification Sounds](#push-notification-sounds). A sound on an update or end plays only while the screen is on. Use it for moments that need attention, such as a failed step.
|
|
695
724
|
|
|
696
725
|
```ruby
|
|
697
726
|
activitysmith.live_activities.stream(
|
|
@@ -21,9 +21,12 @@ module OpenapiClient
|
|
|
21
21
|
|
|
22
22
|
attr_accessor :type
|
|
23
23
|
|
|
24
|
-
# Action URL. For open_url, use an HTTP or HTTPS URL
|
|
24
|
+
# Action URL. For open_url, use an HTTP or HTTPS URL, a shortcuts://run-shortcut?name=... URL that runs a specific iPhone Shortcut, or an installed app's custom URL scheme, such as spotify:// or spotify:track:123. Custom app schemes need the target app installed and have no web fallback. Unsafe schemes and ActivitySmith's own scheme are blocked. For webhook, use an HTTPS URL called by the ActivitySmith backend.
|
|
25
25
|
attr_accessor :url
|
|
26
26
|
|
|
27
|
+
# Ends the Live Activity after the button opens its URL. Used only when type=open_url. Defaults to false.
|
|
28
|
+
attr_accessor :dismiss_after_action
|
|
29
|
+
|
|
27
30
|
# Webhook HTTP method. Used only when type=webhook.
|
|
28
31
|
attr_accessor :method
|
|
29
32
|
|
|
@@ -58,6 +61,7 @@ module OpenapiClient
|
|
|
58
61
|
:'title' => :'title',
|
|
59
62
|
:'type' => :'type',
|
|
60
63
|
:'url' => :'url',
|
|
64
|
+
:'dismiss_after_action' => :'dismiss_after_action',
|
|
61
65
|
:'method' => :'method',
|
|
62
66
|
:'body' => :'body'
|
|
63
67
|
}
|
|
@@ -74,6 +78,7 @@ module OpenapiClient
|
|
|
74
78
|
:'title' => :'String',
|
|
75
79
|
:'type' => :'LiveActivityActionType',
|
|
76
80
|
:'url' => :'String',
|
|
81
|
+
:'dismiss_after_action' => :'Boolean',
|
|
77
82
|
:'method' => :'LiveActivityWebhookMethod',
|
|
78
83
|
:'body' => :'Object'
|
|
79
84
|
}
|
|
@@ -118,6 +123,10 @@ module OpenapiClient
|
|
|
118
123
|
self.url = nil
|
|
119
124
|
end
|
|
120
125
|
|
|
126
|
+
if attributes.key?(:'dismiss_after_action')
|
|
127
|
+
self.dismiss_after_action = attributes[:'dismiss_after_action']
|
|
128
|
+
end
|
|
129
|
+
|
|
121
130
|
if attributes.key?(:'method')
|
|
122
131
|
self.method = attributes[:'method']
|
|
123
132
|
else
|
|
@@ -167,6 +176,7 @@ module OpenapiClient
|
|
|
167
176
|
title == o.title &&
|
|
168
177
|
type == o.type &&
|
|
169
178
|
url == o.url &&
|
|
179
|
+
dismiss_after_action == o.dismiss_after_action &&
|
|
170
180
|
method == o.method &&
|
|
171
181
|
body == o.body
|
|
172
182
|
end
|
|
@@ -180,7 +190,7 @@ module OpenapiClient
|
|
|
180
190
|
# Calculates hash code according to all attributes.
|
|
181
191
|
# @return [Integer] Hash code
|
|
182
192
|
def hash
|
|
183
|
-
[title, type, url, method, body].hash
|
|
193
|
+
[title, type, url, dismiss_after_action, method, body].hash
|
|
184
194
|
end
|
|
185
195
|
|
|
186
196
|
# Builds the object from hash
|
|
@@ -28,10 +28,10 @@ module OpenapiClient
|
|
|
28
28
|
|
|
29
29
|
attr_accessor :action
|
|
30
30
|
|
|
31
|
-
# Optional secondary action button. Supported for alert, progress, segmented_progress, and value Live Activities. Uses the same open_url
|
|
31
|
+
# Optional secondary action button. Supported for alert, progress, segmented_progress, and value Live Activities. Uses the same open_url and webhook shapes as action, including app URL schemes and dismiss_after_action.
|
|
32
32
|
attr_accessor :secondary_action
|
|
33
33
|
|
|
34
|
-
# Optional sound for the end. Ends are silent unless you set one.
|
|
34
|
+
# Optional sound for the end. Ends are silent unless you set one. iOS plays the sound only while the screen is on. Sounds bundled with the ActivitySmith app: `arrive`, `bell`, `bells`, `bitflip`, `bloom`, `callout`, `chime`, `coin`, `corrupt`, `crest`, `cue`, `ding`, `drop`, `ember`, `emblem`, `flourish`, `glimmer`, `glint`, `glitch`, `lantern`, `nightfall`, `nudge`, `pixel`, `pop`, `signal`, `streak`, `tally`, `wand`, `whoosh`, `zip`. Use `default` for the sound picked on the device, or `none` for no sound.
|
|
35
35
|
attr_accessor :sound
|
|
36
36
|
|
|
37
37
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -23,7 +23,7 @@ module OpenapiClient
|
|
|
23
23
|
|
|
24
24
|
attr_accessor :action
|
|
25
25
|
|
|
26
|
-
# Optional secondary action button. Supported for alert, progress, segmented_progress, and value Live Activities. Uses the same open_url
|
|
26
|
+
# Optional secondary action button. Supported for alert, progress, segmented_progress, and value Live Activities. Uses the same open_url and webhook shapes as action, including app URL schemes and dismiss_after_action.
|
|
27
27
|
attr_accessor :secondary_action
|
|
28
28
|
|
|
29
29
|
attr_accessor :alert
|
|
@@ -36,6 +36,9 @@ module OpenapiClient
|
|
|
36
36
|
# Optional sound for the start. Omit it to play the Live Activities sound picked on the device. Sounds bundled with the ActivitySmith app: `arrive`, `bell`, `bells`, `bitflip`, `bloom`, `callout`, `chime`, `coin`, `corrupt`, `crest`, `cue`, `ding`, `drop`, `ember`, `emblem`, `flourish`, `glimmer`, `glint`, `glitch`, `lantern`, `nightfall`, `nudge`, `pixel`, `pop`, `signal`, `streak`, `tally`, `wand`, `whoosh`, `zip`. Use `default` for the sound picked on the device, or `none` for no sound.
|
|
37
37
|
attr_accessor :sound
|
|
38
38
|
|
|
39
|
+
# Optional order when several Live Activities run at once, from 0 to 100. iOS shows the Live Activity with the highest score in the Dynamic Island and first on the Lock Screen. It changes only the order, never delivery. Omit it to use the iOS default order. Later updates keep this score unless they send a new one.
|
|
40
|
+
attr_accessor :relevance_score
|
|
41
|
+
|
|
39
42
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
40
43
|
def self.attribute_map
|
|
41
44
|
{
|
|
@@ -46,7 +49,8 @@ module OpenapiClient
|
|
|
46
49
|
:'alert' => :'alert',
|
|
47
50
|
:'target' => :'target',
|
|
48
51
|
:'tags' => :'tags',
|
|
49
|
-
:'sound' => :'sound'
|
|
52
|
+
:'sound' => :'sound',
|
|
53
|
+
:'relevance_score' => :'relevance_score'
|
|
50
54
|
}
|
|
51
55
|
end
|
|
52
56
|
|
|
@@ -65,7 +69,8 @@ module OpenapiClient
|
|
|
65
69
|
:'alert' => :'AlertPayload',
|
|
66
70
|
:'target' => :'ChannelTarget',
|
|
67
71
|
:'tags' => :'Array<String>',
|
|
68
|
-
:'sound' => :'String'
|
|
72
|
+
:'sound' => :'String',
|
|
73
|
+
:'relevance_score' => :'Float'
|
|
69
74
|
}
|
|
70
75
|
end
|
|
71
76
|
|
|
@@ -127,6 +132,10 @@ module OpenapiClient
|
|
|
127
132
|
if attributes.key?(:'sound')
|
|
128
133
|
self.sound = attributes[:'sound']
|
|
129
134
|
end
|
|
135
|
+
|
|
136
|
+
if attributes.key?(:'relevance_score')
|
|
137
|
+
self.relevance_score = attributes[:'relevance_score']
|
|
138
|
+
end
|
|
130
139
|
end
|
|
131
140
|
|
|
132
141
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -150,6 +159,14 @@ module OpenapiClient
|
|
|
150
159
|
invalid_properties.push('invalid value for "sound", the character length must be great than or equal to 1.')
|
|
151
160
|
end
|
|
152
161
|
|
|
162
|
+
if !@relevance_score.nil? && @relevance_score > 100
|
|
163
|
+
invalid_properties.push('invalid value for "relevance_score", must be smaller than or equal to 100.')
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
if !@relevance_score.nil? && @relevance_score < 0
|
|
167
|
+
invalid_properties.push('invalid value for "relevance_score", must be greater than or equal to 0.')
|
|
168
|
+
end
|
|
169
|
+
|
|
153
170
|
invalid_properties
|
|
154
171
|
end
|
|
155
172
|
|
|
@@ -161,6 +178,8 @@ module OpenapiClient
|
|
|
161
178
|
return false if @content_state.nil?
|
|
162
179
|
return false if !@sound.nil? && @sound.to_s.length > 50
|
|
163
180
|
return false if !@sound.nil? && @sound.to_s.length < 1
|
|
181
|
+
return false if !@relevance_score.nil? && @relevance_score > 100
|
|
182
|
+
return false if !@relevance_score.nil? && @relevance_score < 0
|
|
164
183
|
true
|
|
165
184
|
end
|
|
166
185
|
|
|
@@ -196,6 +215,24 @@ module OpenapiClient
|
|
|
196
215
|
@sound = sound
|
|
197
216
|
end
|
|
198
217
|
|
|
218
|
+
# Custom attribute writer method with validation
|
|
219
|
+
# @param [Object] relevance_score Value to be assigned
|
|
220
|
+
def relevance_score=(relevance_score)
|
|
221
|
+
if relevance_score.nil?
|
|
222
|
+
fail ArgumentError, 'relevance_score cannot be nil'
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
if relevance_score > 100
|
|
226
|
+
fail ArgumentError, 'invalid value for "relevance_score", must be smaller than or equal to 100.'
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
if relevance_score < 0
|
|
230
|
+
fail ArgumentError, 'invalid value for "relevance_score", must be greater than or equal to 0.'
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
@relevance_score = relevance_score
|
|
234
|
+
end
|
|
235
|
+
|
|
199
236
|
# Checks equality by comparing each attribute.
|
|
200
237
|
# @param [Object] Object to be compared
|
|
201
238
|
def ==(o)
|
|
@@ -208,7 +245,8 @@ module OpenapiClient
|
|
|
208
245
|
alert == o.alert &&
|
|
209
246
|
target == o.target &&
|
|
210
247
|
tags == o.tags &&
|
|
211
|
-
sound == o.sound
|
|
248
|
+
sound == o.sound &&
|
|
249
|
+
relevance_score == o.relevance_score
|
|
212
250
|
end
|
|
213
251
|
|
|
214
252
|
# @see the `==` method
|
|
@@ -220,7 +258,7 @@ module OpenapiClient
|
|
|
220
258
|
# Calculates hash code according to all attributes.
|
|
221
259
|
# @return [Integer] Hash code
|
|
222
260
|
def hash
|
|
223
|
-
[metadata, content_state, action, secondary_action, alert, target, tags, sound].hash
|
|
261
|
+
[metadata, content_state, action, secondary_action, alert, target, tags, sound, relevance_score].hash
|
|
224
262
|
end
|
|
225
263
|
|
|
226
264
|
# Builds the object from hash
|
|
@@ -26,12 +26,12 @@ module OpenapiClient
|
|
|
26
26
|
|
|
27
27
|
attr_accessor :action
|
|
28
28
|
|
|
29
|
-
# Optional secondary action button. Supported for alert, progress, segmented_progress, and value Live Activities. Uses the same open_url
|
|
29
|
+
# Optional secondary action button. Supported for alert, progress, segmented_progress, and value Live Activities. Uses the same open_url and webhook shapes as action, including app URL schemes and dismiss_after_action.
|
|
30
30
|
attr_accessor :secondary_action
|
|
31
31
|
|
|
32
32
|
attr_accessor :alert
|
|
33
33
|
|
|
34
|
-
# Optional sound for the end. Ends are silent unless you set one.
|
|
34
|
+
# Optional sound for the end. Ends are silent unless you set one. iOS plays the sound only while the screen is on. Sounds bundled with the ActivitySmith app: `arrive`, `bell`, `bells`, `bitflip`, `bloom`, `callout`, `chime`, `coin`, `corrupt`, `crest`, `cue`, `ding`, `drop`, `ember`, `emblem`, `flourish`, `glimmer`, `glint`, `glitch`, `lantern`, `nightfall`, `nudge`, `pixel`, `pop`, `signal`, `streak`, `tally`, `wand`, `whoosh`, `zip`. Use `default` for the sound picked on the device, or `none` for no sound.
|
|
35
35
|
attr_accessor :sound
|
|
36
36
|
|
|
37
37
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -23,7 +23,7 @@ module OpenapiClient
|
|
|
23
23
|
|
|
24
24
|
attr_accessor :action
|
|
25
25
|
|
|
26
|
-
# Optional secondary action button. Supported for alert, progress, segmented_progress, and value Live Activities. Uses the same open_url
|
|
26
|
+
# Optional secondary action button. Supported for alert, progress, segmented_progress, and value Live Activities. Uses the same open_url and webhook shapes as action, including app URL schemes and dismiss_after_action.
|
|
27
27
|
attr_accessor :secondary_action
|
|
28
28
|
|
|
29
29
|
attr_accessor :alert
|
|
@@ -36,9 +36,12 @@ module OpenapiClient
|
|
|
36
36
|
# Optional tags to organize and filter notification history.
|
|
37
37
|
attr_accessor :tags
|
|
38
38
|
|
|
39
|
-
# Optional sound for this call. A call that starts a Live Activity plays the Live Activities sound picked on the device unless you set one. Updates are silent unless you set one.
|
|
39
|
+
# Optional sound for this call. A call that starts a Live Activity plays the Live Activities sound picked on the device unless you set one. Updates are silent unless you set one. iOS plays an update sound only while the screen is on. Sounds bundled with the ActivitySmith app: `arrive`, `bell`, `bells`, `bitflip`, `bloom`, `callout`, `chime`, `coin`, `corrupt`, `crest`, `cue`, `ding`, `drop`, `ember`, `emblem`, `flourish`, `glimmer`, `glint`, `glitch`, `lantern`, `nightfall`, `nudge`, `pixel`, `pop`, `signal`, `streak`, `tally`, `wand`, `whoosh`, `zip`. Use `default` for the sound picked on the device, or `none` for no sound.
|
|
40
40
|
attr_accessor :sound
|
|
41
41
|
|
|
42
|
+
# Optional order when several Live Activities run at once, from 0 to 100. iOS shows the Live Activity with the highest score in the Dynamic Island and first on the Lock Screen. It changes only the order, never delivery. Omit it to keep the stream's current score; a stream without one uses the iOS default order. The score carries over when the stream starts a new Live Activity.
|
|
43
|
+
attr_accessor :relevance_score
|
|
44
|
+
|
|
42
45
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
43
46
|
def self.attribute_map
|
|
44
47
|
{
|
|
@@ -50,7 +53,8 @@ module OpenapiClient
|
|
|
50
53
|
:'channels' => :'channels',
|
|
51
54
|
:'target' => :'target',
|
|
52
55
|
:'tags' => :'tags',
|
|
53
|
-
:'sound' => :'sound'
|
|
56
|
+
:'sound' => :'sound',
|
|
57
|
+
:'relevance_score' => :'relevance_score'
|
|
54
58
|
}
|
|
55
59
|
end
|
|
56
60
|
|
|
@@ -70,7 +74,8 @@ module OpenapiClient
|
|
|
70
74
|
:'channels' => :'Array<String>',
|
|
71
75
|
:'target' => :'ChannelTarget',
|
|
72
76
|
:'tags' => :'Array<String>',
|
|
73
|
-
:'sound' => :'String'
|
|
77
|
+
:'sound' => :'String',
|
|
78
|
+
:'relevance_score' => :'Float'
|
|
74
79
|
}
|
|
75
80
|
end
|
|
76
81
|
|
|
@@ -138,6 +143,10 @@ module OpenapiClient
|
|
|
138
143
|
if attributes.key?(:'sound')
|
|
139
144
|
self.sound = attributes[:'sound']
|
|
140
145
|
end
|
|
146
|
+
|
|
147
|
+
if attributes.key?(:'relevance_score')
|
|
148
|
+
self.relevance_score = attributes[:'relevance_score']
|
|
149
|
+
end
|
|
141
150
|
end
|
|
142
151
|
|
|
143
152
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -165,6 +174,14 @@ module OpenapiClient
|
|
|
165
174
|
invalid_properties.push('invalid value for "sound", the character length must be great than or equal to 1.')
|
|
166
175
|
end
|
|
167
176
|
|
|
177
|
+
if !@relevance_score.nil? && @relevance_score > 100
|
|
178
|
+
invalid_properties.push('invalid value for "relevance_score", must be smaller than or equal to 100.')
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
if !@relevance_score.nil? && @relevance_score < 0
|
|
182
|
+
invalid_properties.push('invalid value for "relevance_score", must be greater than or equal to 0.')
|
|
183
|
+
end
|
|
184
|
+
|
|
168
185
|
invalid_properties
|
|
169
186
|
end
|
|
170
187
|
|
|
@@ -177,6 +194,8 @@ module OpenapiClient
|
|
|
177
194
|
return false if !@channels.nil? && @channels.length < 1
|
|
178
195
|
return false if !@sound.nil? && @sound.to_s.length > 50
|
|
179
196
|
return false if !@sound.nil? && @sound.to_s.length < 1
|
|
197
|
+
return false if !@relevance_score.nil? && @relevance_score > 100
|
|
198
|
+
return false if !@relevance_score.nil? && @relevance_score < 0
|
|
180
199
|
true
|
|
181
200
|
end
|
|
182
201
|
|
|
@@ -226,6 +245,24 @@ module OpenapiClient
|
|
|
226
245
|
@sound = sound
|
|
227
246
|
end
|
|
228
247
|
|
|
248
|
+
# Custom attribute writer method with validation
|
|
249
|
+
# @param [Object] relevance_score Value to be assigned
|
|
250
|
+
def relevance_score=(relevance_score)
|
|
251
|
+
if relevance_score.nil?
|
|
252
|
+
fail ArgumentError, 'relevance_score cannot be nil'
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
if relevance_score > 100
|
|
256
|
+
fail ArgumentError, 'invalid value for "relevance_score", must be smaller than or equal to 100.'
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
if relevance_score < 0
|
|
260
|
+
fail ArgumentError, 'invalid value for "relevance_score", must be greater than or equal to 0.'
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
@relevance_score = relevance_score
|
|
264
|
+
end
|
|
265
|
+
|
|
229
266
|
# Checks equality by comparing each attribute.
|
|
230
267
|
# @param [Object] Object to be compared
|
|
231
268
|
def ==(o)
|
|
@@ -239,7 +276,8 @@ module OpenapiClient
|
|
|
239
276
|
channels == o.channels &&
|
|
240
277
|
target == o.target &&
|
|
241
278
|
tags == o.tags &&
|
|
242
|
-
sound == o.sound
|
|
279
|
+
sound == o.sound &&
|
|
280
|
+
relevance_score == o.relevance_score
|
|
243
281
|
end
|
|
244
282
|
|
|
245
283
|
# @see the `==` method
|
|
@@ -251,7 +289,7 @@ module OpenapiClient
|
|
|
251
289
|
# Calculates hash code according to all attributes.
|
|
252
290
|
# @return [Integer] Hash code
|
|
253
291
|
def hash
|
|
254
|
-
[metadata, content_state, action, secondary_action, alert, channels, target, tags, sound].hash
|
|
292
|
+
[metadata, content_state, action, secondary_action, alert, channels, target, tags, sound, relevance_score].hash
|
|
255
293
|
end
|
|
256
294
|
|
|
257
295
|
# Builds the object from hash
|
|
@@ -28,12 +28,15 @@ module OpenapiClient
|
|
|
28
28
|
|
|
29
29
|
attr_accessor :action
|
|
30
30
|
|
|
31
|
-
# Optional secondary action button. Supported for alert, progress, segmented_progress, and value Live Activities. Uses the same open_url
|
|
31
|
+
# Optional secondary action button. Supported for alert, progress, segmented_progress, and value Live Activities. Uses the same open_url and webhook shapes as action, including app URL schemes and dismiss_after_action.
|
|
32
32
|
attr_accessor :secondary_action
|
|
33
33
|
|
|
34
|
-
# Optional sound for this update. Updates are silent unless you set one.
|
|
34
|
+
# Optional sound for this update. Updates are silent unless you set one. iOS plays the sound only while the screen is on. Sounds bundled with the ActivitySmith app: `arrive`, `bell`, `bells`, `bitflip`, `bloom`, `callout`, `chime`, `coin`, `corrupt`, `crest`, `cue`, `ding`, `drop`, `ember`, `emblem`, `flourish`, `glimmer`, `glint`, `glitch`, `lantern`, `nightfall`, `nudge`, `pixel`, `pop`, `signal`, `streak`, `tally`, `wand`, `whoosh`, `zip`. Use `default` for the sound picked on the device, or `none` for no sound.
|
|
35
35
|
attr_accessor :sound
|
|
36
36
|
|
|
37
|
+
# Optional new order for this Live Activity, from 0 to 100. Higher scores show first in the Dynamic Island and on the Lock Screen. Omit it to keep the current score.
|
|
38
|
+
attr_accessor :relevance_score
|
|
39
|
+
|
|
37
40
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
38
41
|
def self.attribute_map
|
|
39
42
|
{
|
|
@@ -43,7 +46,8 @@ module OpenapiClient
|
|
|
43
46
|
:'content_state' => :'content_state',
|
|
44
47
|
:'action' => :'action',
|
|
45
48
|
:'secondary_action' => :'secondary_action',
|
|
46
|
-
:'sound' => :'sound'
|
|
49
|
+
:'sound' => :'sound',
|
|
50
|
+
:'relevance_score' => :'relevance_score'
|
|
47
51
|
}
|
|
48
52
|
end
|
|
49
53
|
|
|
@@ -61,7 +65,8 @@ module OpenapiClient
|
|
|
61
65
|
:'content_state' => :'ContentStateUpdate',
|
|
62
66
|
:'action' => :'LiveActivityAction',
|
|
63
67
|
:'secondary_action' => :'LiveActivityAction',
|
|
64
|
-
:'sound' => :'String'
|
|
68
|
+
:'sound' => :'String',
|
|
69
|
+
:'relevance_score' => :'Float'
|
|
65
70
|
}
|
|
66
71
|
end
|
|
67
72
|
|
|
@@ -121,6 +126,10 @@ module OpenapiClient
|
|
|
121
126
|
if attributes.key?(:'sound')
|
|
122
127
|
self.sound = attributes[:'sound']
|
|
123
128
|
end
|
|
129
|
+
|
|
130
|
+
if attributes.key?(:'relevance_score')
|
|
131
|
+
self.relevance_score = attributes[:'relevance_score']
|
|
132
|
+
end
|
|
124
133
|
end
|
|
125
134
|
|
|
126
135
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -152,6 +161,14 @@ module OpenapiClient
|
|
|
152
161
|
invalid_properties.push('invalid value for "sound", the character length must be great than or equal to 1.')
|
|
153
162
|
end
|
|
154
163
|
|
|
164
|
+
if !@relevance_score.nil? && @relevance_score > 100
|
|
165
|
+
invalid_properties.push('invalid value for "relevance_score", must be smaller than or equal to 100.')
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
if !@relevance_score.nil? && @relevance_score < 0
|
|
169
|
+
invalid_properties.push('invalid value for "relevance_score", must be greater than or equal to 0.')
|
|
170
|
+
end
|
|
171
|
+
|
|
155
172
|
invalid_properties
|
|
156
173
|
end
|
|
157
174
|
|
|
@@ -165,6 +182,8 @@ module OpenapiClient
|
|
|
165
182
|
return false if @content_state.nil?
|
|
166
183
|
return false if !@sound.nil? && @sound.to_s.length > 50
|
|
167
184
|
return false if !@sound.nil? && @sound.to_s.length < 1
|
|
185
|
+
return false if !@relevance_score.nil? && @relevance_score > 100
|
|
186
|
+
return false if !@relevance_score.nil? && @relevance_score < 0
|
|
168
187
|
true
|
|
169
188
|
end
|
|
170
189
|
|
|
@@ -214,6 +233,24 @@ module OpenapiClient
|
|
|
214
233
|
@sound = sound
|
|
215
234
|
end
|
|
216
235
|
|
|
236
|
+
# Custom attribute writer method with validation
|
|
237
|
+
# @param [Object] relevance_score Value to be assigned
|
|
238
|
+
def relevance_score=(relevance_score)
|
|
239
|
+
if relevance_score.nil?
|
|
240
|
+
fail ArgumentError, 'relevance_score cannot be nil'
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
if relevance_score > 100
|
|
244
|
+
fail ArgumentError, 'invalid value for "relevance_score", must be smaller than or equal to 100.'
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
if relevance_score < 0
|
|
248
|
+
fail ArgumentError, 'invalid value for "relevance_score", must be greater than or equal to 0.'
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
@relevance_score = relevance_score
|
|
252
|
+
end
|
|
253
|
+
|
|
217
254
|
# Checks equality by comparing each attribute.
|
|
218
255
|
# @param [Object] Object to be compared
|
|
219
256
|
def ==(o)
|
|
@@ -225,7 +262,8 @@ module OpenapiClient
|
|
|
225
262
|
content_state == o.content_state &&
|
|
226
263
|
action == o.action &&
|
|
227
264
|
secondary_action == o.secondary_action &&
|
|
228
|
-
sound == o.sound
|
|
265
|
+
sound == o.sound &&
|
|
266
|
+
relevance_score == o.relevance_score
|
|
229
267
|
end
|
|
230
268
|
|
|
231
269
|
# @see the `==` method
|
|
@@ -237,7 +275,7 @@ module OpenapiClient
|
|
|
237
275
|
# Calculates hash code according to all attributes.
|
|
238
276
|
# @return [Integer] Hash code
|
|
239
277
|
def hash
|
|
240
|
-
[metadata, activity_id, tags, content_state, action, secondary_action, sound].hash
|
|
278
|
+
[metadata, activity_id, tags, content_state, action, secondary_action, sound, relevance_score].hash
|
|
241
279
|
end
|
|
242
280
|
|
|
243
281
|
# Builds the object from hash
|
|
@@ -21,6 +21,7 @@ module OpenapiClient
|
|
|
21
21
|
|
|
22
22
|
attr_accessor :title
|
|
23
23
|
|
|
24
|
+
# Optional message body. Apple limits a notification to 4 KB, so a longer message is shortened on the device. Notification history keeps up to 16 KB.
|
|
24
25
|
attr_accessor :message
|
|
25
26
|
|
|
26
27
|
attr_accessor :subtitle
|
|
@@ -37,6 +38,7 @@ module OpenapiClient
|
|
|
37
38
|
# Optional interactive actions shown when users expand the notification. Cannot be combined with `media`.
|
|
38
39
|
attr_accessor :actions
|
|
39
40
|
|
|
41
|
+
# Optional custom JSON delivered with the notification. It counts toward Apple's 4 KB limit. Use `metadata` for details that only need to appear in the app.
|
|
40
42
|
attr_accessor :payload
|
|
41
43
|
|
|
42
44
|
attr_accessor :badge
|
|
@@ -20,6 +20,7 @@ module OpenapiClient
|
|
|
20
20
|
|
|
21
21
|
attr_accessor :title
|
|
22
22
|
|
|
23
|
+
# Optional message body. Apple limits a notification to 4 KB, so a longer message is shortened on the device. Notification history keeps up to 16 KB.
|
|
23
24
|
attr_accessor :message
|
|
24
25
|
|
|
25
26
|
attr_accessor :subtitle
|
|
@@ -39,6 +40,7 @@ module OpenapiClient
|
|
|
39
40
|
# Optional interactive actions shown when users expand the notification. Cannot be combined with `media`.
|
|
40
41
|
attr_accessor :actions
|
|
41
42
|
|
|
43
|
+
# Optional custom JSON delivered with the notification. It counts toward Apple's 4 KB limit. Use `metadata` for details that only need to appear in the app.
|
|
42
44
|
attr_accessor :payload
|
|
43
45
|
|
|
44
46
|
attr_accessor :badge
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"repository": "ActivitySmithHQ/activitysmith-backend",
|
|
3
|
-
"commit": "
|
|
3
|
+
"commit": "321cb2a0615958af5cbb116a4062b904b4b8a4fc",
|
|
4
4
|
"path": "openapi.json",
|
|
5
|
-
"sha256": "
|
|
5
|
+
"sha256": "b4b4e2ec1f5358dac2a11277b28e01e6a8eb934cae06697ef95e685346c925f9"
|
|
6
6
|
}
|
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.
|
|
4
|
+
version: 1.18.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-
|
|
11
|
+
date: 2026-12-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: json
|