Merge branch 'develop' into feat/github-integration
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
|||||||
3.13.0
|
4.4.0
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
3.2.0
|
3.4.0
|
||||||
|
|||||||
@@ -119,7 +119,13 @@ const handleSeeOriginal = () => {
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
v-if="isExpandable && !isExpanded"
|
v-if="isExpandable && !isExpanded"
|
||||||
class="absolute left-0 right-0 bottom-0 h-40 px-8 flex items-end bg-gradient-to-t from-n-slate-4 via-n-slate-4 via-20% to-transparent"
|
class="absolute left-0 right-0 bottom-0 h-40 px-8 flex items-end"
|
||||||
|
:class="{
|
||||||
|
'bg-gradient-to-t from-n-slate-4 via-n-slate-4 via-20% to-transparent':
|
||||||
|
isIncoming,
|
||||||
|
'bg-gradient-to-t from-n-solid-blue via-n-solid-blue via-20% to-transparent':
|
||||||
|
isOutgoing,
|
||||||
|
}"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="text-n-slate-12 py-2 px-8 mx-auto text-center flex items-center gap-2"
|
class="text-n-slate-12 py-2 px-8 mx-auto text-center flex items-center gap-2"
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ export default {
|
|||||||
return [
|
return [
|
||||||
'billing_settings_index',
|
'billing_settings_index',
|
||||||
'settings_inbox_list',
|
'settings_inbox_list',
|
||||||
|
'general_settings_index',
|
||||||
'agent_list',
|
'agent_list',
|
||||||
].includes(this.$route.name);
|
].includes(this.$route.name);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Chatwoot Web Server
|
||||||
|
Wants=chatwoot-web.1.service
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Chatwoot Background Worker
|
||||||
|
Wants=chatwoot-worker.1.service
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
+236
-28
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Description: Install and manage a Chatwoot installation.
|
# Description: Install and manage a Chatwoot installation.
|
||||||
# OS: Ubuntu 20.04 LTS, 22.04 LTS, 24.04 LTS
|
# OS: Ubuntu 20.04 LTS, 22.04 LTS, 24.04 LTS
|
||||||
# Script Version: 3.2.0
|
# Script Version: 3.4.0
|
||||||
# Run this script as root
|
# Run this script as root
|
||||||
|
|
||||||
set -eu -o errexit -o pipefail -o noclobber -o nounset
|
set -eu -o errexit -o pipefail -o noclobber -o nounset
|
||||||
@@ -17,9 +17,9 @@ fi
|
|||||||
|
|
||||||
# Global variables
|
# Global variables
|
||||||
# option --output/-o requires 1 argument
|
# option --output/-o requires 1 argument
|
||||||
LONGOPTS=console,debug,help,install,Install:,logs:,restart,ssl,upgrade,webserver,version
|
LONGOPTS=console,debug,help,install,Install:,logs:,restart,ssl,upgrade,Upgrade:,webserver,version,web-only,worker-only,convert:
|
||||||
OPTIONS=cdhiI:l:rsuwv
|
OPTIONS=cdhiI:l:rsuU:wvWK
|
||||||
CWCTL_VERSION="3.2.0"
|
CWCTL_VERSION="3.3.0"
|
||||||
pg_pass=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 15 ; echo '')
|
pg_pass=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 15 ; echo '')
|
||||||
CHATWOOT_HUB_URL="https://hub.2.chatwoot.com/events"
|
CHATWOOT_HUB_URL="https://hub.2.chatwoot.com/events"
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ fi
|
|||||||
# read getopt’s output this way to handle the quoting right:
|
# read getopt’s output this way to handle the quoting right:
|
||||||
eval set -- "$PARSED"
|
eval set -- "$PARSED"
|
||||||
|
|
||||||
c=n d=n h=n i=n I=n l=n r=n s=n u=n w=n v=n BRANCH=master SERVICE=web
|
c=n d=n h=n i=n I=n l=n r=n s=n u=n U=n w=n v=n W=n K=n C=n BRANCH=master SERVICE=web DEPLOYMENT_TYPE=full CONVERT_TO=""
|
||||||
# Iterate options in order and nicely split until we see --
|
# Iterate options in order and nicely split until we see --
|
||||||
while true; do
|
while true; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
@@ -83,6 +83,12 @@ while true; do
|
|||||||
;;
|
;;
|
||||||
-u|--upgrade)
|
-u|--upgrade)
|
||||||
u=y
|
u=y
|
||||||
|
BRANCH="master"
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
-U|--Upgrade)
|
||||||
|
U=y
|
||||||
|
BRANCH="$2"
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
-w|--webserver)
|
-w|--webserver)
|
||||||
@@ -93,6 +99,36 @@ while true; do
|
|||||||
v=y
|
v=y
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
-W|--web-only)
|
||||||
|
W=y
|
||||||
|
DEPLOYMENT_TYPE=web
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-K|--worker-only)
|
||||||
|
K=y
|
||||||
|
DEPLOYMENT_TYPE=worker
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--convert)
|
||||||
|
C=y
|
||||||
|
CONVERT_TO="$2"
|
||||||
|
case "$CONVERT_TO" in
|
||||||
|
web)
|
||||||
|
DEPLOYMENT_TYPE=web
|
||||||
|
;;
|
||||||
|
worker)
|
||||||
|
DEPLOYMENT_TYPE=worker
|
||||||
|
;;
|
||||||
|
full)
|
||||||
|
DEPLOYMENT_TYPE=full
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Invalid conversion type. Use: web, worker, or full"
|
||||||
|
exit 3
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
--)
|
--)
|
||||||
shift
|
shift
|
||||||
break
|
break
|
||||||
@@ -107,7 +143,7 @@ done
|
|||||||
# log if debug flag set
|
# log if debug flag set
|
||||||
if [ "$d" == "y" ]; then
|
if [ "$d" == "y" ]; then
|
||||||
echo "console: $c, debug: $d, help: $h, install: $i, Install: $I, BRANCH: $BRANCH, \
|
echo "console: $c, debug: $d, help: $h, install: $i, Install: $I, BRANCH: $BRANCH, \
|
||||||
logs: $l, SERVICE: $SERVICE, ssl: $s, upgrade: $u, webserver: $w"
|
logs: $l, SERVICE: $SERVICE, ssl: $s, upgrade: $u, Upgrade: $U, webserver: $w, web-only: $W, worker-only: $K, convert: $C, convert-to: $CONVERT_TO, deployment-type: $DEPLOYMENT_TYPE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# exit if script is not run as root
|
# exit if script is not run as root
|
||||||
@@ -379,23 +415,98 @@ EOF
|
|||||||
##############################################################################
|
##############################################################################
|
||||||
# Setup Chatwoot systemd services and cwctl CLI
|
# Setup Chatwoot systemd services and cwctl CLI
|
||||||
# Globals:
|
# Globals:
|
||||||
# None
|
# DEPLOYMENT_TYPE
|
||||||
# Arguments:
|
# Arguments:
|
||||||
# None
|
# None
|
||||||
# Outputs:
|
# Outputs:
|
||||||
# None
|
# None
|
||||||
##############################################################################
|
##############################################################################
|
||||||
function configure_systemd_services() {
|
function configure_systemd_services() {
|
||||||
cp /home/chatwoot/chatwoot/deployment/chatwoot-web.1.service /etc/systemd/system/chatwoot-web.1.service
|
# Check if this is a conversion from existing deployment
|
||||||
cp /home/chatwoot/chatwoot/deployment/chatwoot-worker.1.service /etc/systemd/system/chatwoot-worker.1.service
|
local existing_full_deployment=false
|
||||||
cp /home/chatwoot/chatwoot/deployment/chatwoot.target /etc/systemd/system/chatwoot.target
|
if [ -f "/etc/systemd/system/chatwoot.target" ]; then
|
||||||
|
existing_full_deployment=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$DEPLOYMENT_TYPE" == "web" ]; then
|
||||||
|
echo "Setting up web-only deployment"
|
||||||
|
|
||||||
|
# Stop and disable existing services if converting
|
||||||
|
if [ "$existing_full_deployment" = true ]; then
|
||||||
|
echo "Converting from full deployment to web-only"
|
||||||
|
systemctl stop chatwoot.target || true
|
||||||
|
systemctl disable chatwoot.target || true
|
||||||
|
systemctl stop chatwoot-worker.1.service || true
|
||||||
|
systemctl disable chatwoot-worker.1.service || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Stop and disable worker target if converting from worker-only
|
||||||
|
if [ -f "/etc/systemd/system/chatwoot-worker.target" ]; then
|
||||||
|
echo "Converting from worker-only to web-only"
|
||||||
|
systemctl stop chatwoot-worker.target || true
|
||||||
|
systemctl disable chatwoot-worker.target || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
cp /home/chatwoot/chatwoot/deployment/chatwoot-web.1.service /etc/systemd/system/chatwoot-web.1.service
|
||||||
|
cp /home/chatwoot/chatwoot/deployment/chatwoot-web.target /etc/systemd/system/chatwoot-web.target
|
||||||
|
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl enable chatwoot-web.target
|
||||||
|
systemctl start chatwoot-web.target
|
||||||
|
|
||||||
|
elif [ "$DEPLOYMENT_TYPE" == "worker" ]; then
|
||||||
|
echo "Setting up worker-only deployment"
|
||||||
|
|
||||||
|
# Stop and disable existing services if converting
|
||||||
|
if [ "$existing_full_deployment" = true ]; then
|
||||||
|
echo "Converting from full deployment to worker-only"
|
||||||
|
systemctl stop chatwoot.target || true
|
||||||
|
systemctl disable chatwoot.target || true
|
||||||
|
systemctl stop chatwoot-web.1.service || true
|
||||||
|
systemctl disable chatwoot-web.1.service || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Stop and disable web target if converting from web-only
|
||||||
|
if [ -f "/etc/systemd/system/chatwoot-web.target" ]; then
|
||||||
|
echo "Converting from web-only to worker-only"
|
||||||
|
systemctl stop chatwoot-web.target || true
|
||||||
|
systemctl disable chatwoot-web.target || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
cp /home/chatwoot/chatwoot/deployment/chatwoot-worker.1.service /etc/systemd/system/chatwoot-worker.1.service
|
||||||
|
cp /home/chatwoot/chatwoot/deployment/chatwoot-worker.target /etc/systemd/system/chatwoot-worker.target
|
||||||
|
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl enable chatwoot-worker.target
|
||||||
|
systemctl start chatwoot-worker.target
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "Setting up full deployment (web + worker)"
|
||||||
|
|
||||||
|
# Stop existing specialized deployments if converting back to full
|
||||||
|
if [ -f "/etc/systemd/system/chatwoot-web.target" ]; then
|
||||||
|
echo "Converting from web-only to full deployment"
|
||||||
|
systemctl stop chatwoot-web.target || true
|
||||||
|
systemctl disable chatwoot-web.target || true
|
||||||
|
fi
|
||||||
|
if [ -f "/etc/systemd/system/chatwoot-worker.target" ]; then
|
||||||
|
echo "Converting from worker-only to full deployment"
|
||||||
|
systemctl stop chatwoot-worker.target || true
|
||||||
|
systemctl disable chatwoot-worker.target || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
cp /home/chatwoot/chatwoot/deployment/chatwoot-web.1.service /etc/systemd/system/chatwoot-web.1.service
|
||||||
|
cp /home/chatwoot/chatwoot/deployment/chatwoot-worker.1.service /etc/systemd/system/chatwoot-worker.1.service
|
||||||
|
cp /home/chatwoot/chatwoot/deployment/chatwoot.target /etc/systemd/system/chatwoot.target
|
||||||
|
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl enable chatwoot.target
|
||||||
|
systemctl start chatwoot.target
|
||||||
|
fi
|
||||||
|
|
||||||
cp /home/chatwoot/chatwoot/deployment/chatwoot /etc/sudoers.d/chatwoot
|
cp /home/chatwoot/chatwoot/deployment/chatwoot /etc/sudoers.d/chatwoot
|
||||||
cp /home/chatwoot/chatwoot/deployment/setup_20.04.sh /usr/local/bin/cwctl
|
cp /home/chatwoot/chatwoot/deployment/setup_20.04.sh /usr/local/bin/cwctl
|
||||||
chmod +x /usr/local/bin/cwctl
|
chmod +x /usr/local/bin/cwctl
|
||||||
|
|
||||||
systemctl enable chatwoot.target
|
|
||||||
systemctl start chatwoot.target
|
|
||||||
}
|
}
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
@@ -427,7 +538,15 @@ function setup_ssl() {
|
|||||||
cd chatwoot
|
cd chatwoot
|
||||||
sed -i "s/http:\/\/0.0.0.0:3000/https:\/\/$domain_name/g" .env
|
sed -i "s/http:\/\/0.0.0.0:3000/https:\/\/$domain_name/g" .env
|
||||||
EOF
|
EOF
|
||||||
systemctl restart chatwoot.target
|
|
||||||
|
# Restart the appropriate chatwoot target
|
||||||
|
if [ -f "/etc/systemd/system/chatwoot-web.target" ]; then
|
||||||
|
systemctl restart chatwoot-web.target
|
||||||
|
elif [ -f "/etc/systemd/system/chatwoot-worker.target" ]; then
|
||||||
|
systemctl restart chatwoot-worker.target
|
||||||
|
else
|
||||||
|
systemctl restart chatwoot.target
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
@@ -624,17 +743,27 @@ Usage: cwctl [OPTION]...
|
|||||||
Install and manage your Chatwoot installation.
|
Install and manage your Chatwoot installation.
|
||||||
|
|
||||||
Example: cwctl -i master
|
Example: cwctl -i master
|
||||||
|
Example: cwctl -i --web-only (for web server ASG)
|
||||||
|
Example: cwctl -i --worker-only (for worker ASG)
|
||||||
|
Example: cwctl --convert web (convert existing to web-only)
|
||||||
|
Example: cwctl --convert worker (convert existing to worker-only)
|
||||||
|
Example: cwctl --convert full (convert back to full deployment)
|
||||||
|
Example: cwctl --upgrade (upgrade to latest master)
|
||||||
|
Example: cwctl -U develop (upgrade to develop branch)
|
||||||
Example: cwctl -l web
|
Example: cwctl -l web
|
||||||
Example: cwctl --logs worker
|
Example: cwctl --logs worker
|
||||||
Example: cwctl --upgrade
|
|
||||||
Example: cwctl -c
|
Example: cwctl -c
|
||||||
|
|
||||||
Installation/Upgrade:
|
Installation/Upgrade:
|
||||||
-i, --install Install the latest stable version of Chatwoot
|
-i, --install Install the latest stable version of Chatwoot
|
||||||
-I Install Chatwoot from a git branch
|
-I BRANCH Install Chatwoot from a git branch
|
||||||
-u, --upgrade Upgrade Chatwoot to the latest stable version
|
-u, --upgrade Upgrade Chatwoot to the latest stable version
|
||||||
|
-U BRANCH Upgrade Chatwoot from a git branch (EXPERIMENTAL)
|
||||||
-s, --ssl Fetch and install SSL certificates using LetsEncrypt
|
-s, --ssl Fetch and install SSL certificates using LetsEncrypt
|
||||||
-w, --webserver Install and configure Nginx webserver with SSL
|
-w, --webserver Install and configure Nginx webserver with SSL
|
||||||
|
-W, --web-only Install only the web server (for ASG deployment)
|
||||||
|
-K, --worker-only Install only the background worker (for ASG deployment)
|
||||||
|
--convert TYPE Convert existing deployment (TYPE: web, worker, full)
|
||||||
|
|
||||||
Management:
|
Management:
|
||||||
-c, --console Open ruby console
|
-c, --console Open ruby console
|
||||||
@@ -831,7 +960,31 @@ EOF
|
|||||||
function upgrade() {
|
function upgrade() {
|
||||||
cwctl_upgrade_check
|
cwctl_upgrade_check
|
||||||
get_cw_version
|
get_cw_version
|
||||||
echo "Upgrading Chatwoot to v$CW_VERSION"
|
echo "Upgrading Chatwoot to v$CW_VERSION (branch: $BRANCH)"
|
||||||
|
|
||||||
|
# Warning for non-master branch upgrades
|
||||||
|
if [ "$BRANCH" != "master" ]; then
|
||||||
|
cat << EOF
|
||||||
|
|
||||||
|
⚠️ WARNING: Branch-specific upgrades are EXPERIMENTAL
|
||||||
|
⚠️ Switching between different versions/branches may cause:
|
||||||
|
- Database migration conflicts
|
||||||
|
- Asset compilation errors
|
||||||
|
- Configuration incompatibilities
|
||||||
|
- Data corruption or loss
|
||||||
|
|
||||||
|
⚠️ This is NOT recommended for production environments.
|
||||||
|
⚠️ Always backup your database before proceeding.
|
||||||
|
|
||||||
|
EOF
|
||||||
|
read -p "Do you understand the risks and want to continue? [y/N]: " user_input
|
||||||
|
user_input=${user_input:-N}
|
||||||
|
if [[ ! "$user_input" =~ ^([yY][eE][sS]|[yY])$ ]]; then
|
||||||
|
echo "Upgrade cancelled."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
sleep 3
|
sleep 3
|
||||||
|
|
||||||
# Check if CW_VERSION is 4.0 or above
|
# Check if CW_VERSION is 4.0 or above
|
||||||
@@ -857,8 +1010,9 @@ function upgrade() {
|
|||||||
# Navigate to the Chatwoot directory
|
# Navigate to the Chatwoot directory
|
||||||
cd chatwoot
|
cd chatwoot
|
||||||
|
|
||||||
# Pull the latest version of the master branch
|
# Pull the latest version of the specified branch
|
||||||
git checkout master && git pull
|
git fetch
|
||||||
|
git checkout "$BRANCH" && git pull
|
||||||
|
|
||||||
# Ensure the ruby version is upto date
|
# Ensure the ruby version is upto date
|
||||||
# Parse the latest ruby version
|
# Parse the latest ruby version
|
||||||
@@ -878,18 +1032,35 @@ function upgrade() {
|
|||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Copy the updated targets
|
# Copy the updated services and targets based on existing deployment
|
||||||
cp /home/chatwoot/chatwoot/deployment/chatwoot-web.1.service /etc/systemd/system/chatwoot-web.1.service
|
if [ -f "/etc/systemd/system/chatwoot-web.target" ]; then
|
||||||
cp /home/chatwoot/chatwoot/deployment/chatwoot-worker.1.service /etc/systemd/system/chatwoot-worker.1.service
|
echo "Updating web-only deployment"
|
||||||
cp /home/chatwoot/chatwoot/deployment/chatwoot.target /etc/systemd/system/chatwoot.target
|
cp /home/chatwoot/chatwoot/deployment/chatwoot-web.1.service /etc/systemd/system/chatwoot-web.1.service
|
||||||
|
cp /home/chatwoot/chatwoot/deployment/chatwoot-web.target /etc/systemd/system/chatwoot-web.target
|
||||||
|
elif [ -f "/etc/systemd/system/chatwoot-worker.target" ]; then
|
||||||
|
echo "Updating worker-only deployment"
|
||||||
|
cp /home/chatwoot/chatwoot/deployment/chatwoot-worker.1.service /etc/systemd/system/chatwoot-worker.1.service
|
||||||
|
cp /home/chatwoot/chatwoot/deployment/chatwoot-worker.target /etc/systemd/system/chatwoot-worker.target
|
||||||
|
else
|
||||||
|
echo "Updating full deployment"
|
||||||
|
cp /home/chatwoot/chatwoot/deployment/chatwoot-web.1.service /etc/systemd/system/chatwoot-web.1.service
|
||||||
|
cp /home/chatwoot/chatwoot/deployment/chatwoot-worker.1.service /etc/systemd/system/chatwoot-worker.1.service
|
||||||
|
cp /home/chatwoot/chatwoot/deployment/chatwoot.target /etc/systemd/system/chatwoot.target
|
||||||
|
fi
|
||||||
|
|
||||||
cp /home/chatwoot/chatwoot/deployment/chatwoot /etc/sudoers.d/chatwoot
|
cp /home/chatwoot/chatwoot/deployment/chatwoot /etc/sudoers.d/chatwoot
|
||||||
# TODO:(@vn) handle cwctl updates
|
# TODO:(@vn) handle cwctl updates
|
||||||
|
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
|
|
||||||
# Restart the chatwoot server
|
# Restart the appropriate chatwoot target
|
||||||
systemctl restart chatwoot.target
|
if [ -f "/etc/systemd/system/chatwoot-web.target" ]; then
|
||||||
|
systemctl restart chatwoot-web.target
|
||||||
|
elif [ -f "/etc/systemd/system/chatwoot-worker.target" ]; then
|
||||||
|
systemctl restart chatwoot-worker.target
|
||||||
|
else
|
||||||
|
systemctl restart chatwoot.target
|
||||||
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -903,8 +1074,40 @@ EOF
|
|||||||
# None
|
# None
|
||||||
##############################################################################
|
##############################################################################
|
||||||
function restart() {
|
function restart() {
|
||||||
systemctl restart chatwoot.target
|
if [ -f "/etc/systemd/system/chatwoot-web.target" ]; then
|
||||||
systemctl status chatwoot.target
|
systemctl restart chatwoot-web.target
|
||||||
|
systemctl status chatwoot-web.target
|
||||||
|
elif [ -f "/etc/systemd/system/chatwoot-worker.target" ]; then
|
||||||
|
systemctl restart chatwoot-worker.target
|
||||||
|
systemctl status chatwoot-worker.target
|
||||||
|
else
|
||||||
|
systemctl restart chatwoot.target
|
||||||
|
systemctl status chatwoot.target
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Convert existing Chatwoot deployment to different type (--convert)
|
||||||
|
# Globals:
|
||||||
|
# DEPLOYMENT_TYPE
|
||||||
|
# Arguments:
|
||||||
|
# None
|
||||||
|
# Outputs:
|
||||||
|
# None
|
||||||
|
##############################################################################
|
||||||
|
function convert_deployment() {
|
||||||
|
echo "Converting Chatwoot deployment to: $DEPLOYMENT_TYPE"
|
||||||
|
|
||||||
|
# Check if Chatwoot is installed
|
||||||
|
if [ ! -d "/home/chatwoot/chatwoot" ]; then
|
||||||
|
echo "Chatwoot installation not found. Use --install first."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Run the systemd service configuration which handles conversion logic
|
||||||
|
configure_systemd_services
|
||||||
|
|
||||||
|
echo "Deployment converted successfully to: $DEPLOYMENT_TYPE"
|
||||||
}
|
}
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
@@ -1107,7 +1310,7 @@ function main() {
|
|||||||
ssl
|
ssl
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$u" == "y" ]; then
|
if [ "$u" == "y" ] || [ "$U" == "y" ]; then
|
||||||
report_event "cwctl" "upgrade" > /dev/null 2>&1
|
report_event "cwctl" "upgrade" > /dev/null 2>&1
|
||||||
upgrade
|
upgrade
|
||||||
fi
|
fi
|
||||||
@@ -1122,6 +1325,11 @@ function main() {
|
|||||||
version
|
version
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$C" == "y" ]; then
|
||||||
|
report_event "cwctl" "convert" > /dev/null 2>&1
|
||||||
|
convert_deployment
|
||||||
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
main "$@"
|
main "$@"
|
||||||
|
|||||||
@@ -74,6 +74,8 @@ integrations_app:
|
|||||||
$ref: ./resource/integrations/app.yml
|
$ref: ./resource/integrations/app.yml
|
||||||
integrations_hook:
|
integrations_hook:
|
||||||
$ref: ./resource/integrations/hook.yml
|
$ref: ./resource/integrations/hook.yml
|
||||||
|
audit_log:
|
||||||
|
$ref: ./resource/audit_log.yml
|
||||||
|
|
||||||
## public resources
|
## public resources
|
||||||
public_contact:
|
public_contact:
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
description: Unique identifier for the audit log entry
|
||||||
|
auditable_id:
|
||||||
|
type: integer
|
||||||
|
description: The ID of the audited object
|
||||||
|
auditable_type:
|
||||||
|
type: string
|
||||||
|
description: The type of the audited object (e.g., Conversation, Contact, User)
|
||||||
|
auditable:
|
||||||
|
type: object
|
||||||
|
description: The audited object data
|
||||||
|
associated_id:
|
||||||
|
type: integer
|
||||||
|
description: The ID of the associated object (typically the account ID)
|
||||||
|
associated_type:
|
||||||
|
type: string
|
||||||
|
description: The type of the associated object
|
||||||
|
user_id:
|
||||||
|
type: integer
|
||||||
|
description: The ID of the user who performed the action
|
||||||
|
user_type:
|
||||||
|
type: string
|
||||||
|
description: The type of user who performed the action
|
||||||
|
username:
|
||||||
|
type: string
|
||||||
|
description: The email/username of the user who performed the action
|
||||||
|
action:
|
||||||
|
type: string
|
||||||
|
enum: ['create', 'update', 'destroy']
|
||||||
|
description: The action performed on the object
|
||||||
|
audited_changes:
|
||||||
|
type: object
|
||||||
|
description: JSON object containing the changes made to the audited object
|
||||||
|
version:
|
||||||
|
type: integer
|
||||||
|
description: Version number of the audit log entry
|
||||||
|
comment:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
|
description: Optional comment associated with the audit log entry
|
||||||
|
request_uuid:
|
||||||
|
type: string
|
||||||
|
description: UUID to identify the request that generated this audit log
|
||||||
|
created_at:
|
||||||
|
type: integer
|
||||||
|
description: Unix timestamp when the audit log entry was created
|
||||||
|
remote_address:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
|
description: IP address from which the action was performed
|
||||||
@@ -99,7 +99,9 @@ x-tagGroups:
|
|||||||
- name: Application
|
- name: Application
|
||||||
tags:
|
tags:
|
||||||
- Account AgentBots
|
- Account AgentBots
|
||||||
|
- Account
|
||||||
- Agents
|
- Agents
|
||||||
|
- Audit Logs
|
||||||
- Canned Responses
|
- Canned Responses
|
||||||
- Contacts
|
- Contacts
|
||||||
- Contact Labels
|
- Contact Labels
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
tags:
|
||||||
|
- Audit Logs
|
||||||
|
operationId: get-account-audit-logs
|
||||||
|
summary: List Audit Logs in Account
|
||||||
|
description: Get Details of Audit Log entries for an Account. This endpoint is only available in Enterprise editions and requires the audit_logs feature to be enabled.
|
||||||
|
security:
|
||||||
|
- userApiKey: []
|
||||||
|
parameters:
|
||||||
|
- name: page
|
||||||
|
in: query
|
||||||
|
description: Page number for pagination
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
default: 1
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: Success
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
per_page:
|
||||||
|
type: integer
|
||||||
|
description: Number of items per page
|
||||||
|
example: 15
|
||||||
|
total_entries:
|
||||||
|
type: integer
|
||||||
|
description: Total number of audit log entries
|
||||||
|
example: 150
|
||||||
|
current_page:
|
||||||
|
type: integer
|
||||||
|
description: Current page number
|
||||||
|
example: 1
|
||||||
|
audit_logs:
|
||||||
|
type: array
|
||||||
|
description: Array of audit log entries
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/audit_log'
|
||||||
|
403:
|
||||||
|
description: Access denied
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/bad_request_error'
|
||||||
|
422:
|
||||||
|
description: Feature not enabled or not available in current plan
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/bad_request_error'
|
||||||
@@ -175,6 +175,13 @@
|
|||||||
patch:
|
patch:
|
||||||
$ref: ./application/accounts/update.yml
|
$ref: ./application/accounts/update.yml
|
||||||
|
|
||||||
|
# Audit Logs
|
||||||
|
/api/v1/accounts/{account_id}/audit_logs:
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/account_id'
|
||||||
|
get:
|
||||||
|
$ref: ./application/audit_logs/index.yml
|
||||||
|
|
||||||
# AgentBots
|
# AgentBots
|
||||||
/api/v1/accounts/{account_id}/agent_bots:
|
/api/v1/accounts/{account_id}/agent_bots:
|
||||||
parameters:
|
parameters:
|
||||||
|
|||||||
@@ -1608,6 +1608,94 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/api/v1/accounts/{account_id}/audit_logs": {
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/parameters/account_id"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"get": {
|
||||||
|
"tags": [
|
||||||
|
"Audit Logs"
|
||||||
|
],
|
||||||
|
"operationId": "get-account-audit-logs",
|
||||||
|
"summary": "List Audit Logs in Account",
|
||||||
|
"description": "Get Details of Audit Log entries for an Account. This endpoint is only available in Enterprise editions and requires the audit_logs feature to be enabled.",
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"userApiKey": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "page",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Page number for pagination",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"default": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Success",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"per_page": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Number of items per page",
|
||||||
|
"example": 15
|
||||||
|
},
|
||||||
|
"total_entries": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Total number of audit log entries",
|
||||||
|
"example": 150
|
||||||
|
},
|
||||||
|
"current_page": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Current page number",
|
||||||
|
"example": 1
|
||||||
|
},
|
||||||
|
"audit_logs": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "Array of audit log entries",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/audit_log"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"403": {
|
||||||
|
"description": "Access denied",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/bad_request_error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"422": {
|
||||||
|
"description": "Feature not enabled or not available in current plan",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/bad_request_error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/api/v1/accounts/{account_id}/agent_bots": {
|
"/api/v1/accounts/{account_id}/agent_bots": {
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
@@ -9177,6 +9265,82 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"audit_log": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Unique identifier for the audit log entry"
|
||||||
|
},
|
||||||
|
"auditable_id": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "The ID of the audited object"
|
||||||
|
},
|
||||||
|
"auditable_type": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The type of the audited object (e.g., Conversation, Contact, User)"
|
||||||
|
},
|
||||||
|
"auditable": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "The audited object data"
|
||||||
|
},
|
||||||
|
"associated_id": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "The ID of the associated object (typically the account ID)"
|
||||||
|
},
|
||||||
|
"associated_type": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The type of the associated object"
|
||||||
|
},
|
||||||
|
"user_id": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "The ID of the user who performed the action"
|
||||||
|
},
|
||||||
|
"user_type": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The type of user who performed the action"
|
||||||
|
},
|
||||||
|
"username": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The email/username of the user who performed the action"
|
||||||
|
},
|
||||||
|
"action": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"create",
|
||||||
|
"update",
|
||||||
|
"destroy"
|
||||||
|
],
|
||||||
|
"description": "The action performed on the object"
|
||||||
|
},
|
||||||
|
"audited_changes": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "JSON object containing the changes made to the audited object"
|
||||||
|
},
|
||||||
|
"version": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Version number of the audit log entry"
|
||||||
|
},
|
||||||
|
"comment": {
|
||||||
|
"type": "string",
|
||||||
|
"nullable": true,
|
||||||
|
"description": "Optional comment associated with the audit log entry"
|
||||||
|
},
|
||||||
|
"request_uuid": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "UUID to identify the request that generated this audit log"
|
||||||
|
},
|
||||||
|
"created_at": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Unix timestamp when the audit log entry was created"
|
||||||
|
},
|
||||||
|
"remote_address": {
|
||||||
|
"type": "string",
|
||||||
|
"nullable": true,
|
||||||
|
"description": "IP address from which the action was performed"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"public_contact": {
|
"public_contact": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@@ -12148,7 +12312,9 @@
|
|||||||
"name": "Application",
|
"name": "Application",
|
||||||
"tags": [
|
"tags": [
|
||||||
"Account AgentBots",
|
"Account AgentBots",
|
||||||
|
"Account",
|
||||||
"Agents",
|
"Agents",
|
||||||
|
"Audit Logs",
|
||||||
"Canned Responses",
|
"Canned Responses",
|
||||||
"Contacts",
|
"Contacts",
|
||||||
"Contact Labels",
|
"Contact Labels",
|
||||||
|
|||||||
@@ -19,6 +19,226 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"paths": {
|
"paths": {
|
||||||
|
"/api/v1/accounts/{id}": {
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/parameters/account_id"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"get": {
|
||||||
|
"tags": [
|
||||||
|
"Account"
|
||||||
|
],
|
||||||
|
"operationId": "get-account-details",
|
||||||
|
"summary": "Get account details",
|
||||||
|
"description": "Get the details of the current account",
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"userApiKey": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/parameters/account_id"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Success",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/account_show_response"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"description": "Unauthorized",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/bad_request_error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"description": "Account not found",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/bad_request_error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"patch": {
|
||||||
|
"tags": [
|
||||||
|
"Account"
|
||||||
|
],
|
||||||
|
"operationId": "update-account",
|
||||||
|
"summary": "Update account",
|
||||||
|
"description": "Update account details, settings, and custom attributes",
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"userApiKey": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/parameters/account_id"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"requestBody": {
|
||||||
|
"required": true,
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/account_update_payload"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"application/x-www-form-urlencoded": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/account_update_payload"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Success",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/account_detail"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"description": "Unauthorized (requires administrator role)",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/bad_request_error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"description": "Account not found",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/bad_request_error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"422": {
|
||||||
|
"description": "Validation error",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/bad_request_error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/api/v1/accounts/{account_id}/audit_logs": {
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/parameters/account_id"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"get": {
|
||||||
|
"tags": [
|
||||||
|
"Audit Logs"
|
||||||
|
],
|
||||||
|
"operationId": "get-account-audit-logs",
|
||||||
|
"summary": "List Audit Logs in Account",
|
||||||
|
"description": "Get Details of Audit Log entries for an Account. This endpoint is only available in Enterprise editions and requires the audit_logs feature to be enabled.",
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"userApiKey": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "page",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Page number for pagination",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"default": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Success",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"per_page": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Number of items per page",
|
||||||
|
"example": 15
|
||||||
|
},
|
||||||
|
"total_entries": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Total number of audit log entries",
|
||||||
|
"example": 150
|
||||||
|
},
|
||||||
|
"current_page": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Current page number",
|
||||||
|
"example": 1
|
||||||
|
},
|
||||||
|
"audit_logs": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "Array of audit log entries",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/audit_log"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"403": {
|
||||||
|
"description": "Access denied",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/bad_request_error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"422": {
|
||||||
|
"description": "Feature not enabled or not available in current plan",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/bad_request_error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/api/v1/accounts/{account_id}/agent_bots": {
|
"/api/v1/accounts/{account_id}/agent_bots": {
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
@@ -7406,6 +7626,82 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"audit_log": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Unique identifier for the audit log entry"
|
||||||
|
},
|
||||||
|
"auditable_id": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "The ID of the audited object"
|
||||||
|
},
|
||||||
|
"auditable_type": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The type of the audited object (e.g., Conversation, Contact, User)"
|
||||||
|
},
|
||||||
|
"auditable": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "The audited object data"
|
||||||
|
},
|
||||||
|
"associated_id": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "The ID of the associated object (typically the account ID)"
|
||||||
|
},
|
||||||
|
"associated_type": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The type of the associated object"
|
||||||
|
},
|
||||||
|
"user_id": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "The ID of the user who performed the action"
|
||||||
|
},
|
||||||
|
"user_type": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The type of user who performed the action"
|
||||||
|
},
|
||||||
|
"username": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The email/username of the user who performed the action"
|
||||||
|
},
|
||||||
|
"action": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"create",
|
||||||
|
"update",
|
||||||
|
"destroy"
|
||||||
|
],
|
||||||
|
"description": "The action performed on the object"
|
||||||
|
},
|
||||||
|
"audited_changes": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "JSON object containing the changes made to the audited object"
|
||||||
|
},
|
||||||
|
"version": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Version number of the audit log entry"
|
||||||
|
},
|
||||||
|
"comment": {
|
||||||
|
"type": "string",
|
||||||
|
"nullable": true,
|
||||||
|
"description": "Optional comment associated with the audit log entry"
|
||||||
|
},
|
||||||
|
"request_uuid": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "UUID to identify the request that generated this audit log"
|
||||||
|
},
|
||||||
|
"created_at": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Unix timestamp when the audit log entry was created"
|
||||||
|
},
|
||||||
|
"remote_address": {
|
||||||
|
"type": "string",
|
||||||
|
"nullable": true,
|
||||||
|
"description": "IP address from which the action was performed"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"public_contact": {
|
"public_contact": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@@ -10345,7 +10641,9 @@
|
|||||||
"name": "Application",
|
"name": "Application",
|
||||||
"tags": [
|
"tags": [
|
||||||
"Account AgentBots",
|
"Account AgentBots",
|
||||||
|
"Account",
|
||||||
"Agents",
|
"Agents",
|
||||||
|
"Audit Logs",
|
||||||
"Canned Responses",
|
"Canned Responses",
|
||||||
"Contacts",
|
"Contacts",
|
||||||
"Contact Labels",
|
"Contact Labels",
|
||||||
|
|||||||
@@ -2249,6 +2249,82 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"audit_log": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Unique identifier for the audit log entry"
|
||||||
|
},
|
||||||
|
"auditable_id": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "The ID of the audited object"
|
||||||
|
},
|
||||||
|
"auditable_type": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The type of the audited object (e.g., Conversation, Contact, User)"
|
||||||
|
},
|
||||||
|
"auditable": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "The audited object data"
|
||||||
|
},
|
||||||
|
"associated_id": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "The ID of the associated object (typically the account ID)"
|
||||||
|
},
|
||||||
|
"associated_type": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The type of the associated object"
|
||||||
|
},
|
||||||
|
"user_id": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "The ID of the user who performed the action"
|
||||||
|
},
|
||||||
|
"user_type": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The type of user who performed the action"
|
||||||
|
},
|
||||||
|
"username": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The email/username of the user who performed the action"
|
||||||
|
},
|
||||||
|
"action": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"create",
|
||||||
|
"update",
|
||||||
|
"destroy"
|
||||||
|
],
|
||||||
|
"description": "The action performed on the object"
|
||||||
|
},
|
||||||
|
"audited_changes": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "JSON object containing the changes made to the audited object"
|
||||||
|
},
|
||||||
|
"version": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Version number of the audit log entry"
|
||||||
|
},
|
||||||
|
"comment": {
|
||||||
|
"type": "string",
|
||||||
|
"nullable": true,
|
||||||
|
"description": "Optional comment associated with the audit log entry"
|
||||||
|
},
|
||||||
|
"request_uuid": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "UUID to identify the request that generated this audit log"
|
||||||
|
},
|
||||||
|
"created_at": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Unix timestamp when the audit log entry was created"
|
||||||
|
},
|
||||||
|
"remote_address": {
|
||||||
|
"type": "string",
|
||||||
|
"nullable": true,
|
||||||
|
"description": "IP address from which the action was performed"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"public_contact": {
|
"public_contact": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@@ -5124,7 +5200,9 @@
|
|||||||
"name": "Application",
|
"name": "Application",
|
||||||
"tags": [
|
"tags": [
|
||||||
"Account AgentBots",
|
"Account AgentBots",
|
||||||
|
"Account",
|
||||||
"Agents",
|
"Agents",
|
||||||
|
"Audit Logs",
|
||||||
"Canned Responses",
|
"Canned Responses",
|
||||||
"Contacts",
|
"Contacts",
|
||||||
"Contact Labels",
|
"Contact Labels",
|
||||||
|
|||||||
@@ -1664,6 +1664,82 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"audit_log": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Unique identifier for the audit log entry"
|
||||||
|
},
|
||||||
|
"auditable_id": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "The ID of the audited object"
|
||||||
|
},
|
||||||
|
"auditable_type": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The type of the audited object (e.g., Conversation, Contact, User)"
|
||||||
|
},
|
||||||
|
"auditable": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "The audited object data"
|
||||||
|
},
|
||||||
|
"associated_id": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "The ID of the associated object (typically the account ID)"
|
||||||
|
},
|
||||||
|
"associated_type": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The type of the associated object"
|
||||||
|
},
|
||||||
|
"user_id": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "The ID of the user who performed the action"
|
||||||
|
},
|
||||||
|
"user_type": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The type of user who performed the action"
|
||||||
|
},
|
||||||
|
"username": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The email/username of the user who performed the action"
|
||||||
|
},
|
||||||
|
"action": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"create",
|
||||||
|
"update",
|
||||||
|
"destroy"
|
||||||
|
],
|
||||||
|
"description": "The action performed on the object"
|
||||||
|
},
|
||||||
|
"audited_changes": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "JSON object containing the changes made to the audited object"
|
||||||
|
},
|
||||||
|
"version": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Version number of the audit log entry"
|
||||||
|
},
|
||||||
|
"comment": {
|
||||||
|
"type": "string",
|
||||||
|
"nullable": true,
|
||||||
|
"description": "Optional comment associated with the audit log entry"
|
||||||
|
},
|
||||||
|
"request_uuid": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "UUID to identify the request that generated this audit log"
|
||||||
|
},
|
||||||
|
"created_at": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Unix timestamp when the audit log entry was created"
|
||||||
|
},
|
||||||
|
"remote_address": {
|
||||||
|
"type": "string",
|
||||||
|
"nullable": true,
|
||||||
|
"description": "IP address from which the action was performed"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"public_contact": {
|
"public_contact": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@@ -4531,7 +4607,9 @@
|
|||||||
"name": "Application",
|
"name": "Application",
|
||||||
"tags": [
|
"tags": [
|
||||||
"Account AgentBots",
|
"Account AgentBots",
|
||||||
|
"Account",
|
||||||
"Agents",
|
"Agents",
|
||||||
|
"Audit Logs",
|
||||||
"Canned Responses",
|
"Canned Responses",
|
||||||
"Contacts",
|
"Contacts",
|
||||||
"Contact Labels",
|
"Contact Labels",
|
||||||
|
|||||||
@@ -2425,6 +2425,82 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"audit_log": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Unique identifier for the audit log entry"
|
||||||
|
},
|
||||||
|
"auditable_id": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "The ID of the audited object"
|
||||||
|
},
|
||||||
|
"auditable_type": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The type of the audited object (e.g., Conversation, Contact, User)"
|
||||||
|
},
|
||||||
|
"auditable": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "The audited object data"
|
||||||
|
},
|
||||||
|
"associated_id": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "The ID of the associated object (typically the account ID)"
|
||||||
|
},
|
||||||
|
"associated_type": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The type of the associated object"
|
||||||
|
},
|
||||||
|
"user_id": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "The ID of the user who performed the action"
|
||||||
|
},
|
||||||
|
"user_type": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The type of user who performed the action"
|
||||||
|
},
|
||||||
|
"username": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The email/username of the user who performed the action"
|
||||||
|
},
|
||||||
|
"action": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"create",
|
||||||
|
"update",
|
||||||
|
"destroy"
|
||||||
|
],
|
||||||
|
"description": "The action performed on the object"
|
||||||
|
},
|
||||||
|
"audited_changes": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "JSON object containing the changes made to the audited object"
|
||||||
|
},
|
||||||
|
"version": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Version number of the audit log entry"
|
||||||
|
},
|
||||||
|
"comment": {
|
||||||
|
"type": "string",
|
||||||
|
"nullable": true,
|
||||||
|
"description": "Optional comment associated with the audit log entry"
|
||||||
|
},
|
||||||
|
"request_uuid": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "UUID to identify the request that generated this audit log"
|
||||||
|
},
|
||||||
|
"created_at": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Unix timestamp when the audit log entry was created"
|
||||||
|
},
|
||||||
|
"remote_address": {
|
||||||
|
"type": "string",
|
||||||
|
"nullable": true,
|
||||||
|
"description": "IP address from which the action was performed"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"public_contact": {
|
"public_contact": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@@ -5304,7 +5380,9 @@
|
|||||||
"name": "Application",
|
"name": "Application",
|
||||||
"tags": [
|
"tags": [
|
||||||
"Account AgentBots",
|
"Account AgentBots",
|
||||||
|
"Account",
|
||||||
"Agents",
|
"Agents",
|
||||||
|
"Audit Logs",
|
||||||
"Canned Responses",
|
"Canned Responses",
|
||||||
"Contacts",
|
"Contacts",
|
||||||
"Contact Labels",
|
"Contact Labels",
|
||||||
|
|||||||
Reference in New Issue
Block a user