{"openapi":"3.0.3","info":{"title":"E-Office Backend API Documentation","version":"1.0.0","description":"Comprehensive, interactive OpenAPI specification for E-Office Hono Backend on Cloudflare Workers.","contact":{"name":"E-Office Engineering Team"}},"servers":[{"url":"/api/v1","description":"API v1 Endpoint Base"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Enter your JWT token in the format: Bearer <token>"}},"schemas":{"ErrorResponse":{"type":"object","properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Invalid payload or resource not found"},"error":{"type":"string","example":"Validation Error"}}},"SuccessResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Operation completed successfully"},"data":{"type":"object"}}},"PaginatedResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Successfully fetched list"},"meta":{"type":"object","properties":{"limit":{"type":"integer","example":10},"page":{"type":"integer","example":1},"totalRecords":{"type":"integer","example":42},"totalPages":{"type":"integer","example":5}}},"data":{"type":"array","items":{"type":"object"}}}}}},"security":[{"bearerAuth":[]}],"paths":{"/ping":{"get":{"tags":["Utility"],"summary":"Server Ping Check","description":"Returns server status and timestamp.","responses":{"200":{"description":"Server is healthy","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"OK"},"framework":{"type":"string","example":"Hono"},"timestamp":{"type":"string","example":"2026-08-31T15:30:00.000Z"}}}}}}}}},"/health":{"get":{"tags":["Utility"],"summary":"Health Check","description":"Verifies Hyperdrive connection and database status.","responses":{"200":{"description":"Database and worker are operational","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"UP"},"timestamp":{"type":"string","example":"2026-08-31T15:30:00.000Z"},"database":{"type":"object","properties":{"status":{"type":"string","example":"UP"}}}}}}}}}}},"/organisation-auth/login":{"post":{"tags":["Organisation Auth"],"summary":"Organisation User Login","description":"Authenticates an organisation user or admin using email and password.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email","password"],"properties":{"email":{"type":"string","format":"email","example":"admin@company.com"},"password":{"type":"string","format":"password","example":"Password@123"}}}}}},"responses":{"200":{"description":"Login successful","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Login successful"},"token":{"type":"string","example":"eyJhbGciOiJI..."},"data":{"type":"object"}}}}}},"400":{"$ref":"#/components/schemas/ErrorResponse"},"401":{"$ref":"#/components/schemas/ErrorResponse"}}}},"/organisation-auth/register":{"post":{"tags":["Organisation Auth"],"summary":"Register Organisation & Admin","description":"Creates a new organisation account and primary admin user.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","email","password"],"properties":{"name":{"type":"string","example":"Acme Corp"},"email":{"type":"string","format":"email","example":"admin@acme.com"},"password":{"type":"string","format":"password","example":"SecurePass123!"},"phone":{"type":"string","example":"+1234567890"}}}}}},"responses":{"201":{"description":"Registered successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"$ref":"#/components/schemas/ErrorResponse"}}}},"/organisation-auth/forgot-password":{"post":{"tags":["Organisation Auth"],"summary":"Request Password Reset Link","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email","example":"user@company.com"}}}}}},"responses":{"200":{"description":"Password reset link sent successfully"},"404":{"$ref":"#/components/schemas/ErrorResponse"}}}},"/organisation/check-domain":{"get":{"tags":["Organisation"],"summary":"Verify Domain Availability","parameters":[{"name":"domain","in":"query","required":true,"schema":{"type":"string","example":"acme.com"},"description":"Domain name to check"}],"responses":{"200":{"description":"Domain check result","content":{"application/json":{"schema":{"type":"object","properties":{"available":{"type":"boolean","example":true},"domain":{"type":"string","example":"acme.com"}}}}}}}}},"/organisation":{"get":{"tags":["Organisation"],"summary":"List Organisations","parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":10}},{"name":"name","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"List of organisations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse"}}}}}}},"/organisation/{id}":{"get":{"tags":["Organisation"],"summary":"Get Organisation Details","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Organisation details"},"404":{"$ref":"#/components/schemas/ErrorResponse"}}},"put":{"tags":["Organisation"],"summary":"Update Organisation","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Organisation updated successfully"}}}},"/business-unit":{"get":{"tags":["Business Unit"],"summary":"List Business Units","parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":10}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse"}}}}}},"post":{"tags":["Business Unit"],"summary":"Create Business Unit","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","example":"Engineering & Tech"},"code":{"type":"string","example":"ENG"},"description":{"type":"string","example":"Software development unit"}}}}}},"responses":{"201":{"description":"Business Unit created"}}}},"/department":{"get":{"tags":["Department"],"summary":"List Departments","parameters":[{"name":"businessUnitId","in":"query","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse"}}}}}},"post":{"tags":["Department"],"summary":"Create Department","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","example":"Backend Infrastructure"},"code":{"type":"string","example":"BE"}}}}}},"responses":{"201":{"description":"Department created"}}}},"/role":{"get":{"tags":["Role & Permission"],"summary":"List Roles","responses":{"200":{"description":"Roles list"}}},"post":{"tags":["Role & Permission"],"summary":"Create Role","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","example":"HR Manager"},"description":{"type":"string","example":"Manages employee records"}}}}}},"responses":{"201":{"description":"Role created"}}}},"/permission":{"get":{"tags":["Role & Permission"],"summary":"List Permissions","responses":{"200":{"description":"Permissions list"}}}},"/business-unit-location":{"get":{"tags":["Business Unit"],"summary":"List Business Unit Locations","responses":{"200":{"description":"Locations list"}}},"post":{"tags":["Business Unit"],"summary":"Create Business Unit Location","responses":{"201":{"description":"Location created"}}}},"/organisation-basic":{"get":{"tags":["Organisation"],"summary":"Get Organisation Basic Details","responses":{"200":{"description":"Basic details"}}},"put":{"tags":["Organisation"],"summary":"Update Organisation Basic Details","responses":{"200":{"description":"Basic details updated"}}}},"/organisation-theme":{"get":{"tags":["Organisation"],"summary":"Get Organisation Theme Config","responses":{"200":{"description":"Theme settings"}}},"put":{"tags":["Organisation"],"summary":"Update Organisation Theme Config","responses":{"200":{"description":"Theme updated"}}}},"/module":{"get":{"tags":["Role & Permission"],"summary":"List System Modules","responses":{"200":{"description":"Modules list"}}}},"/country":{"get":{"tags":["Master Data"],"summary":"List Countries","responses":{"200":{"description":"Countries list"}}}},"/state":{"get":{"tags":["Master Data"],"summary":"List States","responses":{"200":{"description":"States list"}}}},"/city":{"get":{"tags":["Master Data"],"summary":"List Cities","responses":{"200":{"description":"Cities list"}}}},"/time-zone":{"get":{"tags":["Master Data"],"summary":"List Timezones","responses":{"200":{"description":"Timezones list"}}}},"/currency":{"get":{"tags":["Master Data"],"summary":"List Currencies","responses":{"200":{"description":"Currencies list"}}}},"/gender":{"get":{"tags":["Master Data"],"summary":"List Genders","responses":{"200":{"description":"Genders list"}}}},"/sector":{"get":{"tags":["Master Data"],"summary":"List Sectors","responses":{"200":{"description":"Sectors list"}}}},"/plans":{"get":{"tags":["Plans"],"summary":"List Subscription Plans","responses":{"200":{"description":"Subscription plans list"}}}},"/audit-log":{"get":{"tags":["Audit Log"],"summary":"Fetch Audit Logs","responses":{"200":{"description":"Audit logs"}}}},"/employee-auth/login":{"post":{"tags":["Employee Auth"],"summary":"Employee Login","description":"Authenticates an employee using email and password.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email","password"],"properties":{"email":{"type":"string","format":"email","example":"john.doe@company.com"},"password":{"type":"string","format":"password","example":"EmpPass@123"}}}}}},"responses":{"200":{"description":"Login successful","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"token":{"type":"string","example":"eyJhbGci..."},"data":{"type":"object"}}}}}},"401":{"$ref":"#/components/schemas/ErrorResponse"}}}},"/employee-basic":{"get":{"tags":["Employee Profile"],"summary":"List Employees","parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":10}},{"name":"departmentId","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"searchTerm","in":"query","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse"}}}}}},"post":{"tags":["Employee Profile"],"summary":"Create Employee Record","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["firstName","lastName","email"],"properties":{"firstName":{"type":"string","example":"Jane"},"lastName":{"type":"string","example":"Smith"},"email":{"type":"string","format":"email","example":"jane.smith@company.com"},"phone":{"type":"string","example":"+1987654321"}}}}}},"responses":{"201":{"description":"Employee created successfully"}}}},"/employee-profile/{id}":{"get":{"tags":["Employee Profile"],"summary":"Get Employee Profile Details","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Employee full profile"},"404":{"$ref":"#/components/schemas/ErrorResponse"}}}},"/identity-document":{"post":{"tags":["Employee Documents"],"summary":"Upload Identity Document to R2","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"employeeId":{"type":"string","format":"uuid"},"docType":{"type":"string","example":"PASSPORT"},"file":{"type":"string","format":"binary"}}}}}},"responses":{"201":{"description":"Document uploaded to R2"}}}},"/leave-request":{"get":{"tags":["Leave Management"],"summary":"List Leave Requests","parameters":[{"name":"employeeId","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","schema":{"type":"string","enum":["PENDING","APPROVED","REJECTED"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse"}}}}}},"post":{"tags":["Leave Management"],"summary":"Submit Leave Request","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["leaveTypeId","startDate","endDate"],"properties":{"leaveTypeId":{"type":"string","format":"uuid"},"startDate":{"type":"string","format":"date","example":"2026-09-01"},"endDate":{"type":"string","format":"date","example":"2026-09-05"},"reason":{"type":"string","example":"Vacation"}}}}}},"responses":{"201":{"description":"Leave request submitted"}}}},"/attendants-log":{"get":{"tags":["Attendance & Shift"],"summary":"Fetch Attendance Logs","parameters":[{"name":"employeeId","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"date","in":"query","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"Attendance logs list"}}},"post":{"tags":["Attendance & Shift"],"summary":"Clock In / Clock Out","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["CLOCK_IN","CLOCK_OUT"]},"notes":{"type":"string"}}}}}},"responses":{"200":{"description":"Attendance log recorded"}}}},"/employee-job":{"get":{"tags":["Employee Profile"],"summary":"Get Employee Job Details","responses":{"200":{"description":"Job details"}}}},"/employee-work":{"get":{"tags":["Employee Profile"],"summary":"Get Employee Work Details","responses":{"200":{"description":"Work details"}}}},"/employee-finance":{"get":{"tags":["Employee Profile"],"summary":"Get Employee Financial Details","responses":{"200":{"description":"Finance details"}}}},"/leave-plan":{"get":{"tags":["Leave Management"],"summary":"List Leave Plans","responses":{"200":{"description":"Leave plans"}}}},"/leave-types":{"get":{"tags":["Leave Management"],"summary":"List Leave Types","responses":{"200":{"description":"Leave types"}}}},"/employee-leave":{"get":{"tags":["Leave Management"],"summary":"List Employee Leave Balances","responses":{"200":{"description":"Leave balances"}}}},"/leave-log":{"get":{"tags":["Leave Management"],"summary":"List Leave Activity Logs","responses":{"200":{"description":"Leave logs"}}}},"/shift":{"get":{"tags":["Attendance & Shift"],"summary":"List Work Shifts","responses":{"200":{"description":"Shifts list"}}}},"/week-off":{"get":{"tags":["Attendance & Shift"],"summary":"List Week-off Days","responses":{"200":{"description":"Week-off settings"}}}},"/holiday":{"get":{"tags":["Attendance & Shift"],"summary":"List Company Holidays","responses":{"200":{"description":"Holidays list"}}}},"/holiday-plan":{"get":{"tags":["Attendance & Shift"],"summary":"List Holiday Plans","responses":{"200":{"description":"Holiday plans"}}}},"/pay-grade":{"get":{"tags":["Payroll"],"summary":"List Pay Grades","responses":{"200":{"description":"Pay grades"}}}},"/pay-scale":{"get":{"tags":["Payroll"],"summary":"List Pay Scales","responses":{"200":{"description":"Pay scales"}}}},"/worker-type":{"get":{"tags":["Payroll"],"summary":"List Worker Types","responses":{"200":{"description":"Worker types"}}}},"/notice-period":{"get":{"tags":["Payroll"],"summary":"List Notice Period Policies","responses":{"200":{"description":"Notice periods"}}}},"/probation":{"get":{"tags":["Payroll"],"summary":"List Probation Policies","responses":{"200":{"description":"Probation policies"}}}},"/experience-document":{"get":{"tags":["Employee Documents"],"summary":"List Experience Documents","responses":{"200":{"description":"Documents"}}}},"/degree-document":{"get":{"tags":["Employee Documents"],"summary":"List Degree Documents","responses":{"200":{"description":"Documents"}}}},"/assert":{"get":{"tags":["Asset Management"],"summary":"List Assigned Assets","responses":{"200":{"description":"Assets list"}}}},"/assert-category":{"get":{"tags":["Asset Management"],"summary":"List Asset Categories","responses":{"200":{"description":"Asset categories"}}}},"/assert-type":{"get":{"tags":["Asset Management"],"summary":"List Asset Types","responses":{"200":{"description":"Asset types"}}}},"/assert-status":{"get":{"tags":["Asset Management"],"summary":"List Asset Statuses","responses":{"200":{"description":"Asset statuses"}}}},"/assert-condition":{"get":{"tags":["Asset Management"],"summary":"List Asset Conditions","responses":{"200":{"description":"Asset conditions"}}}},"/client":{"get":{"tags":["Clients"],"summary":"List Clients","responses":{"200":{"description":"Client list"}}}},"/client-activity":{"get":{"tags":["Clients"],"summary":"Fetch Client Activity Log","responses":{"200":{"description":"Activity log"}}}},"/team":{"get":{"tags":["Teams"],"summary":"List Teams","responses":{"200":{"description":"Teams list"}}}},"/announcement-post":{"get":{"tags":["Announcements"],"summary":"Fetch Announcements","responses":{"200":{"description":"Announcements list"}}}},"/eoffice-dashboard":{"get":{"tags":["Dashboard"],"summary":"Fetch HR Dashboard Analytics","responses":{"200":{"description":"Analytics data"}}}},"/project":{"get":{"tags":["Streamline - Projects"],"summary":"List Projects","parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":10}},{"name":"status","in":"query","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse"}}}}}},"post":{"tags":["Streamline - Projects"],"summary":"Create New Project","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","key"],"properties":{"name":{"type":"string","example":"Mobile Banking Redesign"},"key":{"type":"string","example":"MBR"},"description":{"type":"string","example":"Next-gen iOS and Android app redesign"}}}}}},"responses":{"201":{"description":"Project created"}}}},"/project/{id}":{"get":{"tags":["Streamline - Projects"],"summary":"Get Project Details","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Project details"},"404":{"$ref":"#/components/schemas/ErrorResponse"}}},"put":{"tags":["Streamline - Projects"],"summary":"Update Project Details","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Project updated"}}},"delete":{"tags":["Streamline - Projects"],"summary":"Delete Project","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Project deleted"}}}},"/project-members":{"get":{"tags":["Streamline - Projects"],"summary":"List Project Members","responses":{"200":{"description":"Project members"}}}},"/employee-invite":{"post":{"tags":["Streamline - Projects"],"summary":"Invite Employee to Project","responses":{"200":{"description":"Invitation sent"}}}},"/epic":{"get":{"tags":["Streamline - Epics"],"summary":"List Epics","parameters":[{"name":"projectId","in":"query","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Epics list"}}},"post":{"tags":["Streamline - Epics"],"summary":"Create Epic","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","projectId"],"properties":{"name":{"type":"string","example":"User Authentication & SSO"},"projectId":{"type":"string","format":"uuid"}}}}}},"responses":{"201":{"description":"Epic created"}}}},"/sprint":{"get":{"tags":["Streamline - Sprints"],"summary":"List Sprints","parameters":[{"name":"projectId","in":"query","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Sprints list"}}},"post":{"tags":["Streamline - Sprints"],"summary":"Create Sprint","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","startDate","endDate"],"properties":{"name":{"type":"string","example":"Sprint 24"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"}}}}}},"responses":{"201":{"description":"Sprint created"}}}},"/release":{"get":{"tags":["Streamline - Releases"],"summary":"List Releases","responses":{"200":{"description":"Releases list"}}}},"/task":{"get":{"tags":["Streamline - Tasks"],"summary":"List Tasks / Backlog","parameters":[{"name":"projectId","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"sprintId","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"assigneeId","in":"query","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse"}}}}}},"post":{"tags":["Streamline - Tasks"],"summary":"Create Task","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title","projectId"],"properties":{"title":{"type":"string","example":"Implement OAuth2 Token Refresh"},"description":{"type":"string"},"projectId":{"type":"string","format":"uuid"},"assigneeId":{"type":"string","format":"uuid"},"storyPoints":{"type":"integer","example":5}}}}}},"responses":{"201":{"description":"Task created"}}}},"/status":{"get":{"tags":["Streamline - Master Data"],"summary":"List Statuses","responses":{"200":{"description":"Statuses list"}}}},"/priority":{"get":{"tags":["Streamline - Master Data"],"summary":"List Priorities","responses":{"200":{"description":"Priorities list"}}}},"/tags":{"get":{"tags":["Streamline - Master Data"],"summary":"List Tags","responses":{"200":{"description":"Tags list"}}}},"/task-type":{"get":{"tags":["Streamline - Master Data"],"summary":"List Task Types","responses":{"200":{"description":"Task types list"}}}},"/common-status":{"get":{"tags":["Streamline - Master Data"],"summary":"List Common Statuses","responses":{"200":{"description":"Common statuses list"}}}},"/common-priority":{"get":{"tags":["Streamline - Master Data"],"summary":"List Common Priorities","responses":{"200":{"description":"Common priorities list"}}}},"/common-tags":{"get":{"tags":["Streamline - Master Data"],"summary":"List Common Tags","responses":{"200":{"description":"Common tags list"}}}},"/common-task-type":{"get":{"tags":["Streamline - Master Data"],"summary":"List Common Task Types","responses":{"200":{"description":"Common task types list"}}}},"/comment":{"post":{"tags":["Streamline - Tasks"],"summary":"Add Comment to Task","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["taskId","content"],"properties":{"taskId":{"type":"string","format":"uuid"},"content":{"type":"string","example":"PR has been submitted for code review."}}}}}},"responses":{"201":{"description":"Comment added"}}}},"/log-hour":{"post":{"tags":["Streamline - Time Tracking"],"summary":"Log Worked Hours","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["taskId","hoursLogged"],"properties":{"taskId":{"type":"string","format":"uuid"},"hoursLogged":{"type":"number","example":4.5},"description":{"type":"string","example":"Refactored JWT middleware"}}}}}},"responses":{"201":{"description":"Hours logged successfully"}}}},"/administration-user-portal":{"get":{"tags":["Administration"],"summary":"Get User Portal Management List & Setup Status","parameters":[{"name":"userId","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"clientId","in":"query","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"User portal setup status and details"}}},"post":{"tags":["Administration"],"summary":"Create User Portal Entry","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"201":{"description":"Entry created successfully"}}}},"/administration-dashboard":{"get":{"tags":["Administration"],"summary":"Admin Analytics Dashboard","parameters":[{"name":"groupBy","in":"query","schema":{"type":"string","enum":["WEEK","MONTH","YEAR"],"default":"MONTH"}},{"name":"targetOrgId","in":"query","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Analytics data points"}}}},"/enquire-details":{"get":{"tags":["Administration - Enquiries"],"summary":"List Support Enquiries","responses":{"200":{"description":"Enquiries list"}}},"post":{"tags":["Administration - Enquiries"],"summary":"Submit New Enquiry","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email","subject","message"],"properties":{"email":{"type":"string","format":"email"},"subject":{"type":"string"},"message":{"type":"string"}}}}}},"responses":{"201":{"description":"Enquiry submitted"}}}},"/support-ticket":{"get":{"tags":["Administration - Support"],"summary":"List Support Tickets","responses":{"200":{"description":"Support tickets"}}}},"/calendar-meet":{"get":{"tags":["Calendar"],"summary":"List Scheduled Meetings","parameters":[{"name":"employeeId","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"from","in":"query","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"Meetings list"}}},"post":{"tags":["Calendar"],"summary":"Schedule New Meeting","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title","onDate","from","to"],"properties":{"title":{"type":"string","example":"Quarterly Review"},"onDate":{"type":"string","format":"date","example":"2026-09-15"},"from":{"type":"string","example":"10:00:00"},"to":{"type":"string","example":"11:30:00"},"meetUrl":{"type":"string","format":"uri"}}}}}},"responses":{"201":{"description":"Meeting created"}}}},"/calendar-task":{"get":{"tags":["Calendar"],"summary":"List Calendar Tasks","responses":{"200":{"description":"Calendar tasks"}}}},"/calendar-tag":{"get":{"tags":["Calendar"],"summary":"List Calendar Tags","responses":{"200":{"description":"Tags list"}}}},"/calendar-type":{"get":{"tags":["Calendar"],"summary":"List Calendar Event Types","responses":{"200":{"description":"Types list"}}}},"/email":{"get":{"tags":["Mail"],"summary":"List Emails / Inbox / Sent","parameters":[{"name":"userEmail","in":"query","schema":{"type":"string","format":"email"}},{"name":"type","in":"query","schema":{"type":"string","enum":["inbox","sent","trash","spam","archive","starred"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse"}}}}}},"post":{"tags":["Mail"],"summary":"Send Email (via Cloudflare Email REST Service)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["to","subject"],"properties":{"from":{"type":"string","format":"email"},"to":{"type":"array","items":{"type":"string","format":"email"}},"subject":{"type":"string","example":"Project Status Update"},"body":{"type":"string","example":"Here is the weekly update."}}}}}},"responses":{"201":{"description":"Email sent/queued successfully"}}}},"/incoming-email/webhook":{"post":{"tags":["Mail"],"summary":"Cloudflare Email Worker Webhook","security":[],"responses":{"200":{"description":"Webhook processed"}}}},"/mail-label":{"get":{"tags":["Mail"],"summary":"List Mail Labels","responses":{"200":{"description":"Labels list"}}}},"/chat-group":{"get":{"tags":["Chat"],"summary":"List User Chat Groups","parameters":[{"name":"userId","in":"query","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Chat groups"}}},"post":{"tags":["Chat"],"summary":"Create Chat Group","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","example":"Engineering Lead Chat"},"memberUserIds":{"type":"array","items":{"type":"string","format":"uuid"}}}}}}},"responses":{"201":{"description":"Group created"}}}},"/weblings-drive":{"get":{"tags":["WeblingsDrive (Cloudflare R2)"],"summary":"List Files & Folders","parameters":[{"name":"userId","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"parentId","in":"query","schema":{"type":"string","format":"uuid"},"description":"Null for root directory"}],"responses":{"200":{"description":"Files and folders list"}}},"post":{"tags":["WeblingsDrive (Cloudflare R2)"],"summary":"Create Folder or Upload File to R2","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","isFolder"],"properties":{"name":{"type":"string","example":"Q3 Financial Reports"},"isFolder":{"type":"boolean","example":true},"parentId":{"type":"string","format":"uuid"}}}}}},"responses":{"201":{"description":"File/folder metadata created"}}}}}}