activitysmith 1.2.1 → 1.3.1

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: d995d89c48fd76a480d106695dfef4c3c85bf2ed9d8613f1ba0c132367a35bc1
4
- data.tar.gz: 026f8d00b5b30e26b0dcaca41143f3a644fa801462c5d05949ab28f4f6195738
3
+ metadata.gz: 72834442fc339c835883f57e5911a1df7b5b425ca72e9378c8bf4875b19d26ec
4
+ data.tar.gz: 6ed94939eb8886ac94102e3ca7dc70efa39c02432a8f945d7da793fa5920a67e
5
5
  SHA512:
6
- metadata.gz: a1fcac1bec72a9993314cc2eee1ae4ab5a9e0c7c8941a78978214efc88be481dca1d3caec09f95b3be9d337f3cdfe11e2c4a3080b331071330eaba45b7e306ce
7
- data.tar.gz: ba2a9963e7c8d8b324d0a9e70a6d39cc4405ab66331a3cac32c355ad88614593f5e886568c7c0bc0ee44a0177709f81c84956fe77671f835c2edff034e94aae9
6
+ metadata.gz: 58df6742bc1758e8a1faba533f7a0f94f959c4e87e308d6306319026c5a37be285de28693bff0804fac2713e1aec8f9f81ae4ddf0561f07edd35e01557549863
7
+ data.tar.gz: 04ac9df1919119396b7b4e014f0d0cf99e6ccb4000d10c166a68ce184d68e3ddaeb12a1444f6ac6ee7c9811db9ac5e74899f9a50051f5324de23d6a592b2bf4a
data/README.md CHANGED
@@ -15,11 +15,8 @@ See [API reference](https://activitysmith.com/docs/api-reference/introduction).
15
15
  - [Rich Push Notifications with Media](#rich-push-notifications-with-media)
16
16
  - [Actionable Push Notifications](#actionable-push-notifications)
17
17
  - [Live Activities](#live-activities)
18
- - [Simple: Let ActivitySmith manage the Live Activity for you](#simple-let-activitysmith-manage-the-live-activity-for-you)
19
- - [Advanced: Full lifecycle control](#advanced-full-lifecycle-control)
20
- - [Metrics Type](#metrics-type)
21
- - [Segmented Progress Type](#segmented-progress-type)
22
- - [Progress Type](#progress-type)
18
+ - [Start & Update Live Activity](#start--update-live-activity)
19
+ - [End Live Activity](#end-live-activity)
23
20
  - [Live Activity Action](#live-activity-action)
24
21
  - [Channels](#channels)
25
22
  - [Widgets](#widgets)
@@ -123,46 +120,60 @@ activitysmith.notifications.send(
123
120
 
124
121
  ## Live Activities
125
122
 
126
- <p align="center">
127
- <img src="https://cdn.activitysmith.com/features/metrics-live-activity-action.png" alt="Metrics Live Activity screenshot" width="680" />
128
- </p>
129
-
130
- There are three types of Live Activities:
123
+ There are four types of Live Activities:
131
124
 
132
- - `metrics`: best for live operational stats like server CPU and memory, queue depth, or replica lag
133
- - `segmented_progress`: best for step-based workflows like deployments, backups, and ETL pipelines
134
- - `progress`: best for continuous jobs like uploads, reindexes, and long-running migrations tracked as a percentage
125
+ - `stats`: best for showing business numbers side by side, such as revenue, sales, new users, conversion, refunds, or any other value you want visible at a glance
126
+ - `metrics`: best for live percentage values that change often, like server CPU, memory usage, disk usage, or error rate
127
+ - `segmented_progress`: best for anything that moves through clear stages, like deployments, onboarding flows, backups, ETL pipelines, migrations, and AI agent runs
128
+ - `progress`: best for tracking real-time progress with percentage, like tasks, backups, migrations, syncs, or uploads
135
129
 
136
- When working with Live Activities via our API, you have two approaches tailored
137
- to different needs. First, the stateless mode is the simplest path - one API
138
- call can initiate or update an activity, and another ends it - no state
139
- tracking on your side.
130
+ ### Start & Update Live Activity
140
131
 
141
- This is ideal if you want minimal complexity, perfect for automated workflows
142
- like cron jobs.
132
+ Use a stable `stream_key` to identify the metric, job, deployment, or system you want to keep visible. The first `stream(...)` call starts the Live Activity. Later calls with the same `stream_key` update it.
143
133
 
144
- In contrast, if you need precise lifecycle control, the classic approach offers
145
- distinct calls for start, updates, and end, giving you full control over the
146
- activity's state.
134
+ #### Stats
147
135
 
148
- In the following sections, we'll break down how to implement each method so you
149
- can choose what fits your use case best.
150
-
151
- ### Simple: Let ActivitySmith manage the Live Activity for you
136
+ <p align="center">
137
+ <img
138
+ src="https://cdn.activitysmith.com/features/stats-live-activity.png"
139
+ alt="Stats Live Activity stream example"
140
+ width="680"
141
+ />
142
+ </p>
152
143
 
153
- Use a stable `stream_key` to identify the system or workflow you are tracking,
154
- such as a server, deployment, build pipeline, cron job, or charging session.
155
- This is especially useful for cron jobs and other scheduled tasks where you do
156
- not want to store `activity_id` between runs.
144
+ ```ruby
145
+ activitysmith.live_activities.stream(
146
+ "sales-hourly",
147
+ {
148
+ content_state: {
149
+ title: "Sales",
150
+ subtitle: "last hour",
151
+ type: "stats",
152
+ metrics: [
153
+ { label: "Revenue", value: "$2430", color: "blue" },
154
+ { label: "Orders", value: "37", color: "green" },
155
+ { label: "Conversion", value: "4.8%", color: "magenta" },
156
+ { label: "Avg Order", value: "$65.68", color: "yellow" },
157
+ { label: "Refunds", value: "$84", color: "red" },
158
+ { label: "New Buyers", value: "18", color: "cyan" }
159
+ ]
160
+ }
161
+ }
162
+ )
163
+ ```
157
164
 
158
165
  #### Metrics
159
166
 
160
167
  <p align="center">
161
- <img src="https://cdn.activitysmith.com/features/metrics-live-activity-start.png" alt="Metrics stream example" width="680" />
168
+ <img
169
+ src="https://cdn.activitysmith.com/features/metrics-live-activity-start.png"
170
+ alt="Metrics Live Activity stream example"
171
+ width="680"
172
+ />
162
173
  </p>
163
174
 
164
175
  ```ruby
165
- status = activitysmith.live_activities.stream(
176
+ activitysmith.live_activities.stream(
166
177
  "prod-web-1",
167
178
  {
168
179
  content_state: {
@@ -178,10 +189,14 @@ status = activitysmith.live_activities.stream(
178
189
  )
179
190
  ```
180
191
 
181
- #### Segmented progress
192
+ #### Segmented Progress
182
193
 
183
194
  <p align="center">
184
- <img src="https://cdn.activitysmith.com/features/update-live-activity.png" alt="Segmented progress stream example" width="680" />
195
+ <img
196
+ src="https://cdn.activitysmith.com/features/update-live-activity.png"
197
+ alt="Segmented Progress Live Activity stream example"
198
+ width="680"
199
+ />
185
200
  </p>
186
201
 
187
202
  ```ruby
@@ -202,7 +217,11 @@ activitysmith.live_activities.stream(
202
217
  #### Progress
203
218
 
204
219
  <p align="center">
205
- <img src="https://cdn.activitysmith.com/features/progress-live-activity.png" alt="Progress stream example" width="680" />
220
+ <img
221
+ src="https://cdn.activitysmith.com/features/progress-live-activity.png"
222
+ alt="Progress Live Activity stream example"
223
+ width="680"
224
+ />
206
225
  </p>
207
226
 
208
227
  ```ruby
@@ -219,114 +238,14 @@ activitysmith.live_activities.stream(
219
238
  )
220
239
  ```
221
240
 
222
- Call `stream(...)` again with the same `stream_key` whenever the state changes.
223
-
224
- #### End a stream
241
+ ### End Live Activity
225
242
 
226
- Use this when the tracked process is finished and you no longer want the Live
227
- Activity on devices. `content_state` is optional here; include it if you want
228
- to end the stream with a final state.
243
+ Call `end_stream(...)` with the same `stream_key` to dismiss the Live Activity. You can include final values before it is removed. By default, iOS removes the Live Activity after two minutes. Set `auto_dismiss_minutes` to choose a different dismissal time, including `0` for immediate dismissal.
229
244
 
230
245
  ```ruby
231
246
  activitysmith.live_activities.end_stream(
232
247
  "prod-web-1",
233
248
  {
234
- content_state: {
235
- title: "Server Health",
236
- subtitle: "prod-web-1",
237
- type: "metrics",
238
- metrics: [
239
- { label: "CPU", value: 7, unit: "%" },
240
- { label: "MEM", value: 38, unit: "%" }
241
- ]
242
- }
243
- }
244
- )
245
- ```
246
-
247
- If you later send another `stream(...)` request with the same `stream_key`,
248
- ActivitySmith starts a new Live Activity for that stream again.
249
-
250
- Stream responses include an `operation` field:
251
-
252
- - `started`: ActivitySmith started a new Live Activity for this `stream_key`
253
- - `updated`: ActivitySmith updated the current Live Activity
254
- - `rotated`: ActivitySmith ended the previous Live Activity and started a new one
255
- - `noop`: the incoming state matched the current state, so no update was sent
256
- - `paused`: the stream is paused, so no Live Activity was started or updated
257
- - `ended`: returned by `end_stream(...)` after the stream is ended
258
-
259
- ### Advanced: Full lifecycle control
260
-
261
- Use these methods when you want to manage the Live Activity lifecycle yourself:
262
-
263
- 1. Call `activitysmith.live_activities.start(...)`.
264
- 2. Save the returned `activity_id`.
265
- 3. Call `activitysmith.live_activities.update(...)` as progress changes.
266
- 4. Call `activitysmith.live_activities.end(...)` when the work is finished.
267
-
268
- ### Metrics Type
269
-
270
- Use `metrics` when you want to keep a small set of live stats visible, such as
271
- server health, queue pressure, or database load.
272
-
273
- #### Start
274
-
275
- <p align="center">
276
- <img src="https://cdn.activitysmith.com/features/metrics-live-activity-start.png" alt="Metrics start example" width="680" />
277
- </p>
278
-
279
- ```ruby
280
- start = activitysmith.live_activities.start(
281
- {
282
- content_state: {
283
- title: "Server Health",
284
- subtitle: "prod-web-1",
285
- type: "metrics",
286
- metrics: [
287
- { label: "CPU", value: 9, unit: "%" },
288
- { label: "MEM", value: 45, unit: "%" }
289
- ]
290
- }
291
- }
292
- )
293
-
294
- activity_id = start.activity_id
295
- ```
296
-
297
- #### Update
298
-
299
- <p align="center">
300
- <img src="https://cdn.activitysmith.com/features/metrics-live-activity-update.png" alt="Metrics update example" width="680" />
301
- </p>
302
-
303
- ```ruby
304
- activitysmith.live_activities.update(
305
- {
306
- activity_id: activity_id,
307
- content_state: {
308
- title: "Server Health",
309
- subtitle: "prod-web-1",
310
- type: "metrics",
311
- metrics: [
312
- { label: "CPU", value: 76, unit: "%" },
313
- { label: "MEM", value: 52, unit: "%" }
314
- ]
315
- }
316
- }
317
- )
318
- ```
319
-
320
- #### End
321
-
322
- <p align="center">
323
- <img src="https://cdn.activitysmith.com/features/metrics-live-activity-end.png" alt="Metrics end example" width="680" />
324
- </p>
325
-
326
- ```ruby
327
- activitysmith.live_activities.end(
328
- {
329
- activity_id: activity_id,
330
249
  content_state: {
331
250
  title: "Server Health",
332
251
  subtitle: "prod-web-1",
@@ -341,155 +260,23 @@ activitysmith.live_activities.end(
341
260
  )
342
261
  ```
343
262
 
344
- ### Segmented Progress Type
345
-
346
- Use `segmented_progress` for jobs and workflows that move through clear steps or
347
- phases. It fits jobs like backups, deployments, ETL pipelines, and checklists.
348
- `number_of_steps` is dynamic, so you can increase or decrease it later if the
349
- workflow changes.
350
-
351
- #### Start
352
-
353
- <p align="center">
354
- <img src="https://cdn.activitysmith.com/features/start-live-activity.png" alt="Segmented progress start example" width="680" />
355
- </p>
356
-
357
- ```ruby
358
- start = activitysmith.live_activities.start(
359
- {
360
- content_state: {
361
- title: "Nightly database backup",
362
- subtitle: "create snapshot",
363
- number_of_steps: 3,
364
- current_step: 1,
365
- type: "segmented_progress",
366
- color: "yellow"
367
- }
368
- }
369
- )
370
-
371
- activity_id = start.activity_id
372
- ```
373
-
374
- #### Update
375
-
376
- <p align="center">
377
- <img src="https://cdn.activitysmith.com/features/update-live-activity.png" alt="Segmented progress update example" width="680" />
378
- </p>
379
-
380
- ```ruby
381
- activitysmith.live_activities.update(
382
- {
383
- activity_id: activity_id,
384
- content_state: {
385
- title: "Nightly database backup",
386
- subtitle: "upload archive",
387
- number_of_steps: 3,
388
- current_step: 2
389
- }
390
- }
391
- )
392
- ```
393
-
394
- #### End
395
-
396
- <p align="center">
397
- <img src="https://cdn.activitysmith.com/features/end-live-activity.png" alt="Segmented progress end example" width="680" />
398
- </p>
399
-
400
- ```ruby
401
- activitysmith.live_activities.end(
402
- {
403
- activity_id: activity_id,
404
- content_state: {
405
- title: "Nightly database backup",
406
- subtitle: "verify restore",
407
- number_of_steps: 3,
408
- current_step: 3,
409
- auto_dismiss_minutes: 2
410
- }
411
- }
412
- )
413
- ```
414
-
415
- ### Progress Type
416
-
417
- Use `progress` when the state is naturally continuous. It fits charging,
418
- downloads, sync jobs, uploads, timers, and any flow where a percentage or
419
- numeric range is the clearest signal.
420
-
421
- #### Start
422
-
423
- <p align="center">
424
- <img src="https://cdn.activitysmith.com/features/progress-live-activity-start.png" alt="Progress start example" width="680" />
425
- </p>
426
-
427
- ```ruby
428
- start = activitysmith.live_activities.start(
429
- {
430
- content_state: {
431
- title: "EV Charging",
432
- subtitle: "Added 30 mi range",
433
- type: "progress",
434
- percentage: 15
435
- }
436
- }
437
- )
438
-
439
- activity_id = start.activity_id
440
- ```
441
-
442
- #### Update
443
-
444
- <p align="center">
445
- <img src="https://cdn.activitysmith.com/features/progress-live-activity-update.png" alt="Progress update example" width="680" />
446
- </p>
447
-
448
- ```ruby
449
- activitysmith.live_activities.update(
450
- {
451
- activity_id: activity_id,
452
- content_state: {
453
- title: "EV Charging",
454
- subtitle: "Added 120 mi range",
455
- percentage: 60
456
- }
457
- }
458
- )
459
- ```
460
-
461
- #### End
462
-
463
- <p align="center">
464
- <img src="https://cdn.activitysmith.com/features/progress-live-activity-end.png" alt="Progress end example" width="680" />
465
- </p>
466
-
467
- ```ruby
468
- activitysmith.live_activities.end(
469
- {
470
- activity_id: activity_id,
471
- content_state: {
472
- title: "EV Charging",
473
- subtitle: "Added 200 mi range",
474
- percentage: 100,
475
- auto_dismiss_minutes: 2
476
- }
477
- }
478
- )
479
- ```
480
-
481
263
  ### Live Activity Action
482
264
 
483
- Just like Actionable Push Notifications, Live Activities can have a button that opens provided URL in a browser or triggers a webhook. Webhooks are executed by the ActivitySmith backend.
265
+ Live Activities can include one optional action button. Use it to open a URL from the Live Activity or trigger a backend webhook.
484
266
 
485
267
  <p align="center">
486
- <img src="https://cdn.activitysmith.com/features/metrics-live-activity-action.png" alt="Metrics Live Activity with action" width="680" />
268
+ <img
269
+ src="https://cdn.activitysmith.com/features/live-activity-with-action.png?v=20260319-1"
270
+ alt="Live Activity with action button"
271
+ width="680"
272
+ />
487
273
  </p>
488
274
 
489
275
  #### Open URL action
490
276
 
491
277
  ```ruby
492
- start = activitysmith.live_activities.start(
278
+ activitysmith.live_activities.stream(
279
+ "prod-web-1",
493
280
  {
494
281
  content_state: {
495
282
  title: "Server Health",
@@ -507,23 +294,18 @@ start = activitysmith.live_activities.start(
507
294
  }
508
295
  }
509
296
  )
510
-
511
- activity_id = start.activity_id
512
297
  ```
513
298
 
514
299
  #### Webhook action
515
300
 
516
- <p align="center">
517
- <img src="https://cdn.activitysmith.com/features/live-activity-with-action.png?v=20260319-1" alt="Live Activity with action" width="680" />
518
- </p>
519
-
520
301
  ```ruby
521
- activitysmith.live_activities.update(
302
+ activitysmith.live_activities.stream(
303
+ "search-reindex",
522
304
  {
523
- activity_id: activity_id,
524
305
  content_state: {
525
306
  title: "Reindexing product search",
526
307
  subtitle: "Shard 7 of 12",
308
+ type: "segmented_progress",
527
309
  number_of_steps: 12,
528
310
  current_step: 7
529
311
  },
@@ -19,8 +19,8 @@ module OpenapiClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # End a Live Activity
23
- # Ends a Live Activity and archives its lifecycle. Supports segmented_progress, progress, and metrics activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start.
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, and stats activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start.
24
24
  # @param live_activity_end_request [LiveActivityEndRequest]
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @return [LiveActivityEndResponse]
@@ -29,8 +29,8 @@ module OpenapiClient
29
29
  data
30
30
  end
31
31
 
32
- # End a Live Activity
33
- # Ends a Live Activity and archives its lifecycle. Supports segmented_progress, progress, and metrics activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start.
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, and stats activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start.
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
@@ -166,8 +166,8 @@ module OpenapiClient
166
166
  return data, status_code, headers
167
167
  end
168
168
 
169
- # Send a stream update
170
- # Use this endpoint when you want the easiest, stateless way to trigger Live Activities. You do not need to store activity_id or manage the Live Activity lifecycle yourself. Send the latest state for a stable stream_key and ActivitySmith will handle the rest for you: if there is no Live Activity yet, it starts one; if there is already one for this stream, it updates it. If you need direct lifecycle control, use /live-activity/start, /live-activity/update, and /live-activity/end instead.
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.
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
@@ -177,8 +177,8 @@ module OpenapiClient
177
177
  data
178
178
  end
179
179
 
180
- # Send a stream update
181
- # Use this endpoint when you want the easiest, stateless way to trigger Live Activities. You do not need to store activity_id or manage the Live Activity lifecycle yourself. Send the latest state for a stable stream_key and ActivitySmith will handle the rest for you: if there is no Live Activity yet, it starts one; if there is already one for this stream, it updates it. If you need direct lifecycle control, use /live-activity/start, /live-activity/update, and /live-activity/end instead.
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.
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
@@ -249,8 +249,8 @@ module OpenapiClient
249
249
  return data, status_code, headers
250
250
  end
251
251
 
252
- # Start a Live Activity
253
- # Starts a Live Activity on devices matched by API key scope and optional target channels. Supports segmented_progress, progress, and metrics activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes.
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, and stats activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes.
254
254
  # @param live_activity_start_request [LiveActivityStartRequest]
255
255
  # @param [Hash] opts the optional parameters
256
256
  # @return [LiveActivityStartResponse]
@@ -259,8 +259,8 @@ module OpenapiClient
259
259
  data
260
260
  end
261
261
 
262
- # Start a Live Activity
263
- # Starts a Live Activity on devices matched by API key scope and optional target channels. Supports segmented_progress, progress, and metrics activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes.
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, and stats activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes.
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
@@ -317,8 +317,8 @@ module OpenapiClient
317
317
  return data, status_code, headers
318
318
  end
319
319
 
320
- # Update a Live Activity
321
- # Updates an existing Live Activity. If the per-activity token is not registered yet, the update is queued. Supports segmented_progress, progress, and metrics activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes.
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, and stats activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes.
322
322
  # @param live_activity_update_request [LiveActivityUpdateRequest]
323
323
  # @param [Hash] opts the optional parameters
324
324
  # @return [LiveActivityUpdateResponse]
@@ -327,8 +327,8 @@ module OpenapiClient
327
327
  data
328
328
  end
329
329
 
330
- # Update a Live Activity
331
- # Updates an existing Live Activity. If the per-activity token is not registered yet, the update is queued. Supports segmented_progress, progress, and metrics activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes.
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, and stats activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes.
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
@@ -21,12 +21,38 @@ module OpenapiClient
21
21
 
22
22
  attr_accessor :unit
23
23
 
24
+ # Optional per-metric accent color for metrics and stats activities.
25
+ attr_accessor :color
26
+
27
+ class EnumAttributeValidator
28
+ attr_reader :datatype
29
+ attr_reader :allowable_values
30
+
31
+ def initialize(datatype, allowable_values)
32
+ @allowable_values = allowable_values.map do |value|
33
+ case datatype.to_s
34
+ when /Integer/i
35
+ value.to_i
36
+ when /Float/i
37
+ value.to_f
38
+ else
39
+ value
40
+ end
41
+ end
42
+ end
43
+
44
+ def valid?(value)
45
+ !value || allowable_values.include?(value)
46
+ end
47
+ end
48
+
24
49
  # Attribute mapping from ruby-style variable name to JSON key.
25
50
  def self.attribute_map
26
51
  {
27
52
  :'label' => :'label',
28
53
  :'value' => :'value',
29
- :'unit' => :'unit'
54
+ :'unit' => :'unit',
55
+ :'color' => :'color'
30
56
  }
31
57
  end
32
58
 
@@ -39,8 +65,9 @@ module OpenapiClient
39
65
  def self.openapi_types
40
66
  {
41
67
  :'label' => :'String',
42
- :'value' => :'Float',
43
- :'unit' => :'String'
68
+ :'value' => :'ActivityMetricValue',
69
+ :'unit' => :'String',
70
+ :'color' => :'String'
44
71
  }
45
72
  end
46
73
 
@@ -80,6 +107,10 @@ module OpenapiClient
80
107
  if attributes.key?(:'unit')
81
108
  self.unit = attributes[:'unit']
82
109
  end
110
+
111
+ if attributes.key?(:'color')
112
+ self.color = attributes[:'color']
113
+ end
83
114
  end
84
115
 
85
116
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -99,14 +130,6 @@ module OpenapiClient
99
130
  invalid_properties.push('invalid value for "value", value cannot be nil.')
100
131
  end
101
132
 
102
- if @value > 100
103
- invalid_properties.push('invalid value for "value", must be smaller than or equal to 100.')
104
- end
105
-
106
- if @value < 0
107
- invalid_properties.push('invalid value for "value", must be greater than or equal to 0.')
108
- end
109
-
110
133
  invalid_properties
111
134
  end
112
135
 
@@ -117,8 +140,8 @@ module OpenapiClient
117
140
  return false if @label.nil?
118
141
  return false if @label.to_s.length < 1
119
142
  return false if @value.nil?
120
- return false if @value > 100
121
- return false if @value < 0
143
+ color_validator = EnumAttributeValidator.new('String', ["lime", "green", "cyan", "blue", "purple", "magenta", "red", "orange", "yellow"])
144
+ return false unless color_validator.valid?(@color)
122
145
  true
123
146
  end
124
147
 
@@ -136,22 +159,14 @@ module OpenapiClient
136
159
  @label = label
137
160
  end
138
161
 
139
- # Custom attribute writer method with validation
140
- # @param [Object] value Value to be assigned
141
- def value=(value)
142
- if value.nil?
143
- fail ArgumentError, 'value cannot be nil'
162
+ # Custom attribute writer method checking allowed values (enum).
163
+ # @param [Object] color Object to be assigned
164
+ def color=(color)
165
+ validator = EnumAttributeValidator.new('String', ["lime", "green", "cyan", "blue", "purple", "magenta", "red", "orange", "yellow"])
166
+ unless validator.valid?(color)
167
+ fail ArgumentError, "invalid value for \"color\", must be one of #{validator.allowable_values}."
144
168
  end
145
-
146
- if value > 100
147
- fail ArgumentError, 'invalid value for "value", must be smaller than or equal to 100.'
148
- end
149
-
150
- if value < 0
151
- fail ArgumentError, 'invalid value for "value", must be greater than or equal to 0.'
152
- end
153
-
154
- @value = value
169
+ @color = color
155
170
  end
156
171
 
157
172
  # Checks equality by comparing each attribute.
@@ -161,7 +176,8 @@ module OpenapiClient
161
176
  self.class == o.class &&
162
177
  label == o.label &&
163
178
  value == o.value &&
164
- unit == o.unit
179
+ unit == o.unit &&
180
+ color == o.color
165
181
  end
166
182
 
167
183
  # @see the `==` method
@@ -173,7 +189,7 @@ module OpenapiClient
173
189
  # Calculates hash code according to all attributes.
174
190
  # @return [Integer] Hash code
175
191
  def hash
176
- [label, value, unit].hash
192
+ [label, value, unit, color].hash
177
193
  end
178
194
 
179
195
  # Builds the object from hash
@@ -0,0 +1,105 @@
1
+ =begin
2
+ #ActivitySmith API
3
+
4
+ #Send push notifications and Live Activities to your own devices via a single API key.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.7.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module OpenapiClient
17
+ module ActivityMetricValue
18
+ class << self
19
+ # List of class defined in oneOf (OpenAPI v3)
20
+ def openapi_one_of
21
+ [
22
+ :'Float',
23
+ :'String'
24
+ ]
25
+ end
26
+
27
+ # Builds the object
28
+ # @param [Mixed] Data to be matched against the list of oneOf items
29
+ # @return [Object] Returns the model or the data itself
30
+ def build(data)
31
+ # Go through the list of oneOf items and attempt to identify the appropriate one.
32
+ # Note:
33
+ # - We do not attempt to check whether exactly one item matches.
34
+ # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
35
+ # due to the way the deserialization is made in the base_object template (it just casts without verifying).
36
+ # - TODO: scalar values are de facto behaving as if they were nullable.
37
+ # - TODO: logging when debugging is set.
38
+ openapi_one_of.each do |klass|
39
+ begin
40
+ next if klass == :AnyType # "nullable: true"
41
+ typed_data = find_and_cast_into_type(klass, data)
42
+ return typed_data if typed_data
43
+ rescue # rescue all errors so we keep iterating even if the current item lookup raises
44
+ end
45
+ end
46
+
47
+ openapi_one_of.include?(:AnyType) ? data : nil
48
+ end
49
+
50
+ private
51
+
52
+ SchemaMismatchError = Class.new(StandardError)
53
+
54
+ # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
55
+ def find_and_cast_into_type(klass, data)
56
+ return if data.nil?
57
+
58
+ case klass.to_s
59
+ when 'Boolean'
60
+ return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
61
+ when 'Float'
62
+ return data if data.instance_of?(Float)
63
+ when 'Integer'
64
+ return data if data.instance_of?(Integer)
65
+ when 'Time'
66
+ return Time.parse(data)
67
+ when 'Date'
68
+ return Date.parse(data)
69
+ when 'String'
70
+ return data if data.instance_of?(String)
71
+ when 'Object' # "type: object"
72
+ return data if data.instance_of?(Hash)
73
+ when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
74
+ if data.instance_of?(Array)
75
+ sub_type = Regexp.last_match[:sub_type]
76
+ return data.map { |item| find_and_cast_into_type(sub_type, item) }
77
+ end
78
+ when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
79
+ if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
80
+ sub_type = Regexp.last_match[:sub_type]
81
+ return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
82
+ end
83
+ else # model
84
+ const = OpenapiClient.const_get(klass)
85
+ if const
86
+ if const.respond_to?(:openapi_one_of) # nested oneOf model
87
+ model = const.build(data)
88
+ return model if model
89
+ else
90
+ # raise if data contains keys that are not known to the model
91
+ raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty?
92
+ model = const.build_from_hash(data)
93
+ return model if model
94
+ end
95
+ end
96
+ end
97
+
98
+ raise # if no match by now, raise
99
+ rescue
100
+ raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
101
+ end
102
+ end
103
+ end
104
+
105
+ end
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module OpenapiClient
17
- # End payload requires title. For segmented_progress include current_step and optionally number_of_steps. For progress include percentage or value with upper_limit. For metrics include a non-empty metrics array. Type is optional when ending an existing activity. You can send an updated number_of_steps here if the workflow changed after start.
17
+ # End payload requires title. For segmented_progress include current_step and optionally number_of_steps. For progress include percentage or value with upper_limit. For metrics and stats include a non-empty metrics array. Type is optional when ending an existing activity. You can send an updated number_of_steps here if the workflow changed after start.
18
18
  class ContentStateEnd
19
19
  attr_accessor :title
20
20
 
@@ -35,7 +35,7 @@ module OpenapiClient
35
35
  # Maximum progress value. Use with value for type=progress.
36
36
  attr_accessor :upper_limit
37
37
 
38
- # Use for type=metrics.
38
+ # Use for type=metrics or type=stats.
39
39
  attr_accessor :metrics
40
40
 
41
41
  # Optional. When omitted, the API uses the existing Live Activity type.
@@ -227,6 +227,10 @@ module OpenapiClient
227
227
  invalid_properties.push('invalid value for "percentage", must be greater than or equal to 0.')
228
228
  end
229
229
 
230
+ if !@metrics.nil? && @metrics.length > 8
231
+ invalid_properties.push('invalid value for "metrics", number of items must be less than or equal to 8.')
232
+ end
233
+
230
234
  if !@metrics.nil? && @metrics.length < 1
231
235
  invalid_properties.push('invalid value for "metrics", number of items must be greater than or equal to 1.')
232
236
  end
@@ -247,8 +251,9 @@ module OpenapiClient
247
251
  return false if !@current_step.nil? && @current_step < 1
248
252
  return false if !@percentage.nil? && @percentage > 100
249
253
  return false if !@percentage.nil? && @percentage < 0
254
+ return false if !@metrics.nil? && @metrics.length > 8
250
255
  return false if !@metrics.nil? && @metrics.length < 1
251
- type_validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics"])
256
+ type_validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics", "stats"])
252
257
  return false unless type_validator.valid?(@type)
253
258
  color_validator = EnumAttributeValidator.new('String', ["lime", "green", "cyan", "blue", "purple", "magenta", "red", "orange", "yellow"])
254
259
  return false unless color_validator.valid?(@color)
@@ -311,6 +316,10 @@ module OpenapiClient
311
316
  fail ArgumentError, 'metrics cannot be nil'
312
317
  end
313
318
 
319
+ if metrics.length > 8
320
+ fail ArgumentError, 'invalid value for "metrics", number of items must be less than or equal to 8.'
321
+ end
322
+
314
323
  if metrics.length < 1
315
324
  fail ArgumentError, 'invalid value for "metrics", number of items must be greater than or equal to 1.'
316
325
  end
@@ -321,7 +330,7 @@ module OpenapiClient
321
330
  # Custom attribute writer method checking allowed values (enum).
322
331
  # @param [Object] type Object to be assigned
323
332
  def type=(type)
324
- validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics"])
333
+ validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics", "stats"])
325
334
  unless validator.valid?(type)
326
335
  fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
327
336
  end
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module OpenapiClient
17
- # Start payload requires title and type. For segmented_progress include number_of_steps and current_step. For progress include percentage or value with upper_limit. For metrics include a non-empty metrics array. For segmented_progress, number_of_steps is not locked and can be changed in later update or end calls.
17
+ # Start payload requires title and type. For segmented_progress include number_of_steps and current_step. For progress include percentage or value with upper_limit. For metrics and stats include a non-empty metrics array. For segmented_progress, number_of_steps is not locked and can be changed in later update or end calls.
18
18
  class ContentStateStart
19
19
  attr_accessor :title
20
20
 
@@ -35,7 +35,7 @@ module OpenapiClient
35
35
  # Maximum progress value. Use with value for type=progress.
36
36
  attr_accessor :upper_limit
37
37
 
38
- # Use for type=metrics.
38
+ # Use for type=metrics or type=stats.
39
39
  attr_accessor :metrics
40
40
 
41
41
  attr_accessor :type
@@ -217,6 +217,10 @@ module OpenapiClient
217
217
  invalid_properties.push('invalid value for "percentage", must be greater than or equal to 0.')
218
218
  end
219
219
 
220
+ if !@metrics.nil? && @metrics.length > 8
221
+ invalid_properties.push('invalid value for "metrics", number of items must be less than or equal to 8.')
222
+ end
223
+
220
224
  if !@metrics.nil? && @metrics.length < 1
221
225
  invalid_properties.push('invalid value for "metrics", number of items must be greater than or equal to 1.')
222
226
  end
@@ -237,9 +241,10 @@ module OpenapiClient
237
241
  return false if !@current_step.nil? && @current_step < 1
238
242
  return false if !@percentage.nil? && @percentage > 100
239
243
  return false if !@percentage.nil? && @percentage < 0
244
+ return false if !@metrics.nil? && @metrics.length > 8
240
245
  return false if !@metrics.nil? && @metrics.length < 1
241
246
  return false if @type.nil?
242
- type_validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics"])
247
+ type_validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics", "stats"])
243
248
  return false unless type_validator.valid?(@type)
244
249
  color_validator = EnumAttributeValidator.new('String', ["lime", "green", "cyan", "blue", "purple", "magenta", "red", "orange", "yellow"])
245
250
  return false unless color_validator.valid?(@color)
@@ -301,6 +306,10 @@ module OpenapiClient
301
306
  fail ArgumentError, 'metrics cannot be nil'
302
307
  end
303
308
 
309
+ if metrics.length > 8
310
+ fail ArgumentError, 'invalid value for "metrics", number of items must be less than or equal to 8.'
311
+ end
312
+
304
313
  if metrics.length < 1
305
314
  fail ArgumentError, 'invalid value for "metrics", number of items must be greater than or equal to 1.'
306
315
  end
@@ -311,7 +320,7 @@ module OpenapiClient
311
320
  # Custom attribute writer method checking allowed values (enum).
312
321
  # @param [Object] type Object to be assigned
313
322
  def type=(type)
314
- validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics"])
323
+ validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics", "stats"])
315
324
  unless validator.valid?(type)
316
325
  fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
317
326
  end
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module OpenapiClient
17
- # Update payload requires title. For segmented_progress include current_step and optionally number_of_steps. For progress include percentage or value with upper_limit. For metrics include a non-empty metrics array. Type is optional when updating an existing activity. You can increase or decrease number_of_steps during updates.
17
+ # Update payload requires title. For segmented_progress include current_step and optionally number_of_steps. For progress include percentage or value with upper_limit. For metrics and stats include a non-empty metrics array. Type is optional when updating an existing activity. You can increase or decrease number_of_steps during updates.
18
18
  class ContentStateUpdate
19
19
  attr_accessor :title
20
20
 
@@ -35,7 +35,7 @@ module OpenapiClient
35
35
  # Maximum progress value. Use with value for type=progress.
36
36
  attr_accessor :upper_limit
37
37
 
38
- # Use for type=metrics.
38
+ # Use for type=metrics or type=stats.
39
39
  attr_accessor :metrics
40
40
 
41
41
  # Optional. When omitted, the API uses the existing Live Activity type.
@@ -216,6 +216,10 @@ module OpenapiClient
216
216
  invalid_properties.push('invalid value for "percentage", must be greater than or equal to 0.')
217
217
  end
218
218
 
219
+ if !@metrics.nil? && @metrics.length > 8
220
+ invalid_properties.push('invalid value for "metrics", number of items must be less than or equal to 8.')
221
+ end
222
+
219
223
  if !@metrics.nil? && @metrics.length < 1
220
224
  invalid_properties.push('invalid value for "metrics", number of items must be greater than or equal to 1.')
221
225
  end
@@ -232,8 +236,9 @@ module OpenapiClient
232
236
  return false if !@current_step.nil? && @current_step < 1
233
237
  return false if !@percentage.nil? && @percentage > 100
234
238
  return false if !@percentage.nil? && @percentage < 0
239
+ return false if !@metrics.nil? && @metrics.length > 8
235
240
  return false if !@metrics.nil? && @metrics.length < 1
236
- type_validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics"])
241
+ type_validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics", "stats"])
237
242
  return false unless type_validator.valid?(@type)
238
243
  color_validator = EnumAttributeValidator.new('String', ["lime", "green", "cyan", "blue", "purple", "magenta", "red", "orange", "yellow"])
239
244
  return false unless color_validator.valid?(@color)
@@ -295,6 +300,10 @@ module OpenapiClient
295
300
  fail ArgumentError, 'metrics cannot be nil'
296
301
  end
297
302
 
303
+ if metrics.length > 8
304
+ fail ArgumentError, 'invalid value for "metrics", number of items must be less than or equal to 8.'
305
+ end
306
+
298
307
  if metrics.length < 1
299
308
  fail ArgumentError, 'invalid value for "metrics", number of items must be greater than or equal to 1.'
300
309
  end
@@ -305,7 +314,7 @@ module OpenapiClient
305
314
  # Custom attribute writer method checking allowed values (enum).
306
315
  # @param [Object] type Object to be assigned
307
316
  def type=(type)
308
- validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics"])
317
+ validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics", "stats"])
309
318
  unless validator.valid?(type)
310
319
  fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
311
320
  end
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module OpenapiClient
17
- # Current state for a managed Live Activity stream. Include type on the first PUT, and whenever the stream may need to start a fresh activity. Supports segmented_progress, progress, and metrics types.
17
+ # Current state for a managed Live Activity stream. Include type on the first PUT, and whenever the stream may need to start a fresh activity. Supports segmented_progress, progress, metrics, and stats types.
18
18
  class StreamContentState
19
19
  attr_accessor :title
20
20
 
@@ -47,7 +47,7 @@ module OpenapiClient
47
47
  # Optional. Colors for completed steps. When used with segmented_progress, the array length should match current_step.
48
48
  attr_accessor :step_colors
49
49
 
50
- # Use for metrics activities.
50
+ # Use for metrics and stats activities.
51
51
  attr_accessor :metrics
52
52
 
53
53
  # Optional. Seconds before the ended Live Activity is dismissed.
@@ -234,6 +234,10 @@ module OpenapiClient
234
234
  invalid_properties.push('invalid value for "percentage", must be greater than or equal to 0.')
235
235
  end
236
236
 
237
+ if !@metrics.nil? && @metrics.length > 8
238
+ invalid_properties.push('invalid value for "metrics", number of items must be less than or equal to 8.')
239
+ end
240
+
237
241
  if !@metrics.nil? && @metrics.length < 1
238
242
  invalid_properties.push('invalid value for "metrics", number of items must be greater than or equal to 1.')
239
243
  end
@@ -258,12 +262,13 @@ module OpenapiClient
258
262
  return false if !@current_step.nil? && @current_step < 1
259
263
  return false if !@percentage.nil? && @percentage > 100
260
264
  return false if !@percentage.nil? && @percentage < 0
261
- type_validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics"])
265
+ type_validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics", "stats"])
262
266
  return false unless type_validator.valid?(@type)
263
267
  color_validator = EnumAttributeValidator.new('String', ["lime", "green", "cyan", "blue", "purple", "magenta", "red", "orange", "yellow"])
264
268
  return false unless color_validator.valid?(@color)
265
269
  step_color_validator = EnumAttributeValidator.new('String', ["lime", "green", "cyan", "blue", "purple", "magenta", "red", "orange", "yellow"])
266
270
  return false unless step_color_validator.valid?(@step_color)
271
+ return false if !@metrics.nil? && @metrics.length > 8
267
272
  return false if !@metrics.nil? && @metrics.length < 1
268
273
  return false if !@auto_dismiss_seconds.nil? && @auto_dismiss_seconds < 0
269
274
  return false if !@auto_dismiss_minutes.nil? && @auto_dismiss_minutes < 0
@@ -319,7 +324,7 @@ module OpenapiClient
319
324
  # Custom attribute writer method checking allowed values (enum).
320
325
  # @param [Object] type Object to be assigned
321
326
  def type=(type)
322
- validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics"])
327
+ validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics", "stats"])
323
328
  unless validator.valid?(type)
324
329
  fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
325
330
  end
@@ -353,6 +358,10 @@ module OpenapiClient
353
358
  fail ArgumentError, 'metrics cannot be nil'
354
359
  end
355
360
 
361
+ if metrics.length > 8
362
+ fail ArgumentError, 'invalid value for "metrics", number of items must be less than or equal to 8.'
363
+ end
364
+
356
365
  if metrics.length < 1
357
366
  fail ArgumentError, 'invalid value for "metrics", number of items must be greater than or equal to 1.'
358
367
  end
@@ -11,5 +11,5 @@ Generator version: 7.7.0
11
11
  =end
12
12
 
13
13
  module OpenapiClient
14
- VERSION = '1.2.1'
14
+ VERSION = '1.3.1'
15
15
  end
@@ -18,6 +18,7 @@ require 'activitysmith_openapi/configuration'
18
18
 
19
19
  # Models
20
20
  require 'activitysmith_openapi/models/activity_metric'
21
+ require 'activitysmith_openapi/models/activity_metric_value'
21
22
  require 'activitysmith_openapi/models/alert_payload'
22
23
  require 'activitysmith_openapi/models/bad_request_error'
23
24
  require 'activitysmith_openapi/models/channel_target'
@@ -2,6 +2,11 @@
2
2
 
3
3
  module ActivitySmith
4
4
  class LiveActivities
5
+ TYPE_SEGMENTED_PROGRESS = "segmented_progress"
6
+ TYPE_PROGRESS = "progress"
7
+ TYPE_METRICS = "metrics"
8
+ TYPE_STATS = "stats"
9
+
5
10
  def initialize(api)
6
11
  @api = api
7
12
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActivitySmith
4
- VERSION = "1.2.1"
4
+ VERSION = "1.3.1"
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.2.1
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ActivitySmith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-05-03 00:00:00.000000000 Z
11
+ date: 2026-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -83,6 +83,7 @@ files:
83
83
  - generated/activitysmith_openapi/api_error.rb
84
84
  - generated/activitysmith_openapi/configuration.rb
85
85
  - generated/activitysmith_openapi/models/activity_metric.rb
86
+ - generated/activitysmith_openapi/models/activity_metric_value.rb
86
87
  - generated/activitysmith_openapi/models/alert_payload.rb
87
88
  - generated/activitysmith_openapi/models/bad_request_error.rb
88
89
  - generated/activitysmith_openapi/models/channel_target.rb