feat: Add Public APIs for API Channel (#2375)
This commit is contained in:
@@ -2,11 +2,19 @@
|
||||
#
|
||||
# Table name: channel_api
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# webhook_url :string
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# account_id :integer not null
|
||||
# id :bigint not null, primary key
|
||||
# hmac_mandatory :boolean default(FALSE)
|
||||
# hmac_token :string
|
||||
# identifier :string
|
||||
# webhook_url :string
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# account_id :integer not null
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
# index_channel_api_on_hmac_token (hmac_token) UNIQUE
|
||||
# index_channel_api_on_identifier (identifier) UNIQUE
|
||||
#
|
||||
|
||||
class Channel::Api < ApplicationRecord
|
||||
@@ -15,6 +23,9 @@ class Channel::Api < ApplicationRecord
|
||||
validates :account_id, presence: true
|
||||
belongs_to :account
|
||||
|
||||
has_secure_token :identifier
|
||||
has_secure_token :hmac_token
|
||||
|
||||
has_one :inbox, as: :channel, dependent: :destroy
|
||||
|
||||
def name
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# feature_flags :integer default(3), not null
|
||||
# hmac_mandatory :boolean default(FALSE)
|
||||
# hmac_token :string
|
||||
# pre_chat_form_enabled :boolean default(FALSE)
|
||||
# pre_chat_form_options :jsonb
|
||||
|
||||
Reference in New Issue
Block a user