Skip to content
Closed
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
19 changes: 2 additions & 17 deletions generated/Model/LiveActivityAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -312,15 +312,6 @@ public function listInvalidProperties()
if ($this->container['url'] === null) {
$invalidProperties[] = "'url' can't be null";
}
if ($this->container['url'] !== null) {
$actionType = $this->container['type'];
if ($actionType === LiveActivityActionType::OPEN_URL && !preg_match('/^(https|shortcuts):\/\//', (string) $this->container['url'])) {
$invalidProperties[] = "invalid value for 'url', open_url must use https or shortcuts.";
}
if ($actionType === LiveActivityActionType::WEBHOOK && !preg_match('/^https:\/\//', (string) $this->container['url'])) {
$invalidProperties[] = "invalid value for 'url', webhook must use https.";
}
}
return $invalidProperties;
}

Expand Down Expand Up @@ -403,7 +394,7 @@ public function getUrl()
/**
* Sets url
*
* @param string $url Action URL. For open_url, use an HTTPS or shortcuts:// URL. For webhook, use an HTTPS URL called by the ActivitySmith backend.
* @param string $url Action URL. For open_url, use an HTTPS URL or a shortcuts:// URL that runs an Apple Shortcut. For webhook, use an HTTPS URL called by the ActivitySmith backend.
*
* @return self
*/
Expand All @@ -412,13 +403,6 @@ public function setUrl($url)
if (is_null($url)) {
throw new \InvalidArgumentException('non-nullable url cannot be null');
}
$actionType = $this->container['type'] ?? null;
if ($actionType === LiveActivityActionType::OPEN_URL && !preg_match('/^(https|shortcuts):\/\//', (string) $url)) {
throw new \InvalidArgumentException("invalid value for \$url when calling LiveActivityAction., open_url must use https or shortcuts.");
}
if ($actionType === LiveActivityActionType::WEBHOOK && !preg_match('/^https:\/\//', (string) $url)) {
throw new \InvalidArgumentException("invalid value for \$url when calling LiveActivityAction., webhook must use https.");
}
$this->container['url'] = $url;

return $this;
Expand Down Expand Up @@ -568,3 +552,4 @@ public function toHeaderValue()
}
}


19 changes: 2 additions & 17 deletions generated/Model/PushNotificationAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -311,15 +311,6 @@ public function listInvalidProperties()
if ($this->container['url'] === null) {
$invalidProperties[] = "'url' can't be null";
}
if ($this->container['url'] !== null) {
$actionType = $this->container['type'];
if ($actionType === PushNotificationActionType::OPEN_URL && !preg_match('/^(https|shortcuts):\/\//', (string) $this->container['url'])) {
$invalidProperties[] = "invalid value for 'url', open_url must use https or shortcuts.";
}
if ($actionType === PushNotificationActionType::WEBHOOK && !preg_match('/^https:\/\//', (string) $this->container['url'])) {
$invalidProperties[] = "invalid value for 'url', webhook must use https.";
}
}
return $invalidProperties;
}

Expand Down Expand Up @@ -402,7 +393,7 @@ public function getUrl()
/**
* Sets url
*
* @param string $url Action URL. For open_url, use an HTTPS or shortcuts:// URL. For webhook, use an HTTPS URL called by the ActivitySmith backend.
* @param string $url Action URL. For open_url, use an HTTPS URL or a shortcuts:// URL that runs an Apple Shortcut. For webhook, use an HTTPS URL called by the ActivitySmith backend.
*
* @return self
*/
Expand All @@ -411,13 +402,6 @@ public function setUrl($url)
if (is_null($url)) {
throw new \InvalidArgumentException('non-nullable url cannot be null');
}
$actionType = $this->container['type'] ?? null;
if ($actionType === PushNotificationActionType::OPEN_URL && !preg_match('/^(https|shortcuts):\/\//', (string) $url)) {
throw new \InvalidArgumentException("invalid value for \$url when calling PushNotificationAction., open_url must use https or shortcuts.");
}
if ($actionType === PushNotificationActionType::WEBHOOK && !preg_match('/^https:\/\//', (string) $url)) {
throw new \InvalidArgumentException("invalid value for \$url when calling PushNotificationAction., webhook must use https.");
}
$this->container['url'] = $url;

return $this;
Expand Down Expand Up @@ -567,3 +551,4 @@ public function toHeaderValue()
}
}


2 changes: 1 addition & 1 deletion generated/Model/PushNotificationRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ public function getRedirection()
/**
* Sets redirection
*
* @param string|null $redirection Optional HTTPS or shortcuts:// URL opened when user taps the notification body. Overrides the default tap target from `media` when both are provided.
* @param string|null $redirection Optional HTTPS URL or shortcuts:// URL opened when the user taps the notification body. Use shortcuts:// to run an Apple Shortcut. Overrides the default tap target from `media` when both are provided.
*
* @return self
*/
Expand Down
Loading