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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 1.10.0

### New Features

- **New Feature: Tags** — Organize and filter your Push Notification and Live Activity history using one or more tags.

## 1.9.0

### New Features
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ See [API reference](https://activitysmith.com/docs/api-reference/introduction).
- [Widgets](#widgets)
- [App Icon Badge Count](#app-icon-badge-count)
- [Channels](#channels)
- [Tags](#tags)

## Installation

Expand Down Expand Up @@ -589,6 +590,18 @@ $activitysmith->liveActivities->start(
$activitysmith->badgeCount(3, channels: ['sales', 'customer-success']);
```

## Tags

Use `tags` to organize and filter your Push Notification and Live Activity history. Tags are created automatically when you first use them.

```php
$activitysmith->notifications->send(
title: 'New subscription 💸',
message: 'Customer upgraded to Pro plan',
tags: ['user:382', 'billing'],
);
```

## Error Handling

```php
Expand Down
8 changes: 4 additions & 4 deletions generated/Api/AppIconBadgesApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public function getConfig()
/**
* Operation updateAppIconBadgeCount
*
* Update App Icon Badge Count
* Set App Icon Badge Count
*
* @param \ActivitySmith\Generated\Model\AppIconBadgeCountUpdateRequest $appIconBadgeCountUpdateRequest appIconBadgeCountUpdateRequest (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateAppIconBadgeCount'] to see the possible values for this operation
Expand All @@ -143,7 +143,7 @@ public function updateAppIconBadgeCount($appIconBadgeCountUpdateRequest, string
/**
* Operation updateAppIconBadgeCountWithHttpInfo
*
* Update App Icon Badge Count
* Set App Icon Badge Count
*
* @param \ActivitySmith\Generated\Model\AppIconBadgeCountUpdateRequest $appIconBadgeCountUpdateRequest (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateAppIconBadgeCount'] to see the possible values for this operation
Expand Down Expand Up @@ -407,7 +407,7 @@ public function updateAppIconBadgeCountWithHttpInfo($appIconBadgeCountUpdateRequ
/**
* Operation updateAppIconBadgeCountAsync
*
* Update App Icon Badge Count
* Set App Icon Badge Count
*
* @param \ActivitySmith\Generated\Model\AppIconBadgeCountUpdateRequest $appIconBadgeCountUpdateRequest (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateAppIconBadgeCount'] to see the possible values for this operation
Expand All @@ -428,7 +428,7 @@ function ($response) {
/**
* Operation updateAppIconBadgeCountAsyncWithHttpInfo
*
* Update App Icon Badge Count
* Set App Icon Badge Count
*
* @param \ActivitySmith\Generated\Model\AppIconBadgeCountUpdateRequest $appIconBadgeCountUpdateRequest (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateAppIconBadgeCount'] to see the possible values for this operation
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/1.8.0/PHP';
protected $userAgent = 'OpenAPI-Generator/1.10.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: 1.8.0' . PHP_EOL;
$report .= ' SDK Package Version: 1.10.0' . PHP_EOL;
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;

return $report;
Expand Down
1 change: 0 additions & 1 deletion generated/Model/AppIconBadgeCountUpdateRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
* AppIconBadgeCountUpdateRequest Class Doc Comment
*
* @category Class
* @description App Icon Badge Count update. Send badge 0 to clear the count.
* @package ActivitySmith\Generated
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
Expand Down
2 changes: 1 addition & 1 deletion generated/Model/LiveActivityAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ public function getUrl()
/**
* Sets url
*
* @param string $url 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.
* @param string $url 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.
*
* @return self
*/
Expand Down
2 changes: 1 addition & 1 deletion generated/Model/LiveActivityEndRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ public function getSecondaryAction()
/**
* Sets secondaryAction
*
* @param \ActivitySmith\Generated\Model\LiveActivityAction|null $secondaryAction 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.
* @param \ActivitySmith\Generated\Model\LiveActivityAction|null $secondaryAction Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
*
* @return self
*/
Expand Down
48 changes: 41 additions & 7 deletions generated/Model/LiveActivityStartRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ class LiveActivityStartRequest implements ModelInterface, ArrayAccess, \JsonSeri
'action' => '\ActivitySmith\Generated\Model\LiveActivityAction',
'secondaryAction' => '\ActivitySmith\Generated\Model\LiveActivityAction',
'alert' => '\ActivitySmith\Generated\Model\AlertPayload',
'target' => '\ActivitySmith\Generated\Model\ChannelTarget'
'target' => '\ActivitySmith\Generated\Model\ChannelTarget',
'tags' => 'string[]'
];

/**
Expand All @@ -77,7 +78,8 @@ class LiveActivityStartRequest implements ModelInterface, ArrayAccess, \JsonSeri
'action' => null,
'secondaryAction' => null,
'alert' => null,
'target' => null
'target' => null,
'tags' => null
];

/**
Expand All @@ -90,7 +92,8 @@ class LiveActivityStartRequest implements ModelInterface, ArrayAccess, \JsonSeri
'action' => false,
'secondaryAction' => false,
'alert' => false,
'target' => false
'target' => false,
'tags' => false
];

/**
Expand Down Expand Up @@ -183,7 +186,8 @@ public function isNullableSetToNull(string $property): bool
'action' => 'action',
'secondaryAction' => 'secondary_action',
'alert' => 'alert',
'target' => 'target'
'target' => 'target',
'tags' => 'tags'
];

/**
Expand All @@ -196,7 +200,8 @@ public function isNullableSetToNull(string $property): bool
'action' => 'setAction',
'secondaryAction' => 'setSecondaryAction',
'alert' => 'setAlert',
'target' => 'setTarget'
'target' => 'setTarget',
'tags' => 'setTags'
];

/**
Expand All @@ -209,7 +214,8 @@ public function isNullableSetToNull(string $property): bool
'action' => 'getAction',
'secondaryAction' => 'getSecondaryAction',
'alert' => 'getAlert',
'target' => 'getTarget'
'target' => 'getTarget',
'tags' => 'getTags'
];

/**
Expand Down Expand Up @@ -274,6 +280,7 @@ public function __construct(array $data = null)
$this->setIfExists('secondaryAction', $data ?? [], null);
$this->setIfExists('alert', $data ?? [], null);
$this->setIfExists('target', $data ?? [], null);
$this->setIfExists('tags', $data ?? [], null);
}

/**
Expand Down Expand Up @@ -388,7 +395,7 @@ public function getSecondaryAction()
/**
* Sets secondaryAction
*
* @param \ActivitySmith\Generated\Model\LiveActivityAction|null $secondaryAction 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.
* @param \ActivitySmith\Generated\Model\LiveActivityAction|null $secondaryAction Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
*
* @return self
*/
Expand Down Expand Up @@ -455,6 +462,33 @@ public function setTarget($target)

return $this;
}

/**
* Gets tags
*
* @return string[]|null
*/
public function getTags()
{
return $this->container['tags'];
}

/**
* Sets tags
*
* @param string[]|null $tags Optional tags to organize and filter notification history.
*
* @return self
*/
public function setTags($tags)
{
if (is_null($tags)) {
throw new \InvalidArgumentException('non-nullable tags cannot be null');
}
$this->container['tags'] = $tags;

return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
Expand Down
34 changes: 34 additions & 0 deletions generated/Model/LiveActivityStartResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class LiveActivityStartResponse implements ModelInterface, ArrayAccess, \JsonSer
'usersNotified' => 'int',
'activityId' => 'string',
'effectiveChannelSlugs' => 'string[]',
'tags' => 'string[]',
'timestamp' => '\DateTime'
];

Expand All @@ -79,6 +80,7 @@ class LiveActivityStartResponse implements ModelInterface, ArrayAccess, \JsonSer
'usersNotified' => null,
'activityId' => null,
'effectiveChannelSlugs' => null,
'tags' => null,
'timestamp' => 'date-time'
];

Expand All @@ -93,6 +95,7 @@ class LiveActivityStartResponse implements ModelInterface, ArrayAccess, \JsonSer
'usersNotified' => false,
'activityId' => false,
'effectiveChannelSlugs' => false,
'tags' => false,
'timestamp' => false
];

Expand Down Expand Up @@ -187,6 +190,7 @@ public function isNullableSetToNull(string $property): bool
'usersNotified' => 'users_notified',
'activityId' => 'activity_id',
'effectiveChannelSlugs' => 'effective_channel_slugs',
'tags' => 'tags',
'timestamp' => 'timestamp'
];

Expand All @@ -201,6 +205,7 @@ public function isNullableSetToNull(string $property): bool
'usersNotified' => 'setUsersNotified',
'activityId' => 'setActivityId',
'effectiveChannelSlugs' => 'setEffectiveChannelSlugs',
'tags' => 'setTags',
'timestamp' => 'setTimestamp'
];

Expand All @@ -215,6 +220,7 @@ public function isNullableSetToNull(string $property): bool
'usersNotified' => 'getUsersNotified',
'activityId' => 'getActivityId',
'effectiveChannelSlugs' => 'getEffectiveChannelSlugs',
'tags' => 'getTags',
'timestamp' => 'getTimestamp'
];

Expand Down Expand Up @@ -280,6 +286,7 @@ public function __construct(array $data = null)
$this->setIfExists('usersNotified', $data ?? [], null);
$this->setIfExists('activityId', $data ?? [], null);
$this->setIfExists('effectiveChannelSlugs', $data ?? [], null);
$this->setIfExists('tags', $data ?? [], null);
$this->setIfExists('timestamp', $data ?? [], null);
}

Expand Down Expand Up @@ -469,6 +476,33 @@ public function setEffectiveChannelSlugs($effectiveChannelSlugs)
return $this;
}

/**
* Gets tags
*
* @return string[]|null
*/
public function getTags()
{
return $this->container['tags'];
}

/**
* Sets tags
*
* @param string[]|null $tags Optional tags to organize and filter notification history.
*
* @return self
*/
public function setTags($tags)
{
if (is_null($tags)) {
throw new \InvalidArgumentException('non-nullable tags cannot be null');
}
$this->container['tags'] = $tags;

return $this;
}

/**
* Gets timestamp
*
Expand Down
2 changes: 1 addition & 1 deletion generated/Model/LiveActivityStreamDeleteRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ public function getSecondaryAction()
/**
* Sets secondaryAction
*
* @param \ActivitySmith\Generated\Model\LiveActivityAction|null $secondaryAction 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.
* @param \ActivitySmith\Generated\Model\LiveActivityAction|null $secondaryAction Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
*
* @return self
*/
Expand Down
Loading