Download the PHP package fomvasss/laravel-notification-channel-gronosync without Composer

On this page you can find all versions of the php package fomvasss/laravel-notification-channel-gronosync. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-notification-channel-gronosync

GronoSync Notification Channel для Laravel

Latest Version on Packagist

Українська · English

Надсилайте Laravel-нотифікації через GronoSync — мультиканальну платформу обміну повідомленнями з підтримкою Telegram, WhatsApp, Instagram, Facebook, Viber, SMS, email та вбудованого чат-віджету.

Сайт · Кабінет клієнта · API: https://api.gronosync.com

Документація

Цей README — про Laravel-пакет. Усе про сам сервіс GronoSync — на docs.gronosync.com:

Зміст

Встановлення

Налаштування

Додайте до .env:

Додайте до config/services.php:

token — ключ API організації: кабінет GronoSync → Налаштування → Розширення → API. Показується лише раз, при створенні. Див. Ключі API.

Надсилання сповіщень

Маршрутизація

Поверніть контакт із notifiable-моделі — UUID у GronoSync або ваш ID, якщо синхронізуєте контакти через upsertContact() з external_id:

Якщо визначено обидва, спершу береться routeNotificationForGronosync(), а external ID — лише коли той повертає порожнє значення. Без моделі: Notification::route('GronosyncExternalId', 'crm-42')->notify(...).

Або вкажіть контакт у повідомленні — рівно одним із contactId(), contactExternalId(), to():

Що означає to для кожного типу каналу і коли потрібен channelId() — Повідомлення.

Методи GronosyncMessage

Метод Опис
contactId(string $id) UUID контакту в GronoSync
contactExternalId(string $id) ID контакту у вашій системі — external_id, переданий в upsertContact()
to(string $identifier) Ідентифікатор контакту в каналі — для контактів, яких ще немає
channelId(string $id) UUID каналу в GronoSync (обов'язковий з to())
text(string $text) Текст повідомлення
attachment(string $url, ?string $filename, string $type) Додати файл. Типи: image, audio, video, document
attachments(array $items, string $type) Додати кілька файлів
button(string $title, string $urlOrCallback, string $type) Додати кнопку. Типи: web_url, callback
buttons(array $items) Додати кілька кнопок
parseMode(string $mode) Поки не діє: у Telegram текст завжди йде як HTML (Повідомлення)
previewUrl(bool $val) Поки не діє: на прев'ю посилань не впливає
replyToId(string $id) Повідомлення, на яке це відповідь
forwardedFromId(string $id) Переслане повідомлення
metadata(array $metadata) Ваші дані (до 4 КБ) — повертаються в data.metadata вебхука chat.message.sent
memberExternalId(string $externalId) Хто з людей написав у вашій системі — External ID учасника організації: автор повідомлення в кабінеті (ім'я, аватар)

Виклик API напряму

GronosyncApi — тонкий клієнт Extern API, повертає розібрану відповідь.

Метод Ендпоінт
sendMessage(GronosyncMessage $message) POST /message
upsertContact(array $data) POST /contacts
getContact(string $id) / getContactByExternalId(string $externalId) GET /contacts/{id} — повертає data
getChannels() GET /channels — повертає data
submitForm(array $data, ?string $idempotencyKey = null) POST /form, ключ іде заголовком Idempotency-Key
sendIncoming(array $data, ?string $idempotencyKey = null) POST /incoming — повідомлення від клієнта з вашої системи (тікети, чат), ключ іде заголовком Idempotency-Key. message.text — простим текстом, без HTML: перенос рядка — \n, посилання — повною адресою

Невідомі ключі в upsertContact() / submitForm() / sendIncoming() відкидаються перед відправкою.

Помилки

Збої повертаються як CouldNotSendNotification:

Метод Повертає
getStatusCode() HTTP-статус, null при мережевій помилці / таймауті
getErrorCode() Машинний code (напр. chat_blocked) або null
getResponse() Розібране JSON-тіло відповіді з помилкою або null

Орієнтуйтесь на статус і code, а не на текст. Усі коди й що з ними робити — Помилки й коди.

Отримання вебхуків

GronoSync може сповіщати ваш застосунок про нові контакти, вхідні й вихідні повідомлення та чати, яким потрібен менеджер. Налаштування, події, payload і приклад контролера для Laravel — Вебхуки і Laravel.

Тестування

Безпека

Якщо ви виявили проблему безпеки, надішліть листа на [email protected] замість використання трекеру задач.

Участь у розробці

Деталі: CONTRIBUTING.md.

Автори

Ліцензія

MIT License. Детальніше: LICENSE.md.


All versions of laravel-notification-channel-gronosync with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
guzzlehttp/guzzle Version ^7.0|^8.0
illuminate/notifications Version ^10|^11|^12|^13
illuminate/support Version ^10|^11|^12|^13
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package fomvasss/laravel-notification-channel-gronosync contains the following files

Loading the files please wait ...