payfrit-api/api
Mike 629c7d2cef Add Hub Channels API — CRUD endpoints for channel management
New endpoints under /api/hub/channels/:
- create.php: Create channel with type (public/private/direct), auto-add creator as owner
- list.php: List channels with filters (type, agent membership, archived, pagination)
- get.php: Get channel by ID or Name, includes member list
- update.php: Update display name, purpose, archive status (admin/owner only)
- delete.php: Hard-delete channel (owner only), FK cascade removes members
- members.php: List channel members with agent info
- join.php: Join public channels (private requires invite)
- leave.php: Leave channel (owners blocked from leaving)

Database: Hub_Channels + Hub_ChannelMembers tables with FK cascade.
Task #59 (T51-Sub1)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 01:06:14 +00:00
..
addresses Initial PHP API migration from CFML 2026-03-14 14:26:59 -07:00
admin fix: harden auth middleware — exact route matching, remove admin bypass, add cron secret 2026-03-23 01:43:43 +00:00
app Initial PHP API migration from CFML 2026-03-14 14:26:59 -07:00
assignments Initial PHP API migration from CFML 2026-03-14 14:26:59 -07:00
auth Enable magic OTP (123456) for Apple app review testing 2026-03-20 05:22:17 +00:00
beacon-sharding Initial PHP API migration from CFML 2026-03-14 14:26:59 -07:00
beacons Add beacons/lookupByMac.php and beacons/wipe.php endpoints 2026-03-16 19:13:21 -07:00
businesses Initial PHP API migration from CFML 2026-03-14 14:26:59 -07:00
chat Initial PHP API migration from CFML 2026-03-14 14:26:59 -07:00
config Initial PHP API migration from CFML 2026-03-14 14:26:59 -07:00
grants Initial PHP API migration from CFML 2026-03-14 14:26:59 -07:00
hub/channels Add Hub Channels API — CRUD endpoints for channel management 2026-03-27 01:06:14 +00:00
menu Fix item prices returning as strings instead of floats in JSON 2026-03-16 17:24:57 -07:00
orders Add TaskTypeID=0 to order task creation INSERTs 2026-03-16 23:21:41 -07:00
portal Add portal/getSettings and portal/updateSettings PHP endpoints 2026-03-17 15:42:24 -07:00
presence Initial PHP API migration from CFML 2026-03-14 14:26:59 -07:00
ratings Initial PHP API migration from CFML 2026-03-14 14:26:59 -07:00
servicepoints Initial PHP API migration from CFML 2026-03-14 14:26:59 -07:00
setup Add IsServiceBell flag to task types 2026-03-15 16:52:23 -07:00
stations Initial PHP API migration from CFML 2026-03-14 14:26:59 -07:00
stripe Add TaskTypeID=0 to order task creation INSERTs 2026-03-16 23:21:41 -07:00
tabs Initial PHP API migration from CFML 2026-03-14 14:26:59 -07:00
tasks Add pretty HTML dashboard for team tasks 2026-03-24 22:30:51 +00:00
users Initial PHP API migration from CFML 2026-03-14 14:26:59 -07:00
workers Initial PHP API migration from CFML 2026-03-14 14:26:59 -07:00
helpers.php Add Hub Channels API — CRUD endpoints for channel management 2026-03-27 01:06:14 +00:00