migrate therinaldos.com data
Build & Deploy to DigitalOcean Space / build (push) Failing after 2m38s

This commit is contained in:
2024-05-05 15:50:45 -04:00
commit ef1ff240d4
23182 changed files with 3801898 additions and 0 deletions
@@ -0,0 +1,38 @@
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2019 Joas Schilling <coding@schilljs.com>
*
* @author Joas Schilling <coding@schilljs.com>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OCP\Notification;
/**
* @since 17.0.0
*/
class AlreadyProcessedException extends \RuntimeException {
/**
* @since 17.0.0
*/
public function __construct() {
parent::__construct('Notification is processed already');
}
}
@@ -0,0 +1,128 @@
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
* @author Joas Schilling <coding@schilljs.com>
*
* @license AGPL-3.0
*
* This code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License, version 3,
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
namespace OCP\Notification;
/**
* Interface IAction
*
* @since 9.0.0
*/
interface IAction {
/**
* @since 17.0.0
*/
public const TYPE_GET = 'GET';
/**
* @since 17.0.0
*/
public const TYPE_POST = 'POST';
/**
* @since 17.0.0
*/
public const TYPE_PUT = 'PUT';
/**
* @since 17.0.0
*/
public const TYPE_DELETE = 'DELETE';
/**
* @since 17.0.0
*/
public const TYPE_WEB = 'WEB';
/**
* @param string $label
* @return $this
* @throws \InvalidArgumentException if the label is invalid
* @since 9.0.0
*/
public function setLabel(string $label): IAction;
/**
* @return string
* @since 9.0.0
*/
public function getLabel(): string;
/**
* @param string $label
* @return $this
* @throws \InvalidArgumentException if the label is invalid
* @since 9.0.0
*/
public function setParsedLabel(string $label): IAction;
/**
* @return string
* @since 9.0.0
*/
public function getParsedLabel(): string;
/**
* @param bool $primary
* @return $this
* @throws \InvalidArgumentException if $primary is invalid
* @since 9.0.0
*/
public function setPrimary(bool $primary): IAction;
/**
* @return bool
* @since 9.0.0
*/
public function isPrimary(): bool;
/**
* @param string $link
* @param string $requestType
* @return $this
* @throws \InvalidArgumentException if the link is invalid
* @since 9.0.0
*/
public function setLink(string $link, string $requestType): IAction;
/**
* @return string
* @since 9.0.0
*/
public function getLink(): string;
/**
* @return string
* @since 9.0.0
*/
public function getRequestType(): string;
/**
* @return bool
* @since 9.0.0
*/
public function isValid(): bool;
/**
* @return bool
* @since 9.0.0
*/
public function isValidParsed(): bool;
}
@@ -0,0 +1,52 @@
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
* @author Joas Schilling <coding@schilljs.com>
*
* @license AGPL-3.0
*
* This code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License, version 3,
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
namespace OCP\Notification;
/**
* Interface IApp
*
* @since 9.0.0
*/
interface IApp {
/**
* @param INotification $notification
* @throws \InvalidArgumentException When the notification is not valid
* @since 9.0.0
*/
public function notify(INotification $notification): void;
/**
* @param INotification $notification
* @since 9.0.0
*/
public function markProcessed(INotification $notification): void;
/**
* @param INotification $notification
* @return int
* @since 9.0.0
*/
public function getCount(INotification $notification): int;
}
@@ -0,0 +1,47 @@
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2020, Joas Schilling <coding@schilljs.com>
*
* @author Joas Schilling <coding@schilljs.com>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OCP\Notification;
/**
* Interface IDeferrableApp
*
* @since 20.0.0
*/
interface IDeferrableApp extends IApp {
/**
* Start deferring notifications until `flush()` is called
*
* @since 20.0.0
*/
public function defer(): void;
/**
* Send all deferred notifications that have been stored since `defer()` was called
*
* @since 20.0.0
*/
public function flush(): void;
}
@@ -0,0 +1,45 @@
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl>
*
* @author Roeland Jago Douma <roeland@famdouma.nl>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OCP\Notification;
/**
* Interface INotifier classes should implement if they want to process notifications
* that are dismissed by the user.
*
* This can be useful if dismissing the notification will leave it in an incomplete
* state. The handler can chose to for example do some default action.
*
* @since 18.0.0
*/
interface IDismissableNotifier extends INotifier {
/**
* @param INotification $notification
* @throws \InvalidArgumentException In case the handler can't handle the notification
*
* @since 18.0.0
*/
public function dismissNotification(INotification $notification): void;
}
@@ -0,0 +1,121 @@
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
* @author Joas Schilling <coding@schilljs.com>
* @author Roeland Jago Douma <roeland@famdouma.nl>
*
* @license AGPL-3.0
*
* This code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License, version 3,
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
namespace OCP\Notification;
/**
* Interface IManager
*
* @since 9.0.0
*/
interface IManager extends IApp, INotifier {
/**
* @param string $appClass The service must implement IApp, otherwise a
* \InvalidArgumentException is thrown later
* @since 17.0.0
*/
public function registerApp(string $appClass): void;
/**
* @param \Closure $service The service must implement INotifier, otherwise a
* \InvalidArgumentException is thrown later
* @param \Closure $info An array with the keys 'id' and 'name' containing
* the app id and the app name
* @deprecated 17.0.0 use registerNotifierService instead.
* @since 8.2.0 - Parameter $info was added in 9.0.0
*/
public function registerNotifier(\Closure $service, \Closure $info);
/**
* @param string $notifierService The service must implement INotifier, otherwise a
* \InvalidArgumentException is thrown later
* @since 17.0.0
* @deprecated 22.0.0 use the IBootStrap registration context
*/
public function registerNotifierService(string $notifierService): void;
/**
* @return INotifier[]
* @since 9.0.0
*/
public function getNotifiers(): array;
/**
* @return INotification
* @since 9.0.0
*/
public function createNotification(): INotification;
/**
* @return bool
* @since 9.0.0
*/
public function hasNotifiers(): bool;
/**
* @param bool $preparingPushNotification
* @since 14.0.0
*/
public function setPreparingPushNotification(bool $preparingPushNotification): void;
/**
* @return bool
* @since 14.0.0
*/
public function isPreparingPushNotification(): bool;
/**
* @since 18.0.0
*/
public function dismissNotification(INotification $notification): void;
/**
* Start deferring notifications until `flush()` is called
*
* The calling app should only "flush" when it got returned true on the defer call,
* otherwise another app is deferring the sending already.
* @return bool
* @since 20.0.0
*/
public function defer(): bool;
/**
* Send all deferred notifications that have been stored since `defer()` was called
*
* @since 20.0.0
*/
public function flush(): void;
/**
* Whether the server can use the hosted push notification service
*
* We want to keep offering our push notification service for free, but large
* users overload our infrastructure. For this reason we have to rate-limit the
* use of push notifications. If you need this feature, consider using Nextcloud Enterprise.
*
* @since 23.0.0
*/
public function isFairUseOfFreePushService(): bool;
}
@@ -0,0 +1,316 @@
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
* @author Joas Schilling <coding@schilljs.com>
* @author Roeland Jago Douma <roeland@famdouma.nl>
*
* @license AGPL-3.0
*
* This code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License, version 3,
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
namespace OCP\Notification;
/**
* Interface INotification
*
* @since 9.0.0
*/
interface INotification {
/**
* @param string $app
* @return $this
* @throws \InvalidArgumentException if the app id is invalid
* @since 9.0.0
*/
public function setApp(string $app): INotification;
/**
* @return string
* @since 9.0.0
*/
public function getApp(): string;
/**
* @param string $user
* @return $this
* @throws \InvalidArgumentException if the user id is invalid
* @since 9.0.0
*/
public function setUser(string $user): INotification;
/**
* @return string
* @since 9.0.0
*/
public function getUser(): string;
/**
* @param \DateTime $dateTime
* @return $this
* @throws \InvalidArgumentException if the $dateTime is invalid
* @since 9.0.0
*/
public function setDateTime(\DateTime $dateTime): INotification;
/**
* @return \DateTime
* @since 9.0.0
*/
public function getDateTime(): \DateTime;
/**
* @param string $type
* @param string $id
* @return $this
* @throws \InvalidArgumentException if the object type or id is invalid
* @since 9.0.0
*/
public function setObject(string $type, string $id): INotification;
/**
* @return string
* @since 9.0.0
*/
public function getObjectType(): string;
/**
* @return string
* @since 9.0.0
*/
public function getObjectId(): string;
/**
* @param string $subject
* @param array $parameters
* @return $this
* @throws \InvalidArgumentException if the subject or parameters are invalid
* @since 9.0.0
*/
public function setSubject(string $subject, array $parameters = []): INotification;
/**
* @return string
* @since 9.0.0
*/
public function getSubject(): string;
/**
* @return array
* @since 9.0.0
*/
public function getSubjectParameters(): array;
/**
* Set a parsed subject
*
* HTML is not allowed in the parsed subject and will be escaped
* automatically by the clients. You can use the RichObjectString system
* provided by the Nextcloud server to highlight important parameters via
* the setRichSubject method.
*
* See https://github.com/nextcloud/server/issues/1706 for more information.
*
* @param string $subject
* @return $this
* @throws \InvalidArgumentException if the subject is invalid
* @since 9.0.0
*/
public function setParsedSubject(string $subject): INotification;
/**
* @return string
* @since 9.0.0
*/
public function getParsedSubject(): string;
/**
* Set a RichObjectString subject
*
* HTML is not allowed in the rich subject and will be escaped automatically
* by the clients, but you can use the RichObjectString system provided by
* the Nextcloud server to highlight important parameters.
*
* See https://github.com/nextcloud/server/issues/1706 for more information.
*
* @param string $subject
* @param array $parameters
* @return $this
* @throws \InvalidArgumentException if the subject or parameters are invalid
* @since 11.0.0
*/
public function setRichSubject(string $subject, array $parameters = []): INotification;
/**
* @return string
* @since 11.0.0
*/
public function getRichSubject(): string;
/**
* @return array[]
* @since 11.0.0
*/
public function getRichSubjectParameters(): array;
/**
* @param string $message
* @param array $parameters
* @return $this
* @throws \InvalidArgumentException if the message or parameters are invalid
* @since 9.0.0
*/
public function setMessage(string $message, array $parameters = []): INotification;
/**
* @return string
* @since 9.0.0
*/
public function getMessage(): string;
/**
* @return array
* @since 9.0.0
*/
public function getMessageParameters(): array;
/**
* Set a parsed message
*
* HTML is not allowed in the parsed message and will be escaped
* automatically by the clients. You can use the RichObjectString system
* provided by the Nextcloud server to highlight important parameters via
* the setRichMessage method.
*
* See https://github.com/nextcloud/server/issues/1706 for more information.
*
* @param string $message
* @return $this
* @throws \InvalidArgumentException if the message is invalid
* @since 9.0.0
*/
public function setParsedMessage(string $message): INotification;
/**
* @return string
* @since 9.0.0
*/
public function getParsedMessage(): string;
/**
* Set a RichObjectString message
*
* HTML is not allowed in the rich message and will be escaped automatically
* by the clients, but you can use the RichObjectString system provided by
* the Nextcloud server to highlight important parameters.
*
* See https://github.com/nextcloud/server/issues/1706 for more information.
*
* @param string $message
* @param array $parameters
* @return $this
* @throws \InvalidArgumentException if the message or parameters are invalid
* @since 11.0.0
*/
public function setRichMessage(string $message, array $parameters = []): INotification;
/**
* @return string
* @since 11.0.0
*/
public function getRichMessage(): string;
/**
* @return array[]
* @since 11.0.0
*/
public function getRichMessageParameters(): array;
/**
* @param string $link
* @return $this
* @throws \InvalidArgumentException if the link is invalid
* @since 9.0.0
*/
public function setLink(string $link): INotification;
/**
* @return string
* @since 9.0.0
*/
public function getLink(): string;
/**
* @param string $icon
* @return $this
* @throws \InvalidArgumentException if the icon is invalid
* @since 11.0.0
*/
public function setIcon(string $icon): INotification;
/**
* @return string
* @since 11.0.0
*/
public function getIcon(): string;
/**
* @return IAction
* @since 9.0.0
*/
public function createAction(): IAction;
/**
* @param IAction $action
* @return $this
* @throws \InvalidArgumentException if the action is invalid
* @since 9.0.0
*/
public function addAction(IAction $action): INotification;
/**
* @return IAction[]
* @since 9.0.0
*/
public function getActions(): array;
/**
* @param IAction $action
* @return $this
* @throws \InvalidArgumentException if the action is invalid
* @since 9.0.0
*/
public function addParsedAction(IAction $action): INotification;
/**
* @return IAction[]
* @since 9.0.0
*/
public function getParsedActions(): array;
/**
* @return bool
* @since 9.0.0
*/
public function isValid(): bool;
/**
* @return bool
* @since 9.0.0
*/
public function isValidParsed(): bool;
}
@@ -0,0 +1,58 @@
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
* @author Joas Schilling <coding@schilljs.com>
*
* @license AGPL-3.0
*
* This code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License, version 3,
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
namespace OCP\Notification;
/**
* Interface INotifier
*
* @since 9.0.0
*/
interface INotifier {
/**
* Identifier of the notifier, only use [a-z0-9_]
*
* @return string
* @since 17.0.0
*/
public function getID(): string;
/**
* Human readable name describing the notifier
*
* @return string
* @since 17.0.0
*/
public function getName(): string;
/**
* @param INotification $notification
* @param string $languageCode The code of the language that should be used to prepare the notification
* @return INotification
* @throws \InvalidArgumentException When the notification was not prepared by a notifier
* @throws AlreadyProcessedException When the notification is not needed anymore and should be deleted
* @since 9.0.0
*/
public function prepare(INotification $notification, string $languageCode): INotification;
}