Documents the existing API inbox webhook_url request field and expands inbox create/update request docs with channel-specific schemas and examples. Closes #14591 ## Why API inboxes already accept channel.webhook_url through Channel::Api editable attributes, but the OpenAPI request schemas did not document the field. The previous mixed channel object also made it hard to see which fields belong to each supported channel type. ## What changed - Added named channel payload schemas for supported inbox create channel types. - Added channel-specific create request samples in this order: Website inbox, API channel, Email channel, LINE channel, Telegram channel, WhatsApp channel, SMS channel. - Added common inbox fields such as greeting_enabled, greeting_message, enable_auto_assignment, working_hours_enabled, and timezone to request samples. - Kept website-only flags such as allow_messages_after_resolved and enable_email_collect only in website inbox samples. - Annotated inbox request field descriptions with channel availability where Swagger UI cannot dynamically filter fields. - Added channel-specific update settings schemas and request samples for editable channel attributes. - Documented channel.webhook_url for API inbox create/update payloads. - Rebuilt generated Swagger JSON and tag-group specs. ## Screenshots **Website inbox request sample** Shows the request sample selector set to Website inbox, including website-only fields such as enable_email_collect and allow_messages_after_resolved. <img width="3840" height="2160" alt="Website inbox request sample" src="https://github.com/user-attachments/assets/ad130f04-b336-4cc3-aba1-e934b646d447" /> **API channel request sample** Shows the selector switched to API channel, with API-specific fields such as webhook_url, hmac_mandatory, and additional_attributes. <img width="3840" height="2160" alt="API channel request sample" src="https://github.com/user-attachments/assets/09484816-1d47-490f-9ab4-195835ed5cd3" /> **Expanded channel schema** Shows the request-body schema with channel expanded, including the type selector and channel-specific fields under it. <img width="3840" height="2160" alt="Expanded channel schema" src="https://github.com/user-attachments/assets/f6c4878e-ac34-40fe-8be3-5913f27cbdd8" /> ## Validation - bundle exec rake swagger:build - bundle exec rspec spec/swagger/openapi_spec.rb - Rendered the local Swagger page and verified the request sample dropdown order and API channel payload. --------- Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
91 lines
2.1 KiB
YAML
91 lines
2.1 KiB
YAML
type: object
|
|
title: Email channel
|
|
required:
|
|
- type
|
|
- email
|
|
properties:
|
|
type:
|
|
type: string
|
|
enum: ['email']
|
|
example: email
|
|
email:
|
|
type: string
|
|
description: Email address for the inbox
|
|
example: support@example.com
|
|
imap_enabled:
|
|
type: boolean
|
|
description: Enable IMAP for inbound emails
|
|
example: true
|
|
imap_login:
|
|
type: string
|
|
description: IMAP login username
|
|
example: support@example.com
|
|
imap_password:
|
|
type: string
|
|
description: IMAP login password
|
|
example: your-imap-password
|
|
imap_address:
|
|
type: string
|
|
description: IMAP server address
|
|
example: imap.example.com
|
|
imap_port:
|
|
type: integer
|
|
description: IMAP server port
|
|
example: 993
|
|
imap_enable_ssl:
|
|
type: boolean
|
|
description: Enable SSL for IMAP
|
|
example: true
|
|
imap_authentication:
|
|
type: string
|
|
description: IMAP authentication method
|
|
example: plain
|
|
smtp_enabled:
|
|
type: boolean
|
|
description: Enable SMTP for outbound emails
|
|
example: true
|
|
smtp_login:
|
|
type: string
|
|
description: SMTP login username
|
|
example: support@example.com
|
|
smtp_password:
|
|
type: string
|
|
description: SMTP login password
|
|
example: your-smtp-password
|
|
smtp_address:
|
|
type: string
|
|
description: SMTP server address
|
|
example: smtp.example.com
|
|
smtp_port:
|
|
type: integer
|
|
description: SMTP server port
|
|
example: 587
|
|
smtp_domain:
|
|
type: string
|
|
description: SMTP HELO domain
|
|
example: example.com
|
|
smtp_enable_starttls_auto:
|
|
type: boolean
|
|
description: Automatically enable STARTTLS for SMTP
|
|
example: true
|
|
smtp_enable_ssl_tls:
|
|
type: boolean
|
|
description: Enable SSL/TLS for SMTP
|
|
example: false
|
|
smtp_openssl_verify_mode:
|
|
type: string
|
|
description: OpenSSL certificate verification mode for SMTP
|
|
example: none
|
|
smtp_authentication:
|
|
type: string
|
|
description: SMTP authentication method
|
|
example: login
|
|
provider:
|
|
type: string
|
|
description: Email provider
|
|
example: google
|
|
verified_for_sending:
|
|
type: boolean
|
|
description: Whether the inbox is verified for sending emails
|
|
example: false
|