{"openapi":"3.0.0","info":{"title":"Comedi API","description":"API documentation for Comedi application","license":{"name":"MIT"},"version":"1.0.0"},"servers":[{"url":"\/api","description":"API base path"}],"paths":{"\/admin\/auth\/login":{"post":{"tags":["Admin"],"summary":"Login","description":"Login: email + password, returns JWT access_token + refresh_token and user.","operationId":"0d4bd5d2bd75b40d68161afda0ef07ac","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["email","password"],"properties":{"email":{"type":"string","format":"email","example":"admin@example.com"},"password":{"type":"string","format":"password","example":"password"}},"type":"object"}}}},"responses":{"200":{"description":"Successful Operation","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Login successfully."},"data":{"properties":{"access_token":{"type":"string"},"refresh_token":{"type":"string"},"token_type":{"type":"string","example":"bearer"},"expires_in":{"type":"integer","example":3600},"user":{"properties":{"id":{"type":"integer"},"user_id":{"type":"integer"},"name":{"type":"string"},"email":{"type":"string"},"phone_number":{"type":"string","nullable":true}},"type":"object"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid credentials","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"These credentials do not match our records."},"error":{"properties":{"key":{"type":"string","example":"auth.unauthorized"},"content":{"type":"string"}},"type":"object"}},"type":"object"}}}},"422":{"description":"Validation Error","content":{"application\/json":{"schema":[]}}}}}},"\/admin\/auth\/forgot-password":{"post":{"tags":["Admin"],"summary":"Forgot password","description":"Forgot password: queues email with reset link containing a stateless JWT (`token` query).","operationId":"a030ad5ab947dcee46ed18344316b9f2","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["email"],"properties":{"email":{"type":"string","format":"email","example":"admin@example.com"}},"type":"object"}}}},"responses":{"200":{"description":"Successful Operation","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"If your email is registered, you will receive password reset instructions shortly."},"data":{"type":"array","items":[],"example":[]}},"type":"object"}}}},"400":{"description":"User email not registered","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"We could not find a user with that email address."},"error":{"properties":{"key":{"type":"string","example":"admin.password_reset_user_not_found"},"content":{"type":"string"}},"type":"object"}},"type":"object"}}}},"422":{"description":"Validation Error","content":{"application\/json":{"schema":[]}}}}}},"\/admin\/auth\/reset-password":{"post":{"tags":["Admin"],"summary":"Reset password","description":"Reset password: submit JWT from the reset email plus new password and confirmation.","operationId":"4fbf358eedfcf4f75780db592fbdcb42","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["token","password","password_confirmation"],"properties":{"token":{"description":"JWT from email link query","type":"string","example":"eyJ0eXAiOiJKV1QiLCJhbGc..."},"password":{"type":"string","format":"password","minLength":6,"example":"newpassword123"},"password_confirmation":{"type":"string","format":"password","example":"newpassword123"}},"type":"object"}}}},"responses":{"200":{"description":"Successful Operation","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Password has been reset successfully."},"data":{"type":"array","items":[],"example":[]}},"type":"object"}}}},"400":{"description":"Reset failed (invalid\/expired token, admin not found, stale token_version)","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string"},"error":{"properties":{"key":{"description":"One of: admin.invalid_or_expired_reset_token, admin.invalid_reset_token, admin.password_reset_user_not_found","type":"string","example":"admin.invalid_or_expired_reset_token"},"content":{"type":"string"}},"type":"object"}},"type":"object"}}}},"422":{"description":"Validation Error (including password_confirmation mismatch)","content":{"application\/json":{"schema":[]}}}}}},"\/admin\/auth\/refresh-token":{"post":{"tags":["Admin"],"summary":"Refresh token","description":"Refresh tokens: submit a valid refresh_token, server returns fresh access_token + refresh_token.","operationId":"e36448ffce4750de0ec71bd7f24a84a7","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["refresh_token"],"properties":{"refresh_token":{"description":"JWT refresh token","type":"string"}},"type":"object"}}}},"responses":{"200":{"description":"Successful Operation","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Token refreshed successfully."},"data":{"properties":{"access_token":{"type":"string"},"refresh_token":{"type":"string"},"token_type":{"type":"string","example":"bearer"},"expires_in":{"type":"integer"},"user":{"type":"object"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Invalid or expired refresh token","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Invalid or expired refresh token."},"error":{"properties":{"key":{"type":"string","example":"jwt.exception"},"content":{"type":"string"}},"type":"object"}},"type":"object"}}}},"422":{"description":"Validation Error","content":{"application\/json":{"schema":[]}}}}}},"\/admin\/auth\/logout":{"post":{"tags":["Admin"],"summary":"Logout","description":"Logout current admin account (increments `token_version` to invalidate existing JWTs).","operationId":"12d9d47117cc79b77b180802b77422ae","responses":{"200":{"description":"Successful Operation","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Logout successfully."},"data":{"type":"array","items":[],"example":[]}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]}},"\/admin\/company":{"get":{"tags":["Admin Company"],"summary":"Get list of companies","description":"List companies with filtering and pagination. Response uses the shared\n{@see \\App\\Http\\Controllers\\AppBaseController::pagination()} flat shape\n(NOT the standard success\/message\/data envelope).","operationId":"f5be04970302f023f6d4ae67f81d3edf","parameters":[{"name":"name","in":"query","required":false,"schema":{"type":"string","example":"Acme Inc"}},{"name":"address","in":"query","required":false,"schema":{"type":"string","example":"Tokyo St"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"example":20}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"example":1}},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","enum":["id","name","created_at"]}},{"name":"order_direction","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"Filtered company list","content":{"application\/json":{"schema":{"properties":{"data":{"description":"Laravel paginator payload","properties":{"current_page":{"type":"integer","example":1},"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/company"}},"per_page":{"type":"integer","example":20},"total":{"type":"integer","example":43}},"type":"object"},"total":{"type":"integer","example":43},"last_page":{"type":"integer","example":3},"current_page":{"type":"integer","example":1}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation Error","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]},"post":{"tags":["Admin Company"],"summary":"Create a new company","description":"Create a new company.","operationId":"e87b14fda83cd7f7e23cb8bbe3bb45a6","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["name","email"],"properties":{"name":{"type":"string","example":"ABC Pvt Ltd"},"furigana":{"type":"string","example":"\u30a8\u30fc\u30d3\u30fc\u30b7\u30fc"},"email":{"type":"string","format":"email","example":"company@example.com"},"insurance_number":{"type":"string","example":"1234567890"},"postal_code":{"type":"string","example":"1234567"},"address":{"type":"string","example":"123 Tokyo St, Minato-ku, Tokyo"},"phone_number":{"type":"string","example":"0123456789"},"fax_number":{"type":"string","example":"0123456789"},"tax_code":{"type":"string","example":"1234567890"},"person_in_charge_name":{"type":"string","example":"John Doe"},"person_in_charge_email":{"type":"string","format":"email","example":"john.doe@example.com"},"person_in_charge_expense_email":{"type":"string","format":"email","example":"john.doe@example.com"},"bank_id":{"type":"integer","example":1},"bank_branch_id":{"type":"integer","example":1},"bank_account_number":{"type":"string","example":"1234567890"},"bank_account_name":{"type":"string","example":"John Doe"}},"type":"object"}}}},"responses":{"200":{"description":"Created","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Company profile created successfully."},"data":{"$ref":"#\/components\/schemas\/company"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"The given data was invalid."},"errors":{"type":"object"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/admin\/company\/{id}":{"get":{"tags":["Admin Company"],"summary":"Get details of a company","description":"Get company detail by ID.","operationId":"e54aa1644c12879d511b90fd09cc6c14","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Company detail retrieved successfully."},"data":{"$ref":"#\/components\/schemas\/company"}},"type":"object"}}}},"400":{"description":"Company not found","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Company not found."},"error":{"properties":{"key":{"type":"string","example":"company.not_found"},"content":{"type":"string"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]},"put":{"tags":["Admin Company"],"summary":"Update an existing company","description":"Update a company's details.","operationId":"30ee8f2112aec4304c66b4e9296972c7","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":1}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"name":{"type":"string","example":"Acme Inc"},"furigana":{"type":"string","example":"\u30a2\u30af\u30e1"},"email":{"type":"string","format":"email","example":"info@acme.com"},"insurance_number":{"type":"string","example":"123456789"},"postal_code":{"type":"string","example":"100-0001"},"address":{"type":"string","example":"123 Tokyo St"},"phone_number":{"type":"string","example":"0312345678"},"fax_number":{"type":"string","example":"0312345679"},"tax_code":{"type":"string","example":"TAXCODE001"},"person_in_charge_name":{"type":"string","example":"Jane Doe"},"person_in_charge_email":{"type":"string","format":"email","example":"jane.doe@acme.com"},"person_in_charge_expense_email":{"type":"string","format":"email","example":"accounting@acme.com"},"bank_id":{"type":"integer","example":1},"bank_branch_id":{"type":"integer","example":15},"bank_account_number":{"type":"string","example":"1234567890"},"bank_account_name":{"type":"string","example":"Acme Inc"}},"type":"object"}}}},"responses":{"200":{"description":"Company updated successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Company updated successfully."},"data":{"$ref":"#\/components\/schemas\/company"}},"type":"object"}}}},"400":{"description":"Company not found","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Company not found."},"error":{"properties":{"key":{"type":"string","example":"company.not_found"},"content":{"type":"string"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]}},"\/admin\/company-profile":{"get":{"tags":["Admin"],"summary":"Get list of company users","description":"List company users with filtering and pagination.","operationId":"b94768c0ca8a58e2dc192e109f638a8d","parameters":[{"name":"name","in":"query","description":"Company user name to filter","required":false,"schema":{"type":"string","example":"Acme Profile"}},{"name":"company_id","in":"query","description":"Filter by company ID","required":false,"schema":{"type":"integer","example":123}},{"name":"limit","in":"query","description":"Results per page (default: 20, max: 100)","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"example":20}},{"name":"page","in":"query","description":"Page number","required":false,"schema":{"type":"integer","minimum":1,"example":1}},{"name":"order_by","in":"query","description":"Sort column (single field; use with order_direction)","required":false,"schema":{"type":"string","enum":["id","name","company_id","created_at"]}},{"name":"order_direction","in":"query","description":"asc or desc (with order_by)","required":false,"schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"Filtered company user list","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Company profiles listed successfully."},"data":{"description":"Laravel paginator payload","properties":{"current_page":{"type":"integer","example":1},"data":{"type":"array","items":{"type":"object"}},"per_page":{"type":"integer","example":20},"total":{"type":"integer","example":43}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation Error","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]},"post":{"tags":["Admin"],"summary":"Create a new company user","description":"Create a new company user.","operationId":"e32fe6da0d8f9c44810b388630ff3353","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["name","company_id"],"properties":{"name":{"description":"Name of the company user","type":"string","maxLength":255,"example":"Acme Profile"},"company_id":{"description":"ID of the associated company","type":"integer","example":123},"email":{"description":"Login email (optional, must be unique if provided)","type":"string","format":"email","maxLength":255,"example":"acme@example.com"},"phone_number":{"description":"Phone number of the company user","type":"string","maxLength":255,"example":"0909090909"}},"type":"object"}}}},"responses":{"200":{"description":"Company user created successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Company profile created successfully."},"data":{"properties":{"id":{"type":"integer","example":321},"user_id":{"type":"integer","example":456},"company_id":{"type":"integer","example":123},"name":{"type":"string","example":"Acme Profile"},"email":{"type":"string","example":"acme@example.com"},"phone_number":{"type":"string","example":"0909090909"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation error (missing required, unknown company_id, duplicate email\/phone)","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"The given data was invalid."},"errors":{"type":"object"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/admin\/company-profile\/{id}":{"get":{"tags":["Admin"],"summary":"Get details of a company user","description":"Returns details of a specific company user by ID.","operationId":"getCompanyProfileDetail","parameters":[{"name":"id","in":"path","description":"ID of the company user","required":true,"schema":{"type":"integer","example":321}}],"responses":{"200":{"description":"Company user retrieved successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Company user detail retrieved successfully"},"data":{"properties":{"id":{"type":"integer","example":321},"user_id":{"type":"integer","example":456},"company_id":{"type":"integer","example":123},"name":{"type":"string","example":"Acme Profile"},"email":{"type":"string","example":"acme@example.com"},"phone_number":{"type":"string","example":"0909090909"},"company":{"properties":{"id":{"type":"integer","example":123},"name":{"type":"string","example":"Acme Inc"}},"type":"object"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Company profile not found","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Company profile not found."},"error":{"properties":{"key":{"type":"string","example":"company_profile.not_found"},"content":{"type":"string"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]},"put":{"tags":["Admin"],"summary":"Update a company user","description":"Swagger endpoint: `update` (PUT `\/admin\/company-profile\/{id}`).\n\nUpdate a company user.","operationId":"e99787d8fd45049c6e541f8da34e03e6","parameters":[{"name":"id","in":"path","description":"ID of the company user to update","required":true,"schema":{"type":"integer","example":321}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["name","phone_number"],"properties":{"name":{"description":"Name of the company user","type":"string","maxLength":255,"example":"Acme Profile"},"phone_number":{"description":"Phone number of the company user","type":"string","maxLength":255,"example":"0909090909"}},"type":"object"}}}},"responses":{"200":{"description":"Company profile updated","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Company profile updated successfully."},"data":{"type":"object"}},"type":"object"}}}},"400":{"description":"Company profile not found","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Company profile not found."},"error":{"properties":{"key":{"type":"string","example":"company_profile.not_found"},"content":{"type":"string"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation error (including duplicate email\/phone)","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]}},"\/admin\/companies\/salary-payments":{"get":{"tags":["Admin Salary Payment"],"summary":"Get salary payment list","description":"List salary payments with filtering and pagination. Response uses the shared\n{@see \\App\\Http\\Controllers\\AppBaseController::pagination()} flat shape\n(NOT the standard success\/message\/data envelope).","operationId":"dd1da3b1c6bdcb22712e6d9f83e6c964","parameters":[{"name":"page","in":"query","description":"Page number","required":false,"schema":{"type":"integer","minimum":1,"example":1}},{"name":"limit","in":"query","description":"Items per page","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"example":20}},{"name":"order_by","in":"query","description":"Sort column (single field; use with order_direction). Defaults to id desc.","required":false,"schema":{"type":"string","enum":["id","amount","status","withdraw_at","company_branch_id","job_working_id"]}},{"name":"order_direction","in":"query","description":"asc or desc (required with order_by)","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"user_name","in":"query","description":"Filter by user profile name (LIKE)","required":false,"schema":{"type":"string","example":"Demo User"}},{"name":"user_katakana_name","in":"query","description":"Filter by user profile katakana name (LIKE)","required":false,"schema":{"type":"string","example":"\u30c7\u30e2\u30e6\u30fc\u30b6\u30fc"}},{"name":"user_phone_number","in":"query","description":"Filter by user profile phone number (LIKE)","required":false,"schema":{"type":"string","example":"09012345678"}},{"name":"company_id","in":"query","description":"Company ID (must exist in t_companies)","required":false,"schema":{"type":"integer","example":1}},{"name":"company_name","in":"query","description":"Filter by company name (LIKE)","required":false,"schema":{"type":"string","example":"Demo Company"}},{"name":"job_working_id","in":"query","description":"Job working ID (must exist in t_job_workings)","required":false,"schema":{"type":"integer","example":1}},{"name":"status","in":"query","description":"Transaction log status (t_transaction_logs.status)","required":false,"schema":{"type":"string","enum":["processing","success","failed"],"example":"success"}},{"name":"withdraw_at_from","in":"query","description":"Withdraw date from (YYYY-MM-DD)","required":false,"schema":{"type":"string","format":"date","example":"2025-01-01"}},{"name":"withdraw_at_to","in":"query","description":"Withdraw date to (YYYY-MM-DD, must be >= withdraw_at_from)","required":false,"schema":{"type":"string","format":"date","example":"2025-01-31"}},{"name":"transaction_id","in":"query","description":"Transaction ID","required":false,"schema":{"type":"string","example":"txn_123456"}}],"responses":{"200":{"description":"Salary payment list (pagination flat shape)","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"id":{"type":"integer","example":2},"user_id":{"type":"integer","example":1},"company_id":{"type":"integer","example":1},"job_working_id":{"type":"integer","example":1},"amount":{"type":"string","example":"78667.00"},"status":{"type":"string","example":"in-wallet"},"withdraw_at":{"type":"string","example":null,"nullable":true},"transaction_id":{"type":"string","example":null,"nullable":true}},"type":"object"}},"total":{"type":"integer","example":3},"last_page":{"type":"integer","example":1},"current_page":{"type":"integer","example":1}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"The given data was invalid."},"errors":{"type":"object"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/admin\/companies\/salary-payments\/{id}":{"get":{"tags":["Admin Salary Payment"],"summary":"Get salary payment detail","description":"Show salary payment detail. Response includes the `user.profile` relation\n(requested via `firstById($id, ['user.profile'])`).","operationId":"9c737ac9611e2a20f45078603146ff2e","parameters":[{"name":"id","in":"path","description":"Salary payment ID","required":true,"schema":{"type":"integer","example":1}}],"responses":{"200":{"description":"Salary payment detail","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Succeed"},"data":{"properties":{"id":{"type":"integer","example":1},"user_id":{"type":"integer","example":1},"company_id":{"type":"integer","example":1},"job_working_id":{"type":"integer","example":1},"amount":{"type":"string","example":"99999.00"},"status":{"type":"string","example":"in-wallet"},"withdraw_at":{"type":"string","example":null,"nullable":true},"transaction_id":{"type":"string","example":null,"nullable":true},"user":{"properties":{"id":{"type":"integer","example":1},"profile":{"properties":{"id":{"type":"integer","example":1},"user_id":{"type":"integer","example":1},"name":{"type":"string","example":"Demo User"},"katakana_name":{"type":"string","example":"\u30c7\u30e2\u30e6\u30fc\u30b6\u30fc"},"phone_number":{"type":"string","example":"09012345678"}},"type":"object","nullable":true}},"type":"object","nullable":true}},"type":"object"}},"type":"object"}}}},"400":{"description":"Salary payment not found","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Salary payment not found."},"error":{"properties":{"key":{"type":"string","example":"company_payment.not_found"},"content":{"type":"string","example":"Salary payment not found."}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]}},"\/healthcheck":{"get":{"tags":["Healthcheck"],"summary":"App healthcheck (liveness\/readiness)","description":"Returns the status of the application and database connection.","operationId":"36aa242901966c71ee8e9806980157bc","responses":{"200":{"description":"Healthy app","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Succeed"},"data":{"properties":{"status":{"type":"string","example":"ok"},"app":{"type":"string","example":"running"},"database":{"type":"string","example":"connected"}},"type":"object"}},"type":"object"}}}},"500":{"description":"App or database unhealthy","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Internal server error"},"data":{"type":"object","nullable":true}},"type":"object"}}}}}}},"\/worker\/healthcheck":{"get":{"tags":["Healthcheck"],"summary":"Worker healthcheck","description":"Checks whether Supervisor is running and its processes report RUNNING state.","operationId":"b037906f4978567c1c946bd27ff4a5b5","responses":{"200":{"description":"Supervisor healthy","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Succeed"},"data":{"properties":{"status":{"type":"string","example":"ok"},"supervisor":{"type":"string","example":"running"},"details":{"type":"string","nullable":true}},"type":"object"}},"type":"object"}}}},"500":{"description":"Supervisor unhealthy","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Internal server error"},"data":{"type":"object","nullable":true}},"type":"object"}}}}}}},"\/schedule\/healthcheck":{"get":{"tags":["Healthcheck"],"summary":"Schedule healthcheck","description":"Checks whether scheduler\/cron service is running.","operationId":"2b873539c485ea7292ea0e296bd80049","responses":{"200":{"description":"Scheduler healthy","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Succeed"},"data":{"properties":{"status":{"type":"string","example":"ok"},"scheduler":{"type":"string","example":"running"},"details":{"type":"string","nullable":true}},"type":"object"}},"type":"object"}}}},"500":{"description":"Scheduler unhealthy","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Internal server error"},"data":{"type":"object","nullable":true}},"type":"object"}}}}}}},"\/test\/log":{"get":{"tags":["Test"],"summary":"Test structured logging (INFO)","description":"Triggers a manual Log::info() with structured context to verify CloudWatch JSON formatting.","operationId":"f2f61a574fb0876990036021b9ea8d50","responses":{"200":{"description":"Log sent successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Log sent successfully"}},"type":"object"}}}}}}},"\/test\/log-error":{"get":{"tags":["Test"],"summary":"Test structured logging (ERROR)","description":"Triggers a manual Log::error() with structured context to verify CloudWatch JSON formatting.","operationId":"0fb6168ad6d18e75c94fef5ddcc5b50e","responses":{"200":{"description":"Log sent successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Log sent successfully"}},"type":"object"}}}}}}},"\/test\/exception\/base":{"get":{"tags":["Test"],"summary":"Test BaseException handling","description":"Throws a BaseException to verify JSON rendering and logging behavior (should NOT show stack trace in production).","operationId":"a07986fd9fcf77891e0f6f1650ac0678","responses":{"400":{"description":"BaseException triggered","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Test BaseException message"},"error":{"properties":{"key":{"type":"string","example":"auth.failed"},"content":{"type":"string","example":"Test BaseException message"}},"type":"object"}},"type":"object"}}}}}}},"\/test\/exception\/generic":{"get":{"tags":["Test"],"summary":"Test generic Exception handling","description":"Throws a generic Exception to verify 500 JSON rendering and logging behavior (should show full stack trace).","operationId":"2d51e5f727e95c4675b6b656381f4392","responses":{"500":{"description":"Internal Server Error","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Internal server error."}},"type":"object"}}}}}}}},"components":{"schemas":{"user":{"description":"User model","properties":{"id":{"description":"OpenAPI definition: root + components (schemas, security).","type":"integer","example":1},"name":{"type":"string","example":"John Doe"},"email":{"type":"string","format":"email","example":"john@example.com"},"email_verified_at":{"type":"string","format":"date-time","nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object"},"api_response":{"description":"Standard API response wrapper","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Succeed"},"data":{"description":"Response payload (object, array or null)"}},"type":"object"},"UnprocessableEntity":{"description":"Laravel validation error (HTTP 422)","properties":{"message":{"type":"string","example":"The given data was invalid."},"errors":{"description":"Field name to list of validation messages","type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"type":"object"},"paginated_response":{"description":"Paginator object (value of response.data for list endpoints)","properties":{"current_page":{"type":"integer","example":1},"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/user"}},"first_page_url":{"type":"string"},"from":{"type":"integer"},"last_page":{"type":"integer"},"last_page_url":{"type":"string"},"links":{"type":"array","items":{"type":"object"}},"next_page_url":{"type":"string","nullable":true},"path":{"type":"string"},"per_page":{"type":"integer","example":15},"prev_page_url":{"type":"string","nullable":true},"to":{"type":"integer"},"total":{"type":"integer"}},"type":"object"},"company":{"description":"Company model","properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Comedi Inc."},"furigana":{"type":"string","example":"\u30b3\u30e1\u30c7\u30a3"},"email":{"type":"string","format":"email","example":"contact@example.com"},"phone_number":{"type":"string","example":"08012345678"},"work_place":{"type":"string","example":"Tokyo"},"address":{"type":"string","example":"1-2-3 Shibuya"},"prefecture_id":{"type":"integer","example":13},"representative_name":{"type":"string","example":"Tanaka Taro"},"total_staff":{"type":"integer","example":20},"business_content":{"type":"string","example":"Software development"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object"},"CompanyUser":{"description":"Company user (login account linked to a company)","properties":{"id":{"type":"integer","example":1},"company_id":{"type":"integer","example":1},"type":{"description":"1=admin 2=branch","type":"integer","example":1},"status":{"description":"1=active 2=inactive","type":"integer","example":1},"name":{"type":"string","example":"ABC Clinic"},"email":{"type":"string","format":"email","example":"clinic@example.com"},"token_version":{"type":"integer","example":0},"phone_number":{"type":"string","example":"08012345678","nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object"},"FileUpload":{"description":"t_file_uploads: `path` is the S3 object key (persisted). `url` is a temporary presigned URL for S3 (fallback: public base + path if signing is unavailable).","properties":{"id":{"type":"integer","example":1},"path":{"description":"Object key on S3 (always stored)","type":"string","example":"uploads\/avatars\/abc.png"},"url":{"description":"Temporary presigned URL (TTL controlled by FILE_UPLOAD_PRESIGNED_TTL_MINUTES). Falls back to public base URL if signing is unavailable; null only when path\/base is missing.","type":"string","format":"uri","nullable":true},"name":{"type":"string","example":"photo.jpg"},"extension":{"type":"string","example":"jpg"}},"type":"object"},"CompanyBranch":{"description":"Company branch (t_company_branches)","properties":{"id":{"type":"integer","example":1},"company_id":{"type":"integer","example":1},"name":{"type":"string","example":"Shibuya Branch"},"prefecture_id":{"type":"integer","example":13,"nullable":true},"district_id":{"type":"integer","example":101,"nullable":true},"postal_code":{"type":"string","example":"1500002","nullable":true},"address_line":{"type":"string","nullable":true},"access_note":{"type":"string","nullable":true},"has_on_site_parking":{"type":"boolean","example":true},"commuting_note":{"type":"string","nullable":true},"responsible_person_name":{"type":"string","nullable":true},"face_photo_file_id":{"type":"integer","nullable":true},"face_photo_file":{"oneOf":[{"$ref":"#\/components\/schemas\/FileUpload"}],"nullable":true},"responsible_person_photo_file_id":{"type":"integer","nullable":true},"responsible_person_photo_file":{"oneOf":[{"$ref":"#\/components\/schemas\/FileUpload"}],"nullable":true},"greeting_message":{"type":"string","nullable":true},"worker_contact_name":{"type":"string","nullable":true},"worker_contact_photo_file_id":{"type":"integer","nullable":true},"worker_contact_photo_file":{"oneOf":[{"$ref":"#\/components\/schemas\/FileUpload"}],"nullable":true},"worker_contact_phone":{"type":"string","nullable":true},"emergency_contact":{"type":"string","nullable":true},"responsible_person_email":{"type":"string","format":"email","nullable":true},"first_confirmation_auto_message":{"type":"string","nullable":true},"facility_open_date":{"type":"string","format":"date","nullable":true},"unemployment_insurance_office_number":{"type":"string","nullable":true},"company_regions":{"description":"Company regions this branch belongs to (t_company_regions via pivot)","type":"array","items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"service_types":{"description":"Facility service categories (m_service_types via pivot)","type":"array","items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"travel_methods":{"description":"Commute options (m_travel_methods via pivot)","type":"array","items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object"},"BranchRole":{"description":"Branch role master (m_branch_roles)","properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Manager"},"description":{"type":"string","nullable":true},"created_at":{"type":"string","format":"date-time","nullable":true},"updated_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"},"BranchUserRole":{"description":"Pivot row (t_branch_user_roles) with nested role","properties":{"id":{"type":"integer","example":1},"branch_user_profile_id":{"type":"integer","example":1},"branch_role_id":{"type":"integer","example":1},"branch_role":{"$ref":"#\/components\/schemas\/BranchRole"}},"type":"object"},"CompanyRegion":{"description":"Company region (t_company_regions)","properties":{"id":{"type":"integer","example":1},"company_id":{"type":"integer","example":1},"name":{"type":"string","example":"Kanto"}},"type":"object"},"BranchUser":{"description":"Branch user profile (t_branch_user_profiles) with relations","properties":{"id":{"type":"integer","example":1},"company_id":{"type":"integer","example":1},"name":{"type":"string","example":"Yamada Taro"},"furigana":{"type":"string","nullable":true},"phone_number":{"type":"string","nullable":true},"company_user":{"description":"Login credentials (t_company_user)","properties":{"id":{"type":"integer"},"email":{"type":"string","format":"email"}},"type":"object","nullable":true},"branches":{"description":"Assigned branches (t_branch_user_branches pivot)","type":"array","items":{"$ref":"#\/components\/schemas\/CompanyBranch"}},"regions":{"description":"Assigned regions (t_branch_user_regions pivot)","type":"array","items":{"$ref":"#\/components\/schemas\/CompanyRegion"}},"branch_user_roles":{"type":"array","items":{"$ref":"#\/components\/schemas\/BranchUserRole"}},"created_at":{"type":"string","format":"date-time","nullable":true},"updated_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"},"Region":{"description":"Region master (m_regions)","properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Kanto"},"key":{"type":"string","example":"kanto"},"description":{"type":"string","example":"Kanto region of Japan","nullable":true}},"type":"object"}},"securitySchemes":{"bearerAuth":{"type":"http","description":"JWT access token (tymon\/jwt-auth); send as Authorization: Bearer <token>","bearerFormat":"JWT","scheme":"bearer"}}},"tags":[{"name":"Admin","description":"Authentication API"},{"name":"Healthcheck","description":"Healthcheck endpoints"},{"name":"Test","description":"Test endpoints for logging and exception handling"},{"name":"Admin Company","description":"Admin Company"},{"name":"Admin Salary Payment","description":"Admin Salary Payment"}]}