Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,59 @@ $activitysmith->liveActivities->end([
]);
```

### Live Activity Action

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.

<p align="center">
<img src="https://cdn.activitysmith.com/features/live-activity-with-action.png?v=20260319-1" alt="Live Activity with action" width="680" />
</p>

#### Open URL action

```php
$start = $activitysmith->liveActivities->start([
'content_state' => [
'title' => 'Deploying payments-api',
'subtitle' => 'Running database migrations',
'number_of_steps' => 5,
'current_step' => 3,
'type' => 'segmented_progress',
],
'action' => [
'title' => 'Open Workflow',
'type' => 'open_url',
'url' => 'https://github.com/acme/payments-api/actions/runs/1234567890',
],
]);

$activityId = $start->getActivityId();
```

#### Webhook action

```php
$activitysmith->liveActivities->update([
'activity_id' => $activityId,
'content_state' => [
'title' => 'Reindexing product search',
'subtitle' => 'Shard 7 of 12',
'number_of_steps' => 12,
'current_step' => 7,
],
'action' => [
'title' => 'Pause Reindex',
'type' => 'webhook',
'url' => 'https://ops.example.com/hooks/search/reindex/pause',
'method' => 'POST',
'body' => [
'job_id' => 'reindex-2026-03-19',
'requested_by' => 'activitysmith-php',
],
],
]);
```

## Channels

Channels are used to target specific team members or devices. Can be used for both push notifications and live activities.
Expand Down
4 changes: 2 additions & 2 deletions generated/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class Configuration
*
* @var string
*/
protected $userAgent = 'OpenAPI-Generator/0.1.5/PHP';
protected $userAgent = 'OpenAPI-Generator/1.0.0/PHP';

/**
* Debug switch (default set to false)
Expand Down Expand Up @@ -433,7 +433,7 @@ public static function toDebugReport()
$report .= ' OS: ' . php_uname() . PHP_EOL;
$report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL;
$report .= ' The version of the OpenAPI document: 1.0.0' . PHP_EOL;
$report .= ' SDK Package Version: 0.1.5' . PHP_EOL;
$report .= ' SDK Package Version: 1.0.0' . PHP_EOL;
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;

return $report;
Expand Down
Loading
Loading