{"openapi":"3.1.0","info":{"title":"Pagar Desk API","version":"0.1.0"},"paths":{"/health":{"get":{"tags":["health"],"summary":"Liveness: the process is up","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Health Get"}}}}}}},"/health/ready":{"get":{"tags":["health"],"summary":"Readiness: the database answers","operationId":"ready_health_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Ready Health Ready Get"}}}}}}},"/api/v1/auth/otp/send":{"post":{"tags":["auth"],"summary":"Send a login / signup OTP to a mobile","operationId":"otp_send_api_v1_auth_otp_send_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OtpSendIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OtpSendOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/otp/verify":{"post":{"tags":["auth"],"summary":"Check the OTP: log in, or get a signup token for a new mobile","operationId":"otp_verify_api_v1_auth_otp_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OtpVerifyIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/signup":{"post":{"tags":["auth"],"summary":"Create the company and its owner (after OTP)","operationId":"signup_api_v1_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/password/login":{"post":{"tags":["auth"],"summary":"Log in with mobile and password","operationId":"password_login_api_v1_auth_password_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordLoginIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/password/reset":{"post":{"tags":["auth"],"summary":"Set a new password with an OTP, and log in","operationId":"password_reset_api_v1_auth_password_reset_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/refresh":{"post":{"tags":["auth"],"summary":"New access token from the refresh cookie (rotates the cookie)","operationId":"refresh_api_v1_auth_refresh_post","parameters":[{"name":"pd_refresh","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pd Refresh"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/logout":{"post":{"tags":["auth"],"summary":"Log out this browser","operationId":"logout_api_v1_auth_logout_post","parameters":[{"name":"pd_refresh","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pd Refresh"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me":{"get":{"tags":["auth"],"summary":"Who is logged in, their company and plan","operationId":"me_api_v1_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeOut"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/me/mobile/otp":{"post":{"tags":["auth"],"summary":"Send OTPs to the new and the current login mobile (step 1 of changing it)","operationId":"mobile_otp_api_v1_me_mobile_otp_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OtpSendIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileOtpOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/me/mobile":{"post":{"tags":["auth"],"summary":"Change the login mobile with both OTPs; ends every session","operationId":"change_mobile_api_v1_me_mobile_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileChangeIn"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/company":{"get":{"tags":["company"],"summary":"Company profile","operationId":"get_company_api_v1_company_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyOut"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["company"],"summary":"Update the company profile (send only the fields to change)","operationId":"patch_company_api_v1_company_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyPatch"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/company/settings":{"get":{"tags":["company"],"summary":"Company settings (defaults filled in)","operationId":"get_settings_api_v1_company_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanySettings-Output"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["company"],"summary":"Change some settings (send only the sections / keys to change)","operationId":"patch_settings_api_v1_company_settings_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanySettings-Input"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanySettings-Output"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/company/logo":{"get":{"tags":["company"],"summary":"The logo itself","operationId":"get_logo_api_v1_company_logo_get","responses":{"200":{"description":"Successful Response","content":{"image/jpeg":{},"image/png":{}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["company"],"summary":"Upload or replace the logo (JPEG / PNG, max 1 MB)","operationId":"put_logo_api_v1_company_logo_put","requestBody":{"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}},"required":true},"responses":{"204":{"description":"Successful Response"}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["company"],"summary":"Remove the logo","operationId":"delete_logo_api_v1_company_logo_delete","responses":{"204":{"description":"Successful Response"}},"security":[{"HTTPBearer":[]}]}},"/api/v1/branches":{"get":{"tags":["branches"],"summary":"List branches (optional name search `q`)","operationId":"list_branches_api_v1_branches_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BranchOut"},"title":"Response List Branches Api V1 Branches Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["branches"],"summary":"Add a branch","operationId":"create_branch_api_v1_branches_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/branches/{branch_id}":{"get":{"tags":["branches"],"summary":"One branch","operationId":"get_branch_api_v1_branches__branch_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"branch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["branches"],"summary":"Update a branch (send only the fields to change)","operationId":"patch_branch_api_v1_branches__branch_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"branch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Branch Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["branches"],"summary":"Delete a branch (kept for history, hidden)","operationId":"delete_branch_api_v1_branches__branch_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"branch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Branch Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/departments":{"get":{"tags":["departments"],"summary":"List departments (optional name search `q`)","operationId":"list_departments_api_v1_departments_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentOut"},"title":"Response List Departments Api V1 Departments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["departments"],"summary":"Add a department","operationId":"create_department_api_v1_departments_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepartmentIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepartmentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/departments/{department_id}":{"get":{"tags":["departments"],"summary":"One department","operationId":"get_department_api_v1_departments__department_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"department_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Department Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepartmentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["departments"],"summary":"Update a department (send only the fields to change)","operationId":"patch_department_api_v1_departments__department_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"department_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Department Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepartmentPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepartmentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["departments"],"summary":"Delete a department (kept for history, hidden)","operationId":"delete_department_api_v1_departments__department_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"department_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Department Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/shifts":{"get":{"tags":["shifts"],"summary":"List shifts with their slots","operationId":"list_shifts_api_v1_shifts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ShiftOut"},"type":"array","title":"Response List Shifts Api V1 Shifts Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["shifts"],"summary":"Add a shift","operationId":"create_shift_api_v1_shifts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShiftIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShiftOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/shifts/{shift_id}":{"get":{"tags":["shifts"],"summary":"One shift","operationId":"get_shift_api_v1_shifts__shift_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"shift_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Shift Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShiftOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["shifts"],"summary":"Update a shift (send only the fields to change; `slots` replaces all)","operationId":"patch_shift_api_v1_shifts__shift_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"shift_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Shift Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShiftPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShiftOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["shifts"],"summary":"Delete a shift (kept for history, hidden)","operationId":"delete_shift_api_v1_shifts__shift_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"shift_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Shift Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rule-sets":{"get":{"tags":["rule sets"],"summary":"List rule sets","operationId":"list_rule_sets_api_v1_rule_sets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RuleSetOut"},"type":"array","title":"Response List Rule Sets Api V1 Rule Sets Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["rule sets"],"summary":"Add a rule set (policies left out get their defaults)","operationId":"create_rule_set_api_v1_rule_sets_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleSetIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleSetOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/rule-sets/{rule_set_id}":{"get":{"tags":["rule sets"],"summary":"One rule set","operationId":"get_rule_set_api_v1_rule_sets__rule_set_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rule_set_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Set Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleSetOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["rule sets"],"summary":"Update a rule set (`policies` is merged into the stored ones)","operationId":"patch_rule_set_api_v1_rule_sets__rule_set_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rule_set_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Set Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleSetPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleSetOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["rule sets"],"summary":"Delete a rule set (kept for history, hidden)","operationId":"delete_rule_set_api_v1_rule_sets__rule_set_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rule_set_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Set Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rosters/days":{"get":{"tags":["rosters"],"summary":"Roster day and timing: everyone on a date, or one employee for a month","operationId":"roster_days_api_v1_rosters_days_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"work_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Work Date"}},{"name":"employee_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Employee Id"}},{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Month"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Branch Id"}},{"name":"department_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Department Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterDaysOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["rosters"],"summary":"Set or clear day type and timing for many employee-dates, all or nothing","operationId":"save_roster_days_api_v1_rosters_days_put","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterDaysSaveIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterSaveOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rosters":{"get":{"tags":["rosters"],"summary":"Roster grid: employees x dates (at most 31) with the rostered and the normal shift","operationId":"roster_grid_api_v1_rosters_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"from_date","in":"query","required":true,"schema":{"type":"string","format":"date","title":"From Date"}},{"name":"to_date","in":"query","required":true,"schema":{"type":"string","format":"date","title":"To Date"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Branch Id"}},{"name":"department_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Department Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterGrid"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["rosters"],"summary":"Set or clear many roster cells (max 31 days x 500 employees), all or nothing","operationId":"save_roster_api_v1_rosters_put","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterSaveIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterSaveOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rosters/export":{"get":{"tags":["rosters"],"summary":"Excel of the roster for the dates and filters (also the import sample)","operationId":"export_roster_api_v1_rosters_export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"from_date","in":"query","required":true,"schema":{"type":"string","format":"date","title":"From Date"}},{"name":"to_date","in":"query","required":true,"schema":{"type":"string","format":"date","title":"To Date"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Branch Id"}},{"name":"department_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Department Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rosters/import/check":{"post":{"tags":["rosters"],"summary":"Check a roster file (.xlsx body, max 2 MB, 500 rows); saves nothing","operationId":"roster_import_check_api_v1_rosters_import_check_post","requestBody":{"content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterImportCheck"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/rosters/import":{"post":{"tags":["rosters"],"summary":"Import a roster file: checks it again, then saves every change or none","operationId":"roster_import_api_v1_rosters_import_post","requestBody":{"content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterSaveOut"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/holidays":{"get":{"tags":["calendar"],"summary":"Public holidays, oldest first","operationId":"list_holidays_api_v1_holidays_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":2100,"minimum":2000},{"type":"null"}],"description":"Only this year","title":"Year"},"description":"Only this year"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/HolidayOut"},"title":"Response List Holidays Api V1 Holidays Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["calendar"],"summary":"Add a public holiday","operationId":"create_holiday_api_v1_holidays_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HolidayIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HolidayOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/holidays/import/sample":{"get":{"tags":["calendar"],"summary":"Sample Excel for a holiday import: Date, Name, Branches, Departments","operationId":"holiday_import_sample_api_v1_holidays_import_sample_get","responses":{"200":{"description":"Successful Response","content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/holidays/import/check":{"post":{"tags":["calendar"],"summary":"Check a holiday file (.xlsx body, max 2 MB, 500 rows); saves nothing","operationId":"holiday_import_check_api_v1_holidays_import_check_post","requestBody":{"content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HolidayImportCheck"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/holidays/import":{"post":{"tags":["calendar"],"summary":"Import a holiday file: checks it again, then adds every new holiday or none","operationId":"holiday_import_save_api_v1_holidays_import_post","requestBody":{"content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HolidayImportOut"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/holidays/{holiday_id}":{"get":{"tags":["calendar"],"summary":"One public holiday","operationId":"get_holiday_api_v1_holidays__holiday_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"holiday_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Holiday Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HolidayOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["calendar"],"summary":"Update a public holiday (send only the fields to change)","operationId":"patch_holiday_api_v1_holidays__holiday_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"holiday_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Holiday Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HolidayPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HolidayOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["calendar"],"summary":"Delete a public holiday","operationId":"delete_holiday_api_v1_holidays__holiday_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"holiday_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Holiday Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/exception-days":{"get":{"tags":["calendar"],"summary":"Exception days (one-date changes to the normal schedule)","operationId":"list_exception_days_api_v1_exception_days_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":2100,"minimum":2000},{"type":"null"}],"description":"Only this year","title":"Year"},"description":"Only this year"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExceptionDayOut"},"title":"Response List Exception Days Api V1 Exception Days Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["calendar"],"summary":"Add an exception day","operationId":"create_exception_day_api_v1_exception_days_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionDayIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionDayOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/exception-days/{exception_id}":{"get":{"tags":["calendar"],"summary":"One exception day","operationId":"get_exception_day_api_v1_exception_days__exception_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"exception_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Exception Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionDayOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["calendar"],"summary":"Update an exception day (only the fields to change)","operationId":"patch_exception_day_api_v1_exception_days__exception_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"exception_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Exception Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionDayPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionDayOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["calendar"],"summary":"Delete an exception day","operationId":"delete_exception_day_api_v1_exception_days__exception_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"exception_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Exception Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/employees":{"get":{"tags":["employees"],"summary":"List employees (filters, search `q` on name / code / mobile, paged)","operationId":"list_employees_api_v1_employees_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"enum":["active","inactive","all"],"type":"string","default":"active","title":"Status"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Branch Id"}},{"name":"department_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Department Id"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["employees"],"summary":"Add an employee (optional first shift / rule set from joining)","operationId":"create_employee_api_v1_employees_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/employees/export":{"get":{"tags":["employees"],"summary":"Excel of the employees matching the list filters","operationId":"export_employees_api_v1_employees_export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"enum":["active","inactive","all"],"type":"string","default":"active","title":"Status"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Branch Id"}},{"name":"department_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Department Id"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/employees/import/sample":{"get":{"tags":["employees"],"summary":"Sample import file: the column names and one example row","operationId":"import_sample_api_v1_employees_import_sample_get","responses":{"200":{"description":"Successful Response","content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/employees/import/check":{"post":{"tags":["employees"],"summary":"Check an import file (.xlsx body, max 2 MB, 500 rows); saves nothing","operationId":"import_check_api_v1_employees_import_check_post","requestBody":{"content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeImportCheck"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/employees/import":{"post":{"tags":["employees"],"summary":"Import an .xlsx file: checks it again, then adds every row or none","operationId":"import_employees_api_v1_employees_import_post","requestBody":{"content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeImportDone"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/employees/bulk-update":{"post":{"tags":["employees"],"summary":"Change one field for up to 500 employees (all or nothing; dry_run only counts)","operationId":"bulk_update_api_v1_employees_bulk_update_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeBulkIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeBulkOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/employees/with-photo":{"get":{"tags":["employees"],"summary":"Ids of the employees that have a photo (the panel shows it instead of initials)","operationId":"with_photo_api_v1_employees_with_photo_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Response With Photo Api V1 Employees With Photo Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/employees/deleted":{"get":{"tags":["employees"],"summary":"Deleted employees (Settings → Data check), newest first","operationId":"deleted_employees_api_v1_employees_deleted_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DeletedEmployee"},"type":"array","title":"Response Deleted Employees Api V1 Employees Deleted Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/employees/celebrations":{"get":{"tags":["employees"],"summary":"Birthdays and anniversaries on a date (default today)","operationId":"list_celebrations_api_v1_employees_celebrations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"on","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"On"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Celebration"},"title":"Response List Celebrations Api V1 Employees Celebrations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/employees/{employee_id}":{"get":{"tags":["employees"],"summary":"One employee with profile and current shift / rule set","operationId":"get_employee_api_v1_employees__employee_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["employees"],"summary":"Update an employee (send only the fields to change)","operationId":"patch_employee_api_v1_employees__employee_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeePatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["employees"],"summary":"Delete an employee (kept for history, hidden)","operationId":"delete_employee_api_v1_employees__employee_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/employees/{employee_id}/deactivate":{"post":{"tags":["employees"],"summary":"Mark inactive from a leaving date","operationId":"deactivate_employee_api_v1_employees__employee_id__deactivate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeactivateIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/employees/{employee_id}/activate":{"post":{"tags":["employees"],"summary":"Mark active again (checks the plan limit)","operationId":"activate_employee_api_v1_employees__employee_id__activate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/employees/{employee_id}/profile":{"get":{"tags":["employees"],"summary":"Personal details (all empty until saved)","operationId":"get_profile_api_v1_employees__employee_id__profile_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["employees"],"summary":"Save the whole profile (fields left out become empty)","operationId":"put_profile_api_v1_employees__employee_id__profile_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/employees/{employee_id}/assignments":{"get":{"tags":["employees"],"summary":"Shift / rule set history, newest first","operationId":"list_assignments_api_v1_employees__employee_id__assignments_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssignmentOut"},"title":"Response List Assignments Api V1 Employees  Employee Id  Assignments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["employees"],"summary":"Change shift / rule set from a date","operationId":"add_assignment_api_v1_employees__employee_id__assignments_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignmentIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignmentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/employees/{employee_id}/photo":{"put":{"tags":["employees"],"summary":"Upload or replace the photo (JPEG / PNG body, max 2 MB)","operationId":"put_photo_api_v1_employees__employee_id__photo_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"get":{"tags":["employees"],"summary":"The photo itself","operationId":"get_photo_api_v1_employees__employee_id__photo_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}}],"responses":{"200":{"description":"Successful Response","content":{"image/jpeg":{},"image/png":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["employees"],"summary":"Remove the photo","operationId":"delete_photo_api_v1_employees__employee_id__photo_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/employees/{employee_id}/attachments":{"get":{"tags":["employees"],"summary":"Attachments, newest first","operationId":"list_attachments_api_v1_employees__employee_id__attachments_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeAttachmentOut"},"title":"Response List Attachments Api V1 Employees  Employee Id  Attachments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["employees"],"summary":"Add an attachment (PDF / JPEG / PNG body, max 5 MB, 10 per employee)","operationId":"add_attachment_api_v1_employees__employee_id__attachments_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}},{"name":"title","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":100,"title":"Title"}},{"name":"file_name","in":"query","required":false,"schema":{"type":"string","maxLength":255,"default":"","title":"File Name"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeAttachmentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}}},"/api/v1/employees/{employee_id}/attachments/{attachment_id}/file":{"get":{"tags":["employees"],"summary":"Download an attachment (always as a download, never shown inline)","operationId":"download_attachment_api_v1_employees__employee_id__attachments__attachment_id__file_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}},{"name":"attachment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Attachment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/pdf":{},"image/jpeg":{},"image/png":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/employees/{employee_id}/attachments/{attachment_id}":{"delete":{"tags":["employees"],"summary":"Delete an attachment and its file","operationId":"delete_attachment_api_v1_employees__employee_id__attachments__attachment_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}},{"name":"attachment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Attachment Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/leave-types":{"get":{"tags":["leave"],"summary":"Leave types (Casual, Sick ... and the built-in Unpaid Leave)","operationId":"list_types_api_v1_leave_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/LeaveTypeOut"},"type":"array","title":"Response List Types Api V1 Leave Types Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["leave"],"summary":"Add a leave type","operationId":"create_type_api_v1_leave_types_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaveTypeIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaveTypeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/leave-types/{type_id}":{"patch":{"tags":["leave"],"summary":"Update a leave type (send only the fields to change)","operationId":"patch_type_api_v1_leave_types__type_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"type_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Type Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaveTypePatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaveTypeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["leave"],"summary":"Delete a leave type not used in a template","operationId":"delete_type_api_v1_leave_types__type_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"type_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Type Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/leave-templates":{"get":{"tags":["leave"],"summary":"Leave templates with their leave rows","operationId":"list_templates_api_v1_leave_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/LeaveTemplateOut"},"type":"array","title":"Response List Templates Api V1 Leave Templates Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["leave"],"summary":"Add a leave template","operationId":"create_template_api_v1_leave_templates_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaveTemplateIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaveTemplateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/leave-templates/{template_id}":{"get":{"tags":["leave"],"summary":"One leave template","operationId":"get_template_api_v1_leave_templates__template_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaveTemplateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["leave"],"summary":"Update a leave template; `items` replaces all rows","operationId":"patch_template_api_v1_leave_templates__template_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaveTemplatePatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaveTemplateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["leave"],"summary":"Delete a leave template","operationId":"delete_template_api_v1_leave_templates__template_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/employees/{employee_id}/leave-balance":{"get":{"tags":["leave"],"summary":"Days left per paid leave type","operationId":"leave_balance_api_v1_employees__employee_id__leave_balance_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BalanceOut"},"title":"Response Leave Balance Api V1 Employees  Employee Id  Leave Balance Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/employees/{employee_id}/leave-ledger":{"get":{"tags":["leave"],"summary":"Leave credits and debits, newest first","operationId":"leave_ledger_api_v1_employees__employee_id__leave_ledger_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LedgerOut"},"title":"Response Leave Ledger Api V1 Employees  Employee Id  Leave Ledger Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["leave"],"summary":"Add or remove leave days by hand","operationId":"adjust_leave_api_v1_employees__employee_id__leave_ledger_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/leave-requests":{"get":{"tags":["leave"],"summary":"Leave of all staff, newest first (filters: status, employee, dates)","operationId":"list_requests_api_v1_leave_requests_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["pending","approved","rejected","cancelled"],"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"employee_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Employee Id"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"To Date"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaveRequestList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["leave"],"summary":"Enter leave for an employee (approved at once)","operationId":"create_request_api_v1_leave_requests_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaveRequestIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaveRequestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/leave-requests/import/sample":{"get":{"tags":["leave"],"summary":"Sample Excel for a leave import: Code, Name, Leave type, From date, To date, Half day, Reason","operationId":"leave_import_sample_api_v1_leave_requests_import_sample_get","responses":{"200":{"description":"Successful Response","content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/leave-requests/import/check":{"post":{"tags":["leave"],"summary":"Check a leave file (.xlsx body, max 2 MB, 500 rows): every leave rule, nothing saved","operationId":"leave_import_check_api_v1_leave_requests_import_check_post","requestBody":{"content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaveImportCheck"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/leave-requests/import":{"post":{"tags":["leave"],"summary":"Import a leave file: every row approved at once, or nothing saved","operationId":"leave_import_save_api_v1_leave_requests_import_post","requestBody":{"content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaveImportOut"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/leave-requests/{request_id}/{action}":{"post":{"tags":["leave"],"summary":"approve | reject | cancel a leave","operationId":"decide_request_api_v1_leave_requests__request_id___action__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Request Id"}},{"name":"action","in":"path","required":true,"schema":{"enum":["approve","reject","cancel"],"type":"string","title":"Action"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaveDecisionIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaveRequestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/salary-templates":{"get":{"tags":["payroll"],"summary":"Salary templates","operationId":"list_templates_api_v1_salary_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SalaryTemplateOut"},"type":"array","title":"Response List Templates Api V1 Salary Templates Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["payroll"],"summary":"Add a salary template","operationId":"create_template_api_v1_salary_templates_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalaryTemplateIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalaryTemplateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/salary-templates/{template_id}":{"patch":{"tags":["payroll"],"summary":"Change a salary template (send only the fields to change)","operationId":"patch_template_api_v1_salary_templates__template_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalaryTemplatePatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalaryTemplateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["payroll"],"summary":"Delete a template (kept, hidden)","operationId":"delete_template_api_v1_salary_templates__template_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/employees/{employee_id}/salary":{"get":{"tags":["payroll"],"summary":"An employee's salary history, newest first","operationId":"list_salary_api_v1_employees__employee_id__salary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeSalaryOut"},"title":"Response List Salary Api V1 Employees  Employee Id  Salary Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["payroll"],"summary":"Set the salary from a date (same date: replaced)","operationId":"set_salary_api_v1_employees__employee_id__salary_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeSalaryIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeSalaryOut"},"title":"Response Set Salary Api V1 Employees  Employee Id  Salary Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/employees/{employee_id}/salary/{salary_id}":{"delete":{"tags":["payroll"],"summary":"Remove a salary row","operationId":"delete_salary_api_v1_employees__employee_id__salary__salary_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}},{"name":"salary_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Salary Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/employees/{employee_id}/compliance":{"get":{"tags":["payroll"],"summary":"PF / ESI / UAN / PAN / Aadhaar, last 4 shown","operationId":"get_compliance_api_v1_employees__employee_id__compliance_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["payroll"],"summary":"Set numbers (\"\" clears one, left out keeps it)","operationId":"set_compliance_api_v1_employees__employee_id__compliance_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/salary-bulk":{"post":{"tags":["payroll"],"summary":"The same salary for up to 500 employees (all or nothing)","operationId":"bulk_salary_api_v1_salary_bulk_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalaryBulkIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalaryBulkOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/salary-import/sample":{"get":{"tags":["payroll"],"summary":"Sample Excel for a salary import: the column names and two example rows","operationId":"salary_import_sample_api_v1_salary_import_sample_get","responses":{"200":{"description":"Successful Response","content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/salary-import/check":{"post":{"tags":["payroll"],"summary":"Check a salary file (.xlsx body, max 2 MB, 500 rows): every salary rule, nothing saved","operationId":"salary_import_check_api_v1_salary_import_check_post","requestBody":{"content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalaryImportCheck"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/salary-import":{"post":{"tags":["payroll"],"summary":"Import a salary file: every row saved, or nothing","operationId":"salary_import_save_api_v1_salary_import_post","requestBody":{"content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalaryImportOut"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/employees/{employee_id}/salary/preview":{"get":{"tags":["payroll"],"summary":"Net pay and CTC of the salary in force for a month with full attendance; null without a salary","operationId":"salary_preview_api_v1_employees__employee_id__salary_preview_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PayslipOut"},{"type":"null"}],"title":"Response Salary Preview Api V1 Employees  Employee Id  Salary Preview Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/attendance/day":{"get":{"tags":["attendance"],"summary":"All employees for one date, with counts (date default today)","operationId":"day_view_api_v1_attendance_day_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"YYYY-MM-DD, default today","title":"Date"},"description":"YYYY-MM-DD, default today"},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Branch Id"}},{"name":"department_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Department Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["present","absent","half_day","leave","half_leave","holiday","weekly_off","miss_punch","not_in","late","early"],"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttendanceDayList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/attendance/register":{"get":{"tags":["attendance"],"summary":"Month grid: one row per employee, one cell per day up to today","operationId":"register_api_v1_attendance_register_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},{"type":"null"}],"description":"YYYY-MM, default the current month","title":"Month"},"description":"YYYY-MM, default the current month"},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Branch Id"}},{"name":"department_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Department Id"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttendanceRegister"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/attendance/employees/{employee_id}":{"get":{"tags":["attendance"],"summary":"One employee's month, day by day (employee wise)","operationId":"employee_month_api_v1_attendance_employees__employee_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}},{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},{"type":"null"}],"description":"YYYY-MM, default the current month","title":"Month"},"description":"YYYY-MM, default the current month"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttendanceEmployeeMonth"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/attendance/employees/{employee_id}/days/{work_date}":{"get":{"tags":["attendance"],"summary":"One day with every punch (View logs)","operationId":"day_detail_api_v1_attendance_employees__employee_id__days__work_date__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}},{"name":"work_date","in":"path","required":true,"schema":{"type":"string","format":"date","title":"Work Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttendanceDayDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/attendance/employees/{employee_id}/days/{work_date}/override":{"put":{"tags":["attendance"],"summary":"Set the day's status by hand","operationId":"set_override_api_v1_attendance_employees__employee_id__days__work_date__override_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}},{"name":"work_date","in":"path","required":true,"schema":{"type":"string","format":"date","title":"Work Date"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttendanceOverrideIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttendanceDayItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["attendance"],"summary":"Back to the computed status","operationId":"clear_override_api_v1_attendance_employees__employee_id__days__work_date__override_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}},{"name":"work_date","in":"path","required":true,"schema":{"type":"string","format":"date","title":"Work Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttendanceDayItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/attendance/days/{work_date}/override":{"post":{"tags":["attendance"],"summary":"Mark all: set one status for many employees","operationId":"bulk_override_api_v1_attendance_days__work_date__override_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"work_date","in":"path","required":true,"schema":{"type":"string","format":"date","title":"Work Date"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttendanceBulkOverrideIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttendanceBulkOverrideOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/attendance/punches/latest":{"get":{"tags":["attendance"],"summary":"The newest punches of the last two days (dashboard)","operationId":"latest_punches_api_v1_attendance_punches_latest_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Branch Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":8,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LatestPunch"},"title":"Response Latest Punches Api V1 Attendance Punches Latest Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/attendance/punches":{"post":{"tags":["attendance"],"summary":"Add a punch by hand (no time zone = company time)","operationId":"add_punch_api_v1_attendance_punches_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PunchIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PunchOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/attendance/punches/import/sample":{"get":{"tags":["attendance"],"summary":"Sample Excel for a punch import: Code, Name, Date, In, Out ...","operationId":"punch_import_sample_api_v1_attendance_punches_import_sample_get","responses":{"200":{"description":"Successful Response","content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/attendance/punches/import/check":{"post":{"tags":["attendance"],"summary":"Check a punch file (.xlsx body, max 2 MB, 500 rows, 31 days); saves nothing","operationId":"punch_import_check_api_v1_attendance_punches_import_check_post","requestBody":{"content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PunchImportCheck"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/attendance/punches/import":{"post":{"tags":["attendance"],"summary":"Import a punch file: checks it again, then saves every punch or none","operationId":"punch_import_save_api_v1_attendance_punches_import_post","requestBody":{"content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PunchImportOut"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/attendance/punches/{punch_id}/accept":{"post":{"tags":["attendance"],"summary":"Accept a staff-app punch that waits for approval","operationId":"accept_punch_api_v1_attendance_punches__punch_id__accept_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"punch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Punch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PunchOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/attendance/punches/{punch_id}/reject":{"post":{"tags":["attendance"],"summary":"Reject a wrong punch (kept, no longer counted)","operationId":"reject_punch_api_v1_attendance_punches__punch_id__reject_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"punch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Punch Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PunchRejectIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PunchOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/attendance/locks":{"get":{"tags":["attendance"],"summary":"Locked months, newest first","operationId":"list_locks_api_v1_attendance_locks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MonthLockOut"},"type":"array","title":"Response List Locks Api V1 Attendance Locks Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["attendance"],"summary":"Lock a month that has ended (no more changes)","operationId":"lock_month_api_v1_attendance_locks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonthLockIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonthLockOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/attendance/locks/{month}":{"delete":{"tags":["attendance"],"summary":"Unlock a month (owner only)","operationId":"unlock_month_api_v1_attendance_locks__month__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"month","in":"path","required":true,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","title":"Month"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reports":{"get":{"tags":["reports"],"summary":"The list of reports","operationId":"catalogue_api_v1_reports_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ReportInfo"},"type":"array","title":"Response Catalogue Api V1 Reports Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/reports/{key}":{"get":{"tags":["reports"],"summary":"One report as a table (JSON) or an Excel file (format=xlsx)","operationId":"report_api_v1_reports__key__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"from_date","in":"query","required":true,"schema":{"type":"string","format":"date","title":"From Date"}},{"name":"to_date","in":"query","required":true,"schema":{"type":"string","format":"date","title":"To Date"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Branch Id"}},{"name":"department_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Department Id"}},{"name":"employee_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Employee Id"}},{"name":"order_by","in":"query","required":false,"schema":{"enum":["code","name","department"],"type":"string","default":"code","title":"Order By"}},{"name":"format","in":"query","required":false,"schema":{"enum":["json","xlsx"],"type":"string","default":"json","title":"Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportOut"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/devices/setup":{"get":{"tags":["devices"],"summary":"What to type into the machine so it sends punches here","operationId":"device_setup_api_v1_devices_setup_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceSetup"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/devices/pins":{"get":{"tags":["devices"],"summary":"Employees with their machine ID (search `q` on name / code / ID)","operationId":"list_pins_api_v1_devices_pins_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevicePinList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/devices/unmatched":{"get":{"tags":["devices"],"summary":"Punches from machine IDs nobody is linked to, by ID","operationId":"list_unmatched_api_v1_devices_unmatched_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DeviceUnmatchedGroup"},"type":"array","title":"Response List Unmatched Api V1 Devices Unmatched Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/devices/unmatched/link":{"post":{"tags":["devices"],"summary":"Give an employee this machine ID and import its punches","operationId":"link_unmatched_api_v1_devices_unmatched_link_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceLinkIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceLinkOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/devices/unmatched/{pin}":{"delete":{"tags":["devices"],"summary":"Discard the waiting punches of an ID","operationId":"discard_unmatched_api_v1_devices_unmatched__pin__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"pin","in":"path","required":true,"schema":{"type":"string","title":"Pin"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/devices":{"get":{"tags":["devices"],"summary":"List machines","operationId":"list_devices_api_v1_devices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DeviceOut"},"type":"array","title":"Response List Devices Api V1 Devices Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["devices"],"summary":"Add a machine (by its serial number)","operationId":"create_device_api_v1_devices_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/devices/{device_id}":{"get":{"tags":["devices"],"summary":"One machine","operationId":"get_device_api_v1_devices__device_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Device Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["devices"],"summary":"Update a machine (send only the fields to change)","operationId":"patch_device_api_v1_devices__device_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Device Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevicePatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["devices"],"summary":"Remove a machine (its punches stay)","operationId":"delete_device_api_v1_devices__device_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Device Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/devices/{device_id}/new-key":{"post":{"tags":["devices"],"summary":"Hikvision: a new secret address; the old one stops","operationId":"new_device_key_api_v1_devices__device_id__new_key_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Device Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/employees/{employee_id}/device-pin":{"put":{"tags":["devices"],"summary":"Set the employee's machine ID; imports waiting punches","operationId":"put_pin_api_v1_employees__employee_id__device_pin_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevicePinIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevicePinOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["devices"],"summary":"Remove the machine ID","operationId":"delete_pin_api_v1_employees__employee_id__device_pin_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/employees/{employee_id}/machines":{"get":{"tags":["devices"],"summary":"The company's machines and this employee's last command","operationId":"employee_machines_api_v1_employees__employee_id__machines_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeMachinesOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/employees/{employee_id}/machine-commands":{"post":{"tags":["devices"],"summary":"Add (push) or remove the employee on an eSSL / ZKTeco machine (runs at its next call)","operationId":"queue_machine_command_api_v1_employees__employee_id__machine_commands_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineCommandIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeMachinesOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/plans":{"get":{"tags":["billing"],"summary":"Plans shown to customers, cheapest first (no login needed)","operationId":"public_plans_api_v1_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PublicPlanOut"},"type":"array","title":"Response Public Plans Api V1 Plans Get"}}}}}}},"/api/v1/billing":{"get":{"tags":["billing"],"summary":"Plan, staff used, prices, what can be bought, last payments","operationId":"get_billing_api_v1_billing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingOut"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/billing/quote":{"post":{"tags":["billing"],"summary":"What a purchase will cost (nothing is created)","operationId":"quote_api_v1_billing_quote_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingQuoteIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingQuoteOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/billing/orders":{"post":{"tags":["billing"],"summary":"Create the Razorpay order to pay now","operationId":"create_order_api_v1_billing_orders_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingQuoteIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingOrderOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/billing/orders/verify":{"post":{"tags":["billing"],"summary":"Confirm a payment after Razorpay Checkout","operationId":"verify_api_v1_billing_orders_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingVerifyIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/billing/invoices":{"get":{"tags":["billing"],"summary":"GST invoices of the company, newest first","operationId":"list_invoices_api_v1_billing_invoices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/InvoiceBriefOut"},"type":"array","title":"Response List Invoices Api V1 Billing Invoices Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/billing/invoices/{invoice_id}":{"get":{"tags":["billing"],"summary":"One GST invoice (an unchangeable snapshot)","operationId":"get_invoice_api_v1_billing_invoices__invoice_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invoice Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/notifications":{"get":{"tags":["notifications"],"summary":"Notifications of the company, newest first, with my read flag and the channels","operationId":"list_notifications_api_v1_notifications_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Before"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NotificationOut"},"title":"Response List Notifications Api V1 Notifications Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/notifications/unread-count":{"get":{"tags":["notifications"],"summary":"How many notifications I have not read","operationId":"unread_count_api_v1_notifications_unread_count_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationUnread"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/notifications/read":{"post":{"tags":["notifications"],"summary":"Mark notifications read for me (the ids, or all: true)","operationId":"mark_read_api_v1_notifications_read_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationReadIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationReadOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/console/auth/login":{"post":{"tags":["console"],"summary":"Staff step 1: mobile + password; sends an OTP to the mobile","operationId":"login_api_v1_console_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffLoginIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffLoginOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/console/auth/verify":{"post":{"tags":["console"],"summary":"Staff step 2: the OTP; starts a 12-hour console session","operationId":"verify_api_v1_console_auth_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffVerifyIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffSessionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/console/auth/refresh":{"post":{"tags":["console"],"summary":"New staff access token from the staff refresh cookie","operationId":"refresh_api_v1_console_auth_refresh_post","parameters":[{"name":"pd_staff_refresh","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pd Staff Refresh"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffSessionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/console/auth/logout":{"post":{"tags":["console"],"summary":"End this console session","operationId":"logout_api_v1_console_auth_logout_post","parameters":[{"name":"pd_staff_refresh","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pd Staff Refresh"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/console/me":{"get":{"tags":["console"],"summary":"The logged-in staff user and what they may do","operationId":"me_api_v1_console_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffMeOut"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/console/companies":{"get":{"tags":["console"],"summary":"All companies, newest first (search name / owner mobile / id)","operationId":"list_companies_api_v1_console_companies_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":100,"default":"","title":"Q"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsoleCompanyPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/console/companies/{company_id}":{"get":{"tags":["console"],"summary":"One company: profile, plan, payments, invoices (audited)","operationId":"company_detail_api_v1_console_companies__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsoleCompanyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/console/companies/{company_id}/extend-trial":{"post":{"tags":["console"],"summary":"Move the trial end date","operationId":"extend_trial_api_v1_console_companies__company_id__extend_trial_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendTrialIn"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/console/companies/{company_id}/plan":{"post":{"tags":["console"],"summary":"Change plan / limits (no money)","operationId":"change_plan_api_v1_console_companies__company_id__plan_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyPlanIn"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/console/companies/{company_id}/close":{"post":{"tags":["console"],"summary":"Close: nobody of it can log in","operationId":"close_company_api_v1_console_companies__company_id__close_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReasonIn"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/console/companies/{company_id}/reopen":{"post":{"tags":["console"],"summary":"Reopen a closed company","operationId":"reopen_company_api_v1_console_companies__company_id__reopen_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReasonIn"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/console/companies/{company_id}/payments/quote":{"post":{"tags":["console"],"summary":"Price of a purchase (nothing is saved)","operationId":"payment_quote_api_v1_console_companies__company_id__payments_quote_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingQuoteIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingQuoteOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/console/companies/{company_id}/payments":{"post":{"tags":["console"],"summary":"Record a bank transfer (same UTR again: no-op)","operationId":"manual_payment_api_v1_console_companies__company_id__payments_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualPaymentIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsolePaymentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/console/companies/{company_id}/open-panel":{"post":{"tags":["console"],"summary":"A 15-minute read-only token for its panel","operationId":"open_panel_api_v1_console_companies__company_id__open_panel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReasonIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/console/staff":{"get":{"tags":["console"],"summary":"Staff users","operationId":"list_staff_api_v1_console_staff_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/StaffOut"},"type":"array","title":"Response List Staff Api V1 Console Staff Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["console"],"summary":"Add a staff user (never a super admin)","operationId":"create_staff_api_v1_console_staff_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/console/staff/{staff_id}":{"patch":{"tags":["console"],"summary":"Change name, email, permissions or status","operationId":"update_staff_api_v1_console_staff__staff_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"staff_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Staff Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/console/staff/{staff_id}/password":{"post":{"tags":["console"],"summary":"Set a new password; ends their sessions","operationId":"set_password_api_v1_console_staff__staff_id__password_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"staff_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Staff Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffPasswordIn"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/console/audit":{"get":{"tags":["console"],"summary":"Staff audit log, newest first (filter by staff user and company)","operationId":"audit_api_v1_console_audit_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"staff_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Staff Id"}},{"name":"company_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Company Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StaffAuditOut"},"title":"Response Audit Api V1 Console Audit Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/console/plans":{"get":{"tags":["console"],"summary":"Every plan (also switched off) and the features a plan can tick","operationId":"list_plans_api_v1_console_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsolePlansOut"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["console"],"summary":"Add a plan (its code never changes)","operationId":"create_plan_api_v1_console_plans_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsolePlanIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsolePlanOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/console/plans/{plan_id}":{"patch":{"tags":["console"],"summary":"Change a plan: price, limits, features, shown / on / trial plan","operationId":"update_plan_api_v1_console_plans__plan_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plan Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsolePlanPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsolePlanOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/lens/link/otp":{"post":{"tags":["lens"],"summary":"Send the OTP that links a phone (to an admin's mobile)","operationId":"link_otp_api_v1_lens_link_otp_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OtpSendIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OtpSendOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/lens/link/verify":{"post":{"tags":["lens"],"summary":"Check the OTP: the company, its branches and a 15-minute link token","operationId":"link_verify_api_v1_lens_link_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LensVerifyIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LensVerifyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/lens/link":{"post":{"tags":["lens"],"summary":"Name the phone and link it: returns its device token","operationId":"link_api_v1_lens_link_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LensDeviceIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LensLinked"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/lens/me":{"get":{"tags":["lens"],"summary":"This phone: company, name, branch (401 once it is removed)","operationId":"me_api_v1_lens_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LensMe"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["lens"],"summary":"Unlink this phone","operationId":"unlink_api_v1_lens_me_delete","responses":{"204":{"description":"Successful Response"}},"security":[{"HTTPBearer":[]}]}},"/api/v1/lens/admin":{"post":{"tags":["lens"],"summary":"Check the phone's admin PIN: a 15-minute token for face registration","operationId":"admin_login_api_v1_lens_admin_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LensAdminIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LensAdminOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/lens/pin":{"put":{"tags":["lens"],"summary":"Change the phone's admin PIN: old admin tokens stop, a new one is returned","operationId":"set_pin_api_v1_lens_pin_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LensPinIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LensAdminOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/lens/staff":{"get":{"tags":["lens"],"summary":"Active staff and whether their face is registered","operationId":"staff_api_v1_lens_staff_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/LensStaff"},"type":"array","title":"Response Staff Api V1 Lens Staff Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/lens/staff/{employee_id}/face":{"put":{"tags":["lens"],"summary":"Register (replace) an employee's face","operationId":"put_face_api_v1_lens_staff__employee_id__face_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LensFaceIn"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/lens/punch":{"post":{"tags":["lens"],"summary":"Punch by face: the server finds the employee and stores the punch","operationId":"punch_api_v1_lens_punch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LensPunchIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LensPunchOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/lens/devices":{"get":{"tags":["lens"],"summary":"Admin: the company's linked Lens phones","operationId":"list_devices_api_v1_lens_devices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/LensDeviceOut"},"type":"array","title":"Response List Devices Api V1 Lens Devices Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/lens/punches":{"get":{"tags":["lens"],"summary":"Admin: face punches of the last `days` days (max 300), newest first","operationId":"recent_punches_api_v1_lens_punches_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":31,"minimum":1,"default":7,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LensPunchItem"},"title":"Response Recent Punches Api V1 Lens Punches Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/lens/devices/{device_id}":{"delete":{"tags":["lens"],"summary":"Admin: remove a Lens phone","operationId":"remove_device_api_v1_lens_devices__device_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Device Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/lens/punches/{punch_id}/photo":{"get":{"tags":["lens"],"summary":"Admin: the face picture taken with a Lens punch (PNG)","operationId":"punch_photo_api_v1_lens_punches__punch_id__photo_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"punch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Punch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ess/otp":{"post":{"tags":["ess"],"summary":"Send the OTP for a first password or a forgotten one (employees only)","operationId":"otp_api_v1_ess_otp_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OtpSendIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OtpSendOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ess/password":{"post":{"tags":["ess"],"summary":"Set the password with the OTP; the employee is logged in","operationId":"set_password_api_v1_ess_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EssPasswordIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EssToken"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ess/login":{"post":{"tags":["ess"],"summary":"Log in with mobile and password","operationId":"login_api_v1_ess_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EssLoginIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EssToken"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ess/home":{"get":{"tags":["ess"],"summary":"Profile, today's row with its punches, and this month's totals","operationId":"home_api_v1_ess_home_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EssHome"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/ess/punch":{"post":{"tags":["ess"],"summary":"Punch now, with a selfie and the phone's location","operationId":"punch_api_v1_ess_punch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EssPunchIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EssPunchOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/ess/attendance":{"get":{"tags":["ess"],"summary":"My month, day by day (default: this month)","operationId":"month_api_v1_ess_attendance_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}$"},{"type":"null"}],"title":"Month"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttendanceEmployeeMonth"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ess/attendance/{day}":{"get":{"tags":["ess"],"summary":"One of my days with its punches","operationId":"day_api_v1_ess_attendance__day__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"day","in":"path","required":true,"schema":{"type":"string","format":"date","title":"Day"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttendanceDayDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ess/holidays":{"get":{"tags":["ess"],"summary":"The year's holidays that apply to me","operationId":"holidays_api_v1_ess_holidays_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"year","in":"query","required":true,"schema":{"type":"integer","maximum":2100,"minimum":2020,"title":"Year"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EssHoliday"},"title":"Response Holidays Api V1 Ess Holidays Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ess/leave":{"get":{"tags":["ess"],"summary":"My leave balances and my requests","operationId":"leave_api_v1_ess_leave_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EssLeave"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/ess/leave-requests":{"post":{"tags":["ess"],"summary":"Ask for leave; an admin approves it","operationId":"ask_leave_api_v1_ess_leave_requests_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EssLeaveIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaveRequestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/ess/punch-requests":{"post":{"tags":["ess"],"summary":"Ask for a missed punch; an admin approves it","operationId":"ask_punch_api_v1_ess_punch_requests_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EssPunchRequestIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EssPunchRequestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["ess"],"summary":"Miss punch requests of all staff (admins)","operationId":"punch_requests_api_v1_ess_punch_requests_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(pending|approved|rejected)$"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EssPunchRequestList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ess/punch-requests/mine":{"get":{"tags":["ess"],"summary":"My miss punch requests, newest first","operationId":"my_punch_requests_api_v1_ess_punch_requests_mine_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EssPunchRequestList"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/ess/notifications":{"get":{"tags":["ess"],"summary":"What was decided for me in the last 30 days, and missed punches","operationId":"notes_api_v1_ess_notifications_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EssNote"},"type":"array","title":"Response Notes Api V1 Ess Notifications Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/ess/punch-requests/{request_id}/approve":{"post":{"tags":["ess"],"summary":"Approve: the punch is added (admins)","operationId":"approve_punch_request_api_v1_ess_punch_requests__request_id__approve_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EssDecisionIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EssPunchRequestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ess/punch-requests/{request_id}/reject":{"post":{"tags":["ess"],"summary":"Reject a miss punch request (admins)","operationId":"reject_punch_request_api_v1_ess_punch_requests__request_id__reject_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EssDecisionIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EssPunchRequestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ess/logins":{"get":{"tags":["ess"],"summary":"Staff whose first app login waits for approval (admins)","operationId":"logins_waiting_api_v1_ess_logins_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EssLoginWaiting"},"type":"array","title":"Response Logins Waiting Api V1 Ess Logins Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/ess/logins/{employee_id}/approve":{"post":{"tags":["ess"],"summary":"Let this employee log in (admins)","operationId":"approve_login_api_v1_ess_logins__employee_id__approve_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Employee Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ess/punches/{punch_id}/selfie":{"get":{"tags":["ess"],"summary":"The selfie of one app punch (admins)","operationId":"punch_selfie_api_v1_ess_punches__punch_id__selfie_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"punch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Punch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users":{"get":{"tags":["users"],"summary":"Panel users: the owner and the admins","operationId":"list_users_api_v1_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PanelUserOut"},"type":"array","title":"Response List Users Api V1 Users Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["users"],"summary":"Owner only: add an admin (logs in by OTP on this mobile)","operationId":"add_user_api_v1_users_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PanelUserIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PanelUserOut"},"type":"array","title":"Response Add User Api V1 Users Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/users/{user_id}":{"delete":{"tags":["users"],"summary":"Owner only: remove an admin (logged out at once)","operationId":"remove_user_api_v1_users__user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/audit":{"get":{"tags":["audit"],"summary":"Change history of the company (Settings → Data check), newest first","operationId":"change_history_api_v1_audit_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"from_date","in":"query","required":true,"schema":{"type":"string","format":"date","title":"From Date"}},{"name":"to_date","in":"query","required":true,"schema":{"type":"string","format":"date","title":"To Date"}},{"name":"entity","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AssignmentIn":{"properties":{"shift_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Shift Id"},"rule_set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rule Set Id"},"leave_template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Leave Template Id"},"valid_from":{"type":"string","format":"date","title":"Valid From"}},"type":"object","required":["valid_from"],"title":"AssignmentIn","description":"All three are set together: send the current value for the ones that do not change."},"AssignmentOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"shift_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Shift Id"},"shift_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shift Name"},"rule_set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rule Set Id"},"rule_set_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rule Set Name"},"leave_template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Leave Template Id"},"leave_template_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Leave Template Name"},"valid_from":{"type":"string","format":"date","title":"Valid From"},"valid_to":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Valid To"}},"type":"object","required":["id","shift_id","shift_name","rule_set_id","rule_set_name","leave_template_id","leave_template_name","valid_from","valid_to"],"title":"AssignmentOut"},"AttendanceBulkOverrideIn":{"properties":{"status":{"type":"string","enum":["present","absent","half_day","holiday","weekly_off"],"title":"Status"},"reason":{"type":"string","maxLength":200,"minLength":2,"title":"Reason"},"employee_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":500,"minItems":1,"title":"Employee Ids"}},"type":"object","required":["status","reason","employee_ids"],"title":"AttendanceBulkOverrideIn"},"AttendanceBulkOverrideOut":{"properties":{"updated":{"type":"integer","title":"Updated"},"skipped":{"items":{"$ref":"#/components/schemas/AttendanceSkipped"},"type":"array","title":"Skipped"}},"type":"object","required":["updated","skipped"],"title":"AttendanceBulkOverrideOut"},"AttendanceCell":{"properties":{"status":{"type":"string","title":"Status"},"flags":{"items":{"type":"string"},"type":"array","title":"Flags"},"work_minutes":{"type":"integer","title":"Work Minutes"}},"type":"object","required":["status","flags","work_minutes"],"title":"AttendanceCell"},"AttendanceCounts":{"properties":{"total":{"type":"integer","title":"Total"},"present":{"type":"integer","title":"Present"},"absent":{"type":"integer","title":"Absent"},"half_day":{"type":"integer","title":"Half Day"},"leave":{"type":"integer","title":"Leave"},"holiday":{"type":"integer","title":"Holiday"},"weekly_off":{"type":"integer","title":"Weekly Off"},"miss_punch":{"type":"integer","title":"Miss Punch"},"not_in":{"type":"integer","title":"Not In"},"late":{"type":"integer","title":"Late"},"early":{"type":"integer","title":"Early"},"working":{"type":"integer","title":"Working"}},"type":"object","required":["total","present","absent","half_day","leave","holiday","weekly_off","miss_punch","not_in","late","early","working"],"title":"AttendanceCounts"},"AttendanceDayDetail":{"properties":{"work_date":{"type":"string","format":"date","title":"Work Date"},"branch_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Name"},"department_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Department Name"},"shift_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shift Name"},"day_type":{"type":"string","title":"Day Type"},"status":{"type":"string","title":"Status"},"computed_status":{"type":"string","title":"Computed Status"},"first_in":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First In"},"last_out":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Out"},"work_minutes":{"type":"integer","title":"Work Minutes"},"break_minutes":{"type":"integer","title":"Break Minutes"},"late_minutes":{"type":"integer","title":"Late Minutes"},"early_minutes":{"type":"integer","title":"Early Minutes"},"excess_break_minutes":{"type":"integer","title":"Excess Break Minutes"},"flags":{"items":{"type":"string"},"type":"array","title":"Flags"},"remarks":{"items":{"type":"string"},"type":"array","title":"Remarks"},"override_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Override Status"},"override_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Override Reason"},"employee_id":{"type":"string","format":"uuid","title":"Employee Id"},"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"punches":{"items":{"$ref":"#/components/schemas/PunchLogOut"},"type":"array","title":"Punches"}},"type":"object","required":["work_date","branch_name","department_name","shift_name","day_type","status","computed_status","first_in","last_out","work_minutes","break_minutes","late_minutes","early_minutes","excess_break_minutes","flags","remarks","override_status","override_reason","employee_id","code","name","punches"],"title":"AttendanceDayDetail"},"AttendanceDayItem":{"properties":{"work_date":{"type":"string","format":"date","title":"Work Date"},"branch_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Name"},"department_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Department Name"},"shift_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shift Name"},"day_type":{"type":"string","title":"Day Type"},"status":{"type":"string","title":"Status"},"computed_status":{"type":"string","title":"Computed Status"},"first_in":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First In"},"last_out":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Out"},"work_minutes":{"type":"integer","title":"Work Minutes"},"break_minutes":{"type":"integer","title":"Break Minutes"},"late_minutes":{"type":"integer","title":"Late Minutes"},"early_minutes":{"type":"integer","title":"Early Minutes"},"excess_break_minutes":{"type":"integer","title":"Excess Break Minutes"},"flags":{"items":{"type":"string"},"type":"array","title":"Flags"},"remarks":{"items":{"type":"string"},"type":"array","title":"Remarks"},"override_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Override Status"},"override_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Override Reason"},"employee_id":{"type":"string","format":"uuid","title":"Employee Id"},"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"}},"type":"object","required":["work_date","branch_name","department_name","shift_name","day_type","status","computed_status","first_in","last_out","work_minutes","break_minutes","late_minutes","early_minutes","excess_break_minutes","flags","remarks","override_status","override_reason","employee_id","code","name"],"title":"AttendanceDayItem"},"AttendanceDayList":{"properties":{"date":{"type":"string","format":"date","title":"Date"},"counts":{"$ref":"#/components/schemas/AttendanceCounts"},"items":{"items":{"$ref":"#/components/schemas/AttendanceDayItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["date","counts","items","total"],"title":"AttendanceDayList"},"AttendanceDayOut":{"properties":{"work_date":{"type":"string","format":"date","title":"Work Date"},"branch_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Name"},"department_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Department Name"},"shift_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shift Name"},"day_type":{"type":"string","title":"Day Type"},"status":{"type":"string","title":"Status"},"computed_status":{"type":"string","title":"Computed Status"},"first_in":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First In"},"last_out":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Out"},"work_minutes":{"type":"integer","title":"Work Minutes"},"break_minutes":{"type":"integer","title":"Break Minutes"},"late_minutes":{"type":"integer","title":"Late Minutes"},"early_minutes":{"type":"integer","title":"Early Minutes"},"excess_break_minutes":{"type":"integer","title":"Excess Break Minutes"},"flags":{"items":{"type":"string"},"type":"array","title":"Flags"},"remarks":{"items":{"type":"string"},"type":"array","title":"Remarks"},"override_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Override Status"},"override_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Override Reason"}},"type":"object","required":["work_date","branch_name","department_name","shift_name","day_type","status","computed_status","first_in","last_out","work_minutes","break_minutes","late_minutes","early_minutes","excess_break_minutes","flags","remarks","override_status","override_reason"],"title":"AttendanceDayOut","description":"One stored day. Branch / department / shift are the ones the day was computed with (history)."},"AttendanceEmployeeMonth":{"properties":{"employee":{"$ref":"#/components/schemas/AttendanceEmployeeRef"},"month":{"type":"string","title":"Month"},"locked":{"type":"boolean","title":"Locked"},"days":{"items":{"$ref":"#/components/schemas/AttendanceDayOut"},"type":"array","title":"Days"},"totals":{"$ref":"#/components/schemas/AttendanceTotals"}},"type":"object","required":["employee","month","locked","days","totals"],"title":"AttendanceEmployeeMonth"},"AttendanceEmployeeRef":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","code","name"],"title":"AttendanceEmployeeRef"},"AttendanceOverrideIn":{"properties":{"status":{"type":"string","enum":["present","absent","half_day","holiday","weekly_off"],"title":"Status"},"reason":{"type":"string","maxLength":200,"minLength":2,"title":"Reason"}},"type":"object","required":["status","reason"],"title":"AttendanceOverrideIn"},"AttendanceRegister":{"properties":{"month":{"type":"string","title":"Month"},"days":{"items":{"type":"string","format":"date"},"type":"array","title":"Days"},"locked":{"type":"boolean","title":"Locked"},"total":{"type":"integer","title":"Total"},"items":{"items":{"$ref":"#/components/schemas/AttendanceRegisterRow"},"type":"array","title":"Items"}},"type":"object","required":["month","days","locked","total","items"],"title":"AttendanceRegister"},"AttendanceRegisterRow":{"properties":{"employee_id":{"type":"string","format":"uuid","title":"Employee Id"},"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"cells":{"additionalProperties":{"$ref":"#/components/schemas/AttendanceCell"},"propertyNames":{"format":"date"},"type":"object","title":"Cells"},"totals":{"$ref":"#/components/schemas/AttendanceTotals"}},"type":"object","required":["employee_id","code","name","cells","totals"],"title":"AttendanceRegisterRow"},"AttendanceSkipped":{"properties":{"employee_id":{"type":"string","format":"uuid","title":"Employee Id"},"reason":{"type":"string","enum":["NOT_FOUND","DATE_OUTSIDE_EMPLOYMENT"],"title":"Reason"}},"type":"object","required":["employee_id","reason"],"title":"AttendanceSkipped"},"AttendanceTotals":{"properties":{"present":{"type":"integer","title":"Present"},"absent":{"type":"integer","title":"Absent"},"half_day":{"type":"integer","title":"Half Day"},"leave":{"type":"number","title":"Leave"},"holiday":{"type":"integer","title":"Holiday"},"weekly_off":{"type":"integer","title":"Weekly Off"},"miss_punch":{"type":"integer","title":"Miss Punch"},"late_days":{"type":"integer","title":"Late Days"},"work_minutes":{"type":"integer","title":"Work Minutes"}},"type":"object","required":["present","absent","half_day","leave","holiday","weekly_off","miss_punch","late_days","work_minutes"],"title":"AttendanceTotals"},"BalanceOut":{"properties":{"leave_type_id":{"type":"string","format":"uuid","title":"Leave Type Id"},"name":{"type":"string","title":"Name"},"code":{"type":"string","title":"Code"},"balance":{"type":"string","title":"Balance"}},"type":"object","required":["leave_type_id","name","code","balance"],"title":"BalanceOut"},"BasicPolicy":{"properties":{"auto_out_punch":{"type":"boolean","title":"Auto Out Punch","default":false},"fix_in_out":{"type":"boolean","title":"Fix In Out","default":false},"roundup_min":{"type":"integer","maximum":60.0,"minimum":0.0,"title":"Roundup Min","default":0}},"additionalProperties":false,"type":"object","title":"BasicPolicy"},"BillingLine":{"properties":{"label":{"type":"string","title":"Label"},"key":{"anyOf":[{"type":"string","enum":["staff","whatsapp_staff","whatsapp_admin"]},{"type":"null"}],"title":"Key"},"quantity":{"type":"integer","title":"Quantity"},"unit_paise":{"type":"integer","title":"Unit Paise"},"amount_paise":{"type":"integer","title":"Amount Paise"}},"type":"object","required":["label","quantity","unit_paise","amount_paise"],"title":"BillingLine"},"BillingOrderOut":{"properties":{"kind":{"type":"string","enum":["new","renew","add_staff","add_whatsapp"],"title":"Kind"},"employees":{"type":"integer","title":"Employees"},"whatsapp_staff":{"type":"integer","title":"Whatsapp Staff"},"whatsapp_admins":{"type":"integer","title":"Whatsapp Admins"},"period_from":{"type":"string","format":"date","title":"Period From"},"period_to":{"type":"string","format":"date","title":"Period To"},"lines":{"items":{"$ref":"#/components/schemas/BillingLine"},"type":"array","title":"Lines"},"subtotal_paise":{"type":"integer","title":"Subtotal Paise"},"credit_paise":{"type":"integer","title":"Credit Paise"},"credit_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Credit Label"},"base_paise":{"type":"integer","title":"Base Paise"},"gst_percent":{"type":"integer","title":"Gst Percent"},"gst_paise":{"type":"integer","title":"Gst Paise"},"amount_paise":{"type":"integer","title":"Amount Paise"},"credit_earned_paise":{"type":"integer","title":"Credit Earned Paise"},"description":{"type":"string","title":"Description"},"payment_id":{"type":"string","format":"uuid","title":"Payment Id"},"order_id":{"type":"string","title":"Order Id"},"key_id":{"type":"string","title":"Key Id"},"currency":{"type":"string","title":"Currency","default":"INR"},"company_name":{"type":"string","title":"Company Name"},"contact":{"type":"string","title":"Contact"}},"type":"object","required":["kind","employees","whatsapp_staff","whatsapp_admins","period_from","period_to","lines","subtotal_paise","credit_paise","credit_label","base_paise","gst_percent","gst_paise","amount_paise","credit_earned_paise","description","payment_id","order_id","key_id","company_name","contact"],"title":"BillingOrderOut","description":"Everything Razorpay Checkout needs in the browser."},"BillingOut":{"properties":{"subscription":{"anyOf":[{"$ref":"#/components/schemas/BillingSubscriptionOut"},{"type":"null"}]},"active_employees":{"type":"integer","title":"Active Employees"},"price_per_employee_year_paise":{"type":"integer","title":"Price Per Employee Year Paise"},"whatsapp_staff_paise_year":{"type":"integer","title":"Whatsapp Staff Paise Year"},"whatsapp_admin_paise_year":{"type":"integer","title":"Whatsapp Admin Paise Year"},"max_whatsapp_admins":{"type":"integer","title":"Max Whatsapp Admins"},"gst_percent":{"type":"integer","title":"Gst Percent"},"payments_ready":{"type":"boolean","title":"Payments Ready"},"test_mode":{"type":"boolean","title":"Test Mode"},"can":{"items":{"type":"string","enum":["new","renew","add_staff","add_whatsapp"]},"type":"array","title":"Can"},"billing_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing State"},"gst_states":{"items":{"$ref":"#/components/schemas/GstState"},"type":"array","title":"Gst States"},"payments":{"items":{"$ref":"#/components/schemas/BillingPaymentOut"},"type":"array","title":"Payments"},"plans":{"items":{"$ref":"#/components/schemas/PublicPlanOut"},"type":"array","title":"Plans","default":[]}},"type":"object","required":["subscription","active_employees","price_per_employee_year_paise","whatsapp_staff_paise_year","whatsapp_admin_paise_year","max_whatsapp_admins","gst_percent","payments_ready","test_mode","can","billing_state","gst_states","payments"],"title":"BillingOut"},"BillingPaymentOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"kind":{"type":"string","enum":["new","renew","add_staff","add_whatsapp"],"title":"Kind"},"employees":{"type":"integer","title":"Employees"},"whatsapp_staff":{"type":"integer","title":"Whatsapp Staff"},"whatsapp_admins":{"type":"integer","title":"Whatsapp Admins"},"period_from":{"type":"string","format":"date","title":"Period From"},"period_to":{"type":"string","format":"date","title":"Period To"},"base_paise":{"type":"integer","title":"Base Paise"},"gst_paise":{"type":"integer","title":"Gst Paise"},"amount_paise":{"type":"integer","title":"Amount Paise"},"status":{"type":"string","enum":["created","paid","failed"],"title":"Status"},"paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","kind","employees","whatsapp_staff","whatsapp_admins","period_from","period_to","base_paise","gst_paise","amount_paise","status","paid_at","created_at"],"title":"BillingPaymentOut"},"BillingQuoteIn":{"properties":{"kind":{"type":"string","enum":["new","renew","add_staff","add_whatsapp"],"title":"Kind"},"employees":{"type":"integer","maximum":5000.0,"minimum":1.0,"title":"Employees","default":1},"whatsapp_staff":{"type":"integer","maximum":5000.0,"minimum":0.0,"title":"Whatsapp Staff","default":0},"whatsapp_admins":{"type":"integer","maximum":20.0,"minimum":0.0,"title":"Whatsapp Admins","default":0},"whatsapp_for_new_staff":{"type":"boolean","title":"Whatsapp For New Staff","default":true},"plan_code":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]{1,19}$"},{"type":"null"}],"title":"Plan Code"}},"type":"object","required":["kind"],"title":"BillingQuoteIn"},"BillingQuoteOut":{"properties":{"kind":{"type":"string","enum":["new","renew","add_staff","add_whatsapp"],"title":"Kind"},"employees":{"type":"integer","title":"Employees"},"whatsapp_staff":{"type":"integer","title":"Whatsapp Staff"},"whatsapp_admins":{"type":"integer","title":"Whatsapp Admins"},"period_from":{"type":"string","format":"date","title":"Period From"},"period_to":{"type":"string","format":"date","title":"Period To"},"lines":{"items":{"$ref":"#/components/schemas/BillingLine"},"type":"array","title":"Lines"},"subtotal_paise":{"type":"integer","title":"Subtotal Paise"},"credit_paise":{"type":"integer","title":"Credit Paise"},"credit_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Credit Label"},"base_paise":{"type":"integer","title":"Base Paise"},"gst_percent":{"type":"integer","title":"Gst Percent"},"gst_paise":{"type":"integer","title":"Gst Paise"},"amount_paise":{"type":"integer","title":"Amount Paise"},"credit_earned_paise":{"type":"integer","title":"Credit Earned Paise"},"description":{"type":"string","title":"Description"}},"type":"object","required":["kind","employees","whatsapp_staff","whatsapp_admins","period_from","period_to","lines","subtotal_paise","credit_paise","credit_label","base_paise","gst_percent","gst_paise","amount_paise","credit_earned_paise","description"],"title":"BillingQuoteOut","description":"What it will cost. Amounts in paise (100 paise = ₹1); the server decides them, never the browser."},"BillingSubscriptionOut":{"properties":{"plan":{"type":"string","title":"Plan"},"plan_name":{"type":"string","title":"Plan Name","default":""},"features":{"items":{"type":"string"},"type":"array","title":"Features","default":[]},"status":{"type":"string","title":"Status"},"state":{"type":"string","title":"State"},"employee_limit":{"type":"integer","title":"Employee Limit"},"device_limit":{"type":"integer","title":"Device Limit","default":1},"max_admins":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Admins"},"starts_on":{"type":"string","format":"date","title":"Starts On"},"ends_on":{"type":"string","format":"date","title":"Ends On"},"days_left":{"type":"integer","title":"Days Left"},"whatsapp_staff":{"type":"integer","title":"Whatsapp Staff"},"whatsapp_admins":{"type":"integer","title":"Whatsapp Admins"},"renewal_credit_paise":{"type":"integer","title":"Renewal Credit Paise"},"renew_opens_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Renew Opens On"},"renewed_until":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Renewed Until"}},"type":"object","required":["plan","status","state","employee_limit","starts_on","ends_on","days_left","whatsapp_staff","whatsapp_admins","renewal_credit_paise","renew_opens_on"],"title":"BillingSubscriptionOut"},"BillingVerifyIn":{"properties":{"razorpay_order_id":{"type":"string","pattern":"^[A-Za-z0-9_]{8,60}$","title":"Razorpay Order Id"},"razorpay_payment_id":{"type":"string","pattern":"^[A-Za-z0-9_]{8,60}$","title":"Razorpay Payment Id"},"razorpay_signature":{"type":"string","pattern":"^[a-f0-9]{64}$","title":"Razorpay Signature"}},"type":"object","required":["razorpay_order_id","razorpay_payment_id","razorpay_signature"],"title":"BillingVerifyIn"},"BonusPolicy":{"properties":{"daily_paise":{"type":"integer","maximum":10000000.0,"minimum":0.0,"title":"Daily Paise","default":0},"monthly":{"type":"boolean","title":"Monthly","default":false},"all_present_paise":{"anyOf":[{"type":"integer","maximum":10000000.0,"minimum":0.0},{"type":"null"}],"title":"All Present Paise"},"one_absent_paise":{"type":"integer","maximum":10000000.0,"minimum":0.0,"title":"One Absent Paise","default":0},"three_absent_paise":{"type":"integer","maximum":10000000.0,"minimum":0.0,"title":"Three Absent Paise","default":0}},"additionalProperties":false,"type":"object","title":"BonusPolicy","description":"Attendance bonus (our reading of PagarGuru's Bonus Policy; its amounts are not shown there)."},"BranchIn":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Code"},"address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Address"},"phone":{"anyOf":[{"type":"string","maxLength":10,"pattern":"^[6-9][0-9]{9}$"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string","maxLength":254,"pattern":"^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$"},{"type":"null"}],"title":"Email"},"ess_login":{"type":"string","enum":["inherit","yes","no"],"title":"Ess Login","default":"inherit"},"ess_report":{"type":"string","enum":["inherit","yes","no"],"title":"Ess Report","default":"inherit"},"latitude":{"anyOf":[{"type":"number","maximum":90.0,"minimum":-90.0},{"type":"null"}],"title":"Latitude"},"longitude":{"anyOf":[{"type":"number","maximum":180.0,"minimum":-180.0},{"type":"null"}],"title":"Longitude"},"punch_radius_m":{"anyOf":[{"type":"integer","maximum":5000.0,"minimum":20.0},{"type":"null"}],"title":"Punch Radius M"}},"type":"object","required":["name"],"title":"BranchIn"},"BranchOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"ess_login":{"type":"string","enum":["inherit","yes","no"],"title":"Ess Login"},"ess_report":{"type":"string","enum":["inherit","yes","no"],"title":"Ess Report"},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latitude"},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Longitude"},"punch_radius_m":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Punch Radius M"},"employee_count":{"type":"integer","title":"Employee Count","default":0}},"type":"object","required":["id","name","code","address","phone","email","ess_login","ess_report","latitude","longitude","punch_radius_m"],"title":"BranchOut"},"BranchPatch":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Code"},"address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Address"},"phone":{"anyOf":[{"type":"string","maxLength":10,"pattern":"^[6-9][0-9]{9}$"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string","maxLength":254,"pattern":"^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$"},{"type":"null"}],"title":"Email"},"ess_login":{"type":"string","enum":["inherit","yes","no"],"title":"Ess Login"},"ess_report":{"type":"string","enum":["inherit","yes","no"],"title":"Ess Report"},"latitude":{"anyOf":[{"type":"number","maximum":90.0,"minimum":-90.0},{"type":"null"}],"title":"Latitude"},"longitude":{"anyOf":[{"type":"number","maximum":180.0,"minimum":-180.0},{"type":"null"}],"title":"Longitude"},"punch_radius_m":{"anyOf":[{"type":"integer","maximum":5000.0,"minimum":20.0},{"type":"null"}],"title":"Punch Radius M"}},"type":"object","title":"BranchPatch"},"BreakPolicy":{"properties":{"multiple":{"type":"boolean","title":"Multiple","default":true},"excess_after_min":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":0.0},{"type":"null"}],"title":"Excess After Min"},"auto_add":{"anyOf":[{"type":"string","enum":["not_taken","always","less_taken"]},{"type":"null"}],"title":"Auto Add"},"missing_break_punch_counts_min":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":0.0},{"type":"null"}],"title":"Missing Break Punch Counts Min"}},"additionalProperties":false,"type":"object","title":"BreakPolicy"},"Celebration":{"properties":{"employee_id":{"type":"string","format":"uuid","title":"Employee Id"},"name":{"type":"string","title":"Name"},"code":{"type":"string","title":"Code"},"kind":{"type":"string","enum":["birthday","anniversary"],"title":"Kind"},"years":{"type":"integer","title":"Years"}},"type":"object","required":["employee_id","name","code","kind","years"],"title":"Celebration"},"ChangeItem":{"properties":{"at":{"type":"string","format":"date-time","title":"At"},"actor_type":{"type":"string","title":"Actor Type"},"actor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Name"},"entity":{"type":"string","title":"Entity"},"action":{"type":"string","title":"Action"},"before":{"anyOf":[{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"title":"Before"},"after":{"anyOf":[{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"title":"After"}},"type":"object","required":["at","actor_type","actor_name","entity","action","before","after"],"title":"ChangeItem"},"ChangeList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ChangeItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"entities":{"items":{"type":"string"},"type":"array","title":"Entities"}},"type":"object","required":["items","total","entities"],"title":"ChangeList"},"CompOff":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"expire_months":{"type":"integer","maximum":24.0,"minimum":0.0,"title":"Expire Months","default":0}},"additionalProperties":false,"type":"object","title":"CompOff"},"CompanyBrief":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"}},"type":"object","required":["id","name","status"],"title":"CompanyBrief"},"CompanyOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"},"timezone":{"type":"string","title":"Timezone"},"legal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Name"},"owner_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Name"},"place":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Place"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"gstin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gstin"},"state_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State Code"},"employee_code_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employee Code Prefix"},"employee_code_suffix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employee Code Suffix"},"has_logo":{"type":"boolean","title":"Has Logo","default":false}},"type":"object","required":["id","name","status","timezone","legal_name","owner_name","place","address","phone","email","gstin","state_code","employee_code_prefix","employee_code_suffix"],"title":"CompanyOut"},"CompanyPatch":{"properties":{"name":{"type":"string","maxLength":150,"minLength":2,"title":"Name"},"legal_name":{"anyOf":[{"type":"string","maxLength":150},{"type":"null"}],"title":"Legal Name"},"owner_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Owner Name"},"place":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Place"},"address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Address"},"phone":{"anyOf":[{"type":"string","maxLength":10,"pattern":"^[6-9][0-9]{9}$"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string","maxLength":254,"pattern":"^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$"},{"type":"null"}],"title":"Email"},"gstin":{"anyOf":[{"type":"string","maxLength":15,"pattern":"^[0-9]{2}[A-Z0-9]{13}$"},{"type":"null"}],"title":"Gstin"},"state_code":{"anyOf":[{"type":"string","maxLength":2,"pattern":"^[0-9]{2}$"},{"type":"null"}],"title":"State Code"},"employee_code_prefix":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Employee Code Prefix"},"employee_code_suffix":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Employee Code Suffix"}},"type":"object","title":"CompanyPatch"},"CompanyPlanIn":{"properties":{"plan_code":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]{1,19}$"},{"type":"null"}],"title":"Plan Code"},"device_limit":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Device Limit"},"max_admins":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":1.0},{"type":"null"}],"title":"Max Admins"},"reason":{"type":"string","maxLength":300,"minLength":3,"title":"Reason"}},"additionalProperties":false,"type":"object","required":["reason"],"title":"CompanyPlanIn","description":"Move a company to another plan, or give it its own machine / admin limit (a custom deal). No money\nmoves; staff bought and the end date stay. Only what is sent changes."},"CompanySettings-Input":{"properties":{"v":{"type":"integer","const":1,"title":"V","default":1},"punch":{"$ref":"#/components/schemas/PunchSettings","default":{"double_punch_interval_min":5,"single_punch_action":"miss_punch"}},"time_format":{"type":"string","enum":["12h","24h"],"title":"Time Format","default":"12h"},"ess":{"$ref":"#/components/schemas/EssSettings","default":{"login":true,"app_punch":true,"verify_face":true,"approve_app_punch":false,"view_attendance":true,"view_holidays":true,"own_report":true,"leave_request":true,"miss_punch_request":true,"login_verification_by_owner":false}},"auto_present_manual_staff":{"type":"boolean","title":"Auto Present Manual Staff","default":false},"default_report":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Report"},"salary":{"$ref":"#/components/schemas/SalarySettings-Input","default":{"payment_day":10,"fifteen_days":false,"weekly":false,"slip_name":"","slip_phone":"","show_ctc":false,"bank_name":"","bank_account":"","bank_ifsc":""}},"salary_structure":{"$ref":"#/components/schemas/SalaryStructure","default":{"components":["Basic+DA","HRA","Medical Allowance","Special Allowance","Travelling Allowance","Conveyance Allowance","Education Allowance","Telephone Allowance","Other Allowance","","","","","",""],"overtime_name":"Overtime","employee_deductions":["","",""],"employer_contributions":["","",""],"punch_day_contribution":"","pf_on":"all","pf_components":[],"esi_on":"all","esi_components":[]}}},"additionalProperties":false,"type":"object","title":"CompanySettings","description":"Full settings in responses. As a PATCH body, send only the sections / keys to change."},"CompanySettings-Output":{"properties":{"v":{"type":"integer","const":1,"title":"V","default":1},"punch":{"$ref":"#/components/schemas/PunchSettings","default":{"double_punch_interval_min":5,"single_punch_action":"miss_punch"}},"time_format":{"type":"string","enum":["12h","24h"],"title":"Time Format","default":"12h"},"ess":{"$ref":"#/components/schemas/EssSettings","default":{"login":true,"app_punch":true,"verify_face":true,"approve_app_punch":false,"view_attendance":true,"view_holidays":true,"own_report":true,"leave_request":true,"miss_punch_request":true,"login_verification_by_owner":false}},"auto_present_manual_staff":{"type":"boolean","title":"Auto Present Manual Staff","default":false},"default_report":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Report"},"salary":{"$ref":"#/components/schemas/SalarySettings-Output","default":{"payment_day":10,"fifteen_days":false,"weekly":false,"slip_name":"","slip_phone":"","show_ctc":false,"bank_name":"","bank_account":"","bank_ifsc":""}},"salary_structure":{"$ref":"#/components/schemas/SalaryStructure","default":{"components":["Basic+DA","HRA","Medical Allowance","Special Allowance","Travelling Allowance","Conveyance Allowance","Education Allowance","Telephone Allowance","Other Allowance","","","","","",""],"overtime_name":"Overtime","employee_deductions":["","",""],"employer_contributions":["","",""],"punch_day_contribution":"","pf_on":"all","pf_components":[],"esi_on":"all","esi_components":[]}}},"additionalProperties":false,"type":"object","title":"CompanySettings","description":"Full settings in responses. As a PATCH body, send only the sections / keys to change."},"ComplianceIn":{"properties":{"pf_no":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pf No"},"esi_no":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Esi No"},"uan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uan"},"pan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pan"},"aadhaar":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aadhaar"}},"additionalProperties":false,"type":"object","title":"ComplianceIn"},"ComplianceOut":{"properties":{"pf_no":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pf No"},"esi_no":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Esi No"},"uan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uan"},"pan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pan"},"aadhaar":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aadhaar"}},"type":"object","title":"ComplianceOut","description":"Only the last 4 characters of each number (\"XXXXXXXX1234\"); null = not entered."},"CompliancePolicy":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"esi_overtime":{"type":"boolean","title":"Esi Overtime","default":true},"esi_holiday":{"type":"boolean","title":"Esi Holiday","default":true},"esi_after_fines":{"type":"boolean","title":"Esi After Fines","default":false},"pt_overtime":{"type":"boolean","title":"Pt Overtime","default":true},"pt_holiday":{"type":"boolean","title":"Pt Holiday","default":true},"pf_reimburse":{"type":"boolean","title":"Pf Reimburse","default":false},"esi_reimburse":{"type":"boolean","title":"Esi Reimburse","default":false},"employer_share_from_employee":{"type":"boolean","title":"Employer Share From Employee","default":false}},"additionalProperties":false,"type":"object","title":"CompliancePolicy","description":"PagarGuru \"Custom Compliance Policy\". Off = ESI and PT count salary, holiday pay and overtime."},"ConsoleCompanyOut":{"properties":{"profile":{"$ref":"#/components/schemas/ConsoleCompanyProfile"},"owner":{"anyOf":[{"$ref":"#/components/schemas/ConsoleOwner"},{"type":"null"}]},"billing":{"$ref":"#/components/schemas/BillingOut"},"payments":{"items":{"$ref":"#/components/schemas/ConsolePaymentOut"},"type":"array","title":"Payments"},"invoices":{"items":{"$ref":"#/components/schemas/InvoiceBriefOut"},"type":"array","title":"Invoices"}},"type":"object","required":["profile","owner","billing","payments","invoices"],"title":"ConsoleCompanyOut"},"ConsoleCompanyPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ConsoleCompanyRow"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"ConsoleCompanyPage"},"ConsoleCompanyProfile":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"legal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Name"},"status":{"type":"string","title":"Status"},"owner_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Name"},"place":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Place"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"gstin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gstin"},"state_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State Code"},"business_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Type"},"employee_band":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employee Band"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","legal_name","status","owner_name","place","address","phone","email","gstin","state_code","business_type","employee_band","created_at"],"title":"ConsoleCompanyProfile"},"ConsoleCompanyRow":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"},"owner_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Name"},"owner_mobile":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Mobile"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"business_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Type"},"employee_band":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employee Band"},"plan_state":{"type":"string","title":"Plan State"},"plan_ends_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Plan Ends On"},"staff_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Staff Limit"},"staff_used":{"type":"integer","title":"Staff Used"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","status","owner_name","owner_mobile","city","business_type","employee_band","plan_state","plan_ends_on","staff_limit","staff_used","created_at"],"title":"ConsoleCompanyRow"},"ConsoleOwner":{"properties":{"name":{"type":"string","title":"Name"},"mobile":{"type":"string","title":"Mobile"},"status":{"type":"string","title":"Status"},"last_login_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Login At"}},"type":"object","required":["name","mobile","status","last_login_at"],"title":"ConsoleOwner"},"ConsolePaymentOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"kind":{"type":"string","enum":["new","renew","add_staff","add_whatsapp"],"title":"Kind"},"employees":{"type":"integer","title":"Employees"},"whatsapp_staff":{"type":"integer","title":"Whatsapp Staff"},"whatsapp_admins":{"type":"integer","title":"Whatsapp Admins"},"period_from":{"type":"string","format":"date","title":"Period From"},"period_to":{"type":"string","format":"date","title":"Period To"},"base_paise":{"type":"integer","title":"Base Paise"},"gst_paise":{"type":"integer","title":"Gst Paise"},"amount_paise":{"type":"integer","title":"Amount Paise"},"status":{"type":"string","enum":["created","paid","failed"],"title":"Status"},"paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"manual":{"type":"boolean","title":"Manual"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference"}},"type":"object","required":["id","kind","employees","whatsapp_staff","whatsapp_admins","period_from","period_to","base_paise","gst_paise","amount_paise","status","paid_at","created_at","manual","reference"],"title":"ConsolePaymentOut"},"ConsolePlanIn":{"properties":{"name":{"type":"string","maxLength":50,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Description"},"price_per_employee_year":{"anyOf":[{"type":"number","maximum":100000.0,"minimum":1.0},{"type":"string"}],"title":"Price Per Employee Year"},"whatsapp_staff_paise_year":{"anyOf":[{"type":"integer","maximum":10000000.0,"minimum":0.0},{"type":"null"}],"title":"Whatsapp Staff Paise Year"},"whatsapp_admin_paise_year":{"anyOf":[{"type":"integer","maximum":10000000.0,"minimum":0.0},{"type":"null"}],"title":"Whatsapp Admin Paise Year"},"is_public":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Public"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"is_trial":{"anyOf":[{"type":"boolean","const":true},{"type":"null"}],"title":"Is Trial","description":"Make this the plan new sign-ups get"},"sort_order":{"anyOf":[{"type":"integer","maximum":999.0,"minimum":0.0},{"type":"null"}],"title":"Sort Order"},"trial_days":{"anyOf":[{"type":"integer","maximum":90.0,"minimum":1.0},{"type":"null"}],"title":"Trial Days"},"trial_staff":{"anyOf":[{"type":"integer","maximum":1000.0,"minimum":1.0},{"type":"null"}],"title":"Trial Staff"},"max_devices":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Max Devices"},"max_admins":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Max Admins"},"features":{"anyOf":[{"items":{"type":"string","enum":["biometric","lens","ess_app","roster","leave","reports_excel","whatsapp_addon","payroll"]},"type":"array"},{"type":"null"}],"title":"Features"},"code":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,19}$","title":"Code","description":"Short id, never changes: small letters, digits, _ (e.g. lite)"}},"additionalProperties":false,"type":"object","required":["name","price_per_employee_year","code"],"title":"ConsolePlanIn"},"ConsolePlanOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"price_per_employee_year":{"type":"string","title":"Price Per Employee Year"},"whatsapp_staff_paise_year":{"type":"integer","title":"Whatsapp Staff Paise Year"},"whatsapp_admin_paise_year":{"type":"integer","title":"Whatsapp Admin Paise Year"},"is_public":{"type":"boolean","title":"Is Public"},"is_active":{"type":"boolean","title":"Is Active"},"is_trial":{"type":"boolean","title":"Is Trial"},"sort_order":{"type":"integer","title":"Sort Order"},"trial_days":{"type":"integer","title":"Trial Days"},"trial_staff":{"type":"integer","title":"Trial Staff"},"max_devices":{"type":"integer","title":"Max Devices"},"max_admins":{"type":"integer","title":"Max Admins"},"features":{"items":{"type":"string"},"type":"array","title":"Features"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","code","name","description","price_per_employee_year","whatsapp_staff_paise_year","whatsapp_admin_paise_year","is_public","is_active","is_trial","sort_order","trial_days","trial_staff","max_devices","max_admins","features","updated_at"],"title":"ConsolePlanOut"},"ConsolePlanPatch":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":50,"minLength":2},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Description"},"price_per_employee_year":{"anyOf":[{"type":"number","maximum":100000.0,"minimum":1.0},{"type":"string"},{"type":"null"}],"title":"Price Per Employee Year"},"whatsapp_staff_paise_year":{"anyOf":[{"type":"integer","maximum":10000000.0,"minimum":0.0},{"type":"null"}],"title":"Whatsapp Staff Paise Year"},"whatsapp_admin_paise_year":{"anyOf":[{"type":"integer","maximum":10000000.0,"minimum":0.0},{"type":"null"}],"title":"Whatsapp Admin Paise Year"},"is_public":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Public"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"is_trial":{"anyOf":[{"type":"boolean","const":true},{"type":"null"}],"title":"Is Trial","description":"Make this the plan new sign-ups get"},"sort_order":{"anyOf":[{"type":"integer","maximum":999.0,"minimum":0.0},{"type":"null"}],"title":"Sort Order"},"trial_days":{"anyOf":[{"type":"integer","maximum":90.0,"minimum":1.0},{"type":"null"}],"title":"Trial Days"},"trial_staff":{"anyOf":[{"type":"integer","maximum":1000.0,"minimum":1.0},{"type":"null"}],"title":"Trial Staff"},"max_devices":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Max Devices"},"max_admins":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Max Admins"},"features":{"anyOf":[{"items":{"type":"string","enum":["biometric","lens","ess_app","roster","leave","reports_excel","whatsapp_addon","payroll"]},"type":"array"},{"type":"null"}],"title":"Features"}},"additionalProperties":false,"type":"object","title":"ConsolePlanPatch"},"ConsolePlansOut":{"properties":{"plans":{"items":{"$ref":"#/components/schemas/ConsolePlanOut"},"type":"array","title":"Plans"},"features":{"additionalProperties":{"type":"string"},"type":"object","title":"Features"}},"type":"object","required":["plans","features"],"title":"ConsolePlansOut"},"DeactivateIn":{"properties":{"leaving_date":{"type":"string","format":"date","title":"Leaving Date"}},"type":"object","required":["leaving_date"],"title":"DeactivateIn"},"DeletedEmployee":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"mobile":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mobile"},"deleted_at":{"type":"string","format":"date-time","title":"Deleted At"}},"type":"object","required":["id","code","name","mobile","deleted_at"],"title":"DeletedEmployee"},"DepartmentIn":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"establishment":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Establishment"},"address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Address"}},"type":"object","required":["name"],"title":"DepartmentIn"},"DepartmentOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"establishment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Establishment"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"employee_count":{"type":"integer","title":"Employee Count","default":0}},"type":"object","required":["id","name","establishment","address"],"title":"DepartmentOut"},"DepartmentPatch":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"establishment":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Establishment"},"address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Address"}},"type":"object","title":"DepartmentPatch"},"DeviceIn":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"serial_no":{"type":"string","maxLength":50,"minLength":4,"pattern":"^[A-Za-z0-9_-]+$","title":"Serial No"},"brand":{"type":"string","enum":["essl","zkteco","biomax","identix","hikvision","other"],"title":"Brand","default":"essl"},"branch_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Branch Id"},"timezone":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Timezone"}},"type":"object","required":["name","serial_no"],"title":"DeviceIn"},"DeviceLinkIn":{"properties":{"pin":{"type":"string","maxLength":24,"minLength":1,"pattern":"^[A-Za-z0-9]+$","title":"Pin"},"employee_id":{"type":"string","format":"uuid","title":"Employee Id"}},"type":"object","required":["pin","employee_id"],"title":"DeviceLinkIn"},"DeviceLinkOut":{"properties":{"imported":{"type":"integer","title":"Imported"}},"type":"object","required":["imported"],"title":"DeviceLinkOut"},"DeviceOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"},"serial_no":{"type":"string","title":"Serial No"},"branch_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Branch Id"},"branch_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Name"},"timezone":{"type":"string","title":"Timezone"},"status":{"type":"string","title":"Status"},"last_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen At"},"last_punch_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Punch At"},"online":{"type":"boolean","title":"Online"},"unmatched_count":{"type":"integer","title":"Unmatched Count"},"hik_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hik Key"}},"type":"object","required":["id","name","brand","serial_no","branch_id","branch_name","timezone","status","last_seen_at","last_punch_at","online","unmatched_count"],"title":"DeviceOut"},"DevicePatch":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"serial_no":{"type":"string","maxLength":50,"minLength":4,"pattern":"^[A-Za-z0-9_-]+$","title":"Serial No"},"brand":{"type":"string","enum":["essl","zkteco","biomax","identix","hikvision","other"],"title":"Brand"},"branch_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Branch Id"},"timezone":{"type":"string","maxLength":64,"title":"Timezone"},"status":{"type":"string","enum":["active","disabled"],"title":"Status"}},"type":"object","title":"DevicePatch"},"DevicePinIn":{"properties":{"pin":{"type":"string","maxLength":24,"minLength":1,"pattern":"^[A-Za-z0-9]+$","title":"Pin"}},"type":"object","required":["pin"],"title":"DevicePinIn"},"DevicePinList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DevicePinRow"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"DevicePinList"},"DevicePinOut":{"properties":{"employee_id":{"type":"string","format":"uuid","title":"Employee Id"},"pin":{"type":"string","title":"Pin"},"imported":{"type":"integer","title":"Imported"}},"type":"object","required":["employee_id","pin","imported"],"title":"DevicePinOut"},"DevicePinRow":{"properties":{"employee_id":{"type":"string","format":"uuid","title":"Employee Id"},"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"},"pin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pin"}},"type":"object","required":["employee_id","code","name","status","pin"],"title":"DevicePinRow"},"DeviceSetup":{"properties":{"server_host":{"type":"string","title":"Server Host"},"server_port":{"type":"integer","title":"Server Port"},"path":{"type":"string","title":"Path"},"https":{"type":"boolean","title":"Https"},"steps":{"items":{"type":"string"},"type":"array","title":"Steps"}},"type":"object","required":["server_host","server_port","path","https","steps"],"title":"DeviceSetup"},"DeviceSuggestedEmployee":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","code","name"],"title":"DeviceSuggestedEmployee"},"DeviceUnmatchedGroup":{"properties":{"pin":{"type":"string","title":"Pin"},"count":{"type":"integer","title":"Count"},"first_time":{"type":"string","format":"date-time","title":"First Time"},"last_time":{"type":"string","format":"date-time","title":"Last Time"},"device_names":{"items":{"type":"string"},"type":"array","title":"Device Names"},"suggested_employee":{"anyOf":[{"$ref":"#/components/schemas/DeviceSuggestedEmployee"},{"type":"null"}]}},"type":"object","required":["pin","count","first_time","last_time","device_names","suggested_employee"],"title":"DeviceUnmatchedGroup"},"EarlyPolicy":{"properties":{"grace_min":{"type":"integer","maximum":1440.0,"minimum":0.0,"title":"Grace Min","default":0},"halfday_if_early_over_min":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":0.0},{"type":"null"}],"title":"Halfday If Early Over Min"},"weekday_allowance":{"items":{"$ref":"#/components/schemas/WeekdayAllowance"},"type":"array","title":"Weekday Allowance","default":[]}},"additionalProperties":false,"type":"object","title":"EarlyPolicy"},"EmployeeAttachmentOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"file_name":{"type":"string","title":"File Name"},"content_type":{"type":"string","title":"Content Type"},"size_bytes":{"type":"integer","title":"Size Bytes"},"uploaded_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uploaded By Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","title","file_name","content_type","size_bytes","uploaded_by_name","created_at"],"title":"EmployeeAttachmentOut"},"EmployeeBulkIn":{"properties":{"employee_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":500,"minItems":1,"title":"Employee Ids"},"field":{"type":"string","enum":["branch","department","shift","rule_set","leave_template","status"],"title":"Field"},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value"},"from_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"From Date"},"dry_run":{"type":"boolean","title":"Dry Run","default":false}},"type":"object","required":["employee_ids","field"],"title":"EmployeeBulkIn"},"EmployeeBulkOut":{"properties":{"selected":{"type":"integer","title":"Selected"},"changed":{"type":"integer","title":"Changed"}},"type":"object","required":["selected","changed"],"title":"EmployeeBulkOut"},"EmployeeDetail":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"mobile":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mobile"},"gender":{"anyOf":[{"type":"string","enum":["male","female","other"]},{"type":"null"}],"title":"Gender"},"branch_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Branch Id"},"branch_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Name"},"department_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Department Id"},"department_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Department Name"},"job_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Title"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"joining_date":{"type":"string","format":"date","title":"Joining Date"},"leaving_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Leaving Date"},"status":{"type":"string","enum":["active","inactive"],"title":"Status"},"ess_enabled":{"type":"boolean","title":"Ess Enabled"},"app_punch_allowed":{"type":"boolean","title":"App Punch Allowed"},"manual_attendance":{"type":"boolean","title":"Manual Attendance"},"shift_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Shift Id"},"shift_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shift Name"},"rule_set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rule Set Id"},"rule_set_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rule Set Name"},"leave_template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Leave Template Id"},"leave_template_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Leave Template Name"},"has_photo":{"type":"boolean","title":"Has Photo"},"profile":{"$ref":"#/components/schemas/ProfileOut"}},"type":"object","required":["id","code","name","mobile","gender","branch_id","branch_name","department_id","department_name","job_title","email","joining_date","leaving_date","status","ess_enabled","app_punch_allowed","manual_attendance","shift_id","shift_name","rule_set_id","rule_set_name","leave_template_id","leave_template_name","has_photo","profile"],"title":"EmployeeDetail"},"EmployeeImportCheck":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/EmployeeImportRow"},"type":"array","title":"Rows"},"problems":{"items":{"type":"string"},"type":"array","title":"Problems"},"can_import":{"type":"boolean","title":"Can Import"}},"type":"object","required":["rows","problems","can_import"],"title":"EmployeeImportCheck"},"EmployeeImportDone":{"properties":{"imported":{"type":"integer","title":"Imported"}},"type":"object","required":["imported"],"title":"EmployeeImportDone"},"EmployeeImportRow":{"properties":{"row":{"type":"integer","title":"Row"},"name":{"type":"string","title":"Name"},"code":{"type":"string","title":"Code"},"mobile":{"type":"string","title":"Mobile"},"problems":{"items":{"type":"string"},"type":"array","title":"Problems"}},"type":"object","required":["row","name","code","mobile","problems"],"title":"EmployeeImportRow"},"EmployeeIn":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Code"},"mobile":{"anyOf":[{"type":"string","maxLength":10,"pattern":"^[6-9][0-9]{9}$"},{"type":"null"}],"title":"Mobile"},"gender":{"anyOf":[{"type":"string","enum":["male","female","other"]},{"type":"null"}],"title":"Gender"},"branch_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Branch Id"},"department_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Department Id"},"job_title":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Job Title"},"email":{"anyOf":[{"type":"string","maxLength":254,"pattern":"^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$"},{"type":"null"}],"title":"Email"},"joining_date":{"type":"string","format":"date","title":"Joining Date"},"ess_enabled":{"type":"boolean","title":"Ess Enabled","default":false},"app_punch_allowed":{"type":"boolean","title":"App Punch Allowed","default":false},"manual_attendance":{"type":"boolean","title":"Manual Attendance","default":false},"shift_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Shift Id"},"rule_set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rule Set Id"},"leave_template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Leave Template Id"}},"type":"object","required":["name","joining_date"],"title":"EmployeeIn"},"EmployeeList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/EmployeeOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"EmployeeList"},"EmployeeMachineOut":{"properties":{"device_id":{"type":"string","format":"uuid","title":"Device Id"},"name":{"type":"string","title":"Name"},"brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"},"can_command":{"type":"boolean","title":"Can Command"},"last":{"anyOf":[{"$ref":"#/components/schemas/MachineCommandLast"},{"type":"null"}]}},"type":"object","required":["device_id","name","brand","can_command","last"],"title":"EmployeeMachineOut"},"EmployeeMachinesOut":{"properties":{"pin":{"type":"string","title":"Pin"},"machines":{"items":{"$ref":"#/components/schemas/EmployeeMachineOut"},"type":"array","title":"Machines"}},"type":"object","required":["pin","machines"],"title":"EmployeeMachinesOut"},"EmployeeOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"mobile":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mobile"},"gender":{"anyOf":[{"type":"string","enum":["male","female","other"]},{"type":"null"}],"title":"Gender"},"branch_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Branch Id"},"branch_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Name"},"department_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Department Id"},"department_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Department Name"},"job_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Title"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"joining_date":{"type":"string","format":"date","title":"Joining Date"},"leaving_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Leaving Date"},"status":{"type":"string","enum":["active","inactive"],"title":"Status"},"ess_enabled":{"type":"boolean","title":"Ess Enabled"},"app_punch_allowed":{"type":"boolean","title":"App Punch Allowed"},"manual_attendance":{"type":"boolean","title":"Manual Attendance"},"shift_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Shift Id"},"shift_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shift Name"},"rule_set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rule Set Id"},"rule_set_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rule Set Name"},"leave_template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Leave Template Id"},"leave_template_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Leave Template Name"},"has_photo":{"type":"boolean","title":"Has Photo"}},"type":"object","required":["id","code","name","mobile","gender","branch_id","branch_name","department_id","department_name","job_title","email","joining_date","leaving_date","status","ess_enabled","app_punch_allowed","manual_attendance","shift_id","shift_name","rule_set_id","rule_set_name","leave_template_id","leave_template_name","has_photo"],"title":"EmployeeOut"},"EmployeePatch":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"code":{"type":"string","maxLength":20,"minLength":1,"title":"Code"},"mobile":{"anyOf":[{"type":"string","maxLength":10,"pattern":"^[6-9][0-9]{9}$"},{"type":"null"}],"title":"Mobile"},"gender":{"anyOf":[{"type":"string","enum":["male","female","other"]},{"type":"null"}],"title":"Gender"},"branch_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Branch Id"},"department_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Department Id"},"job_title":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Job Title"},"email":{"anyOf":[{"type":"string","maxLength":254,"pattern":"^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$"},{"type":"null"}],"title":"Email"},"joining_date":{"type":"string","format":"date","title":"Joining Date"},"ess_enabled":{"type":"boolean","title":"Ess Enabled"},"app_punch_allowed":{"type":"boolean","title":"App Punch Allowed"},"manual_attendance":{"type":"boolean","title":"Manual Attendance"}},"type":"object","title":"EmployeePatch"},"EmployeeSalaryIn":{"properties":{"valid_from":{"type":"string","format":"date","title":"Valid From"},"mode":{"type":"string","enum":["monthly","fifteen_days","weekly"],"title":"Mode","default":"monthly"},"basis":{"type":"string","enum":["month","day","hour"],"title":"Basis","default":"month"},"amount_paise":{"type":"integer","maximum":10000000000.0,"minimum":1.0,"title":"Amount Paise"},"template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Template Id"},"overtime_paise_hour":{"anyOf":[{"type":"integer","maximum":10000000.0,"minimum":0.0},{"type":"null"}],"title":"Overtime Paise Hour"},"pf":{"type":"string","enum":["no","auto","pct12","fixed"],"title":"Pf","default":"no"},"pf_paise":{"anyOf":[{"type":"integer","maximum":10000000.0,"minimum":0.0},{"type":"null"}],"title":"Pf Paise"},"esi":{"type":"string","enum":["no","auto","fixed"],"title":"Esi","default":"no"},"esi_paise":{"anyOf":[{"type":"integer","maximum":10000000.0,"minimum":0.0},{"type":"null"}],"title":"Esi Paise"},"pt":{"type":"boolean","title":"Pt","default":false},"pt_paise":{"anyOf":[{"type":"integer","maximum":10000000.0,"minimum":0.0},{"type":"null"}],"title":"Pt Paise"},"lwf":{"type":"boolean","title":"Lwf","default":false},"tds":{"type":"string","enum":["no","pct10","pct1","fixed"],"title":"Tds","default":"no"},"tds_paise":{"anyOf":[{"type":"integer","maximum":10000000.0,"minimum":0.0},{"type":"null"}],"title":"Tds Paise"},"pf_admin_charge":{"type":"boolean","title":"Pf Admin Charge","default":false}},"additionalProperties":false,"type":"object","required":["valid_from","amount_paise"],"title":"EmployeeSalaryIn","description":"A salary from `valid_from`. The same date again replaces that row. With a template the amount is the\nmonthly gross; \"fixed\" PF / ESI / TDS need their amount, other choices must not send one."},"EmployeeSalaryOut":{"properties":{"valid_from":{"type":"string","format":"date","title":"Valid From"},"mode":{"type":"string","enum":["monthly","fifteen_days","weekly"],"title":"Mode","default":"monthly"},"basis":{"type":"string","enum":["month","day","hour"],"title":"Basis","default":"month"},"amount_paise":{"type":"integer","maximum":10000000000.0,"minimum":1.0,"title":"Amount Paise"},"template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Template Id"},"overtime_paise_hour":{"anyOf":[{"type":"integer","maximum":10000000.0,"minimum":0.0},{"type":"null"}],"title":"Overtime Paise Hour"},"pf":{"type":"string","enum":["no","auto","pct12","fixed"],"title":"Pf","default":"no"},"pf_paise":{"anyOf":[{"type":"integer","maximum":10000000.0,"minimum":0.0},{"type":"null"}],"title":"Pf Paise"},"esi":{"type":"string","enum":["no","auto","fixed"],"title":"Esi","default":"no"},"esi_paise":{"anyOf":[{"type":"integer","maximum":10000000.0,"minimum":0.0},{"type":"null"}],"title":"Esi Paise"},"pt":{"type":"boolean","title":"Pt","default":false},"pt_paise":{"anyOf":[{"type":"integer","maximum":10000000.0,"minimum":0.0},{"type":"null"}],"title":"Pt Paise"},"lwf":{"type":"boolean","title":"Lwf","default":false},"tds":{"type":"string","enum":["no","pct10","pct1","fixed"],"title":"Tds","default":"no"},"tds_paise":{"anyOf":[{"type":"integer","maximum":10000000.0,"minimum":0.0},{"type":"null"}],"title":"Tds Paise"},"pf_admin_charge":{"type":"boolean","title":"Pf Admin Charge","default":false},"id":{"type":"string","format":"uuid","title":"Id"},"template_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Name"}},"additionalProperties":false,"type":"object","required":["valid_from","amount_paise","id"],"title":"EmployeeSalaryOut"},"EssCan":{"properties":{"punch":{"type":"boolean","title":"Punch"},"attendance":{"type":"boolean","title":"Attendance"},"holidays":{"type":"boolean","title":"Holidays"},"leave":{"type":"boolean","title":"Leave"},"miss_punch":{"type":"boolean","title":"Miss Punch","default":false},"report":{"type":"boolean","title":"Report","default":false}},"type":"object","required":["punch","attendance","holidays","leave"],"title":"EssCan","description":"What the admin allows in the app (company Settings + the employee's own switches)."},"EssDecisionIn":{"properties":{"remark":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Remark"}},"type":"object","title":"EssDecisionIn"},"EssHoliday":{"properties":{"holiday_date":{"type":"string","format":"date","title":"Holiday Date"},"name":{"type":"string","title":"Name"}},"type":"object","required":["holiday_date","name"],"title":"EssHoliday"},"EssHome":{"properties":{"profile":{"$ref":"#/components/schemas/EssProfile"},"today":{"$ref":"#/components/schemas/AttendanceDayDetail"},"month":{"$ref":"#/components/schemas/AttendanceTotals"}},"type":"object","required":["profile","today","month"],"title":"EssHome"},"EssLeave":{"properties":{"balances":{"items":{"$ref":"#/components/schemas/EssLeaveBalance"},"type":"array","title":"Balances"},"requests":{"items":{"$ref":"#/components/schemas/LeaveRequestOut"},"type":"array","title":"Requests"}},"type":"object","required":["balances","requests"],"title":"EssLeave"},"EssLeaveBalance":{"properties":{"leave_type_id":{"type":"string","format":"uuid","title":"Leave Type Id"},"name":{"type":"string","title":"Name"},"code":{"type":"string","title":"Code"},"balance":{"type":"string","title":"Balance"},"allows_half":{"type":"boolean","title":"Allows Half"}},"type":"object","required":["leave_type_id","name","code","balance","allows_half"],"title":"EssLeaveBalance"},"EssLeaveIn":{"properties":{"leave_type_id":{"type":"string","format":"uuid","title":"Leave Type Id"},"from_date":{"type":"string","format":"date","title":"From Date"},"to_date":{"type":"string","format":"date","title":"To Date"},"is_half_day":{"type":"boolean","title":"Is Half Day","default":false},"reason":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Reason"}},"type":"object","required":["leave_type_id","from_date","to_date"],"title":"EssLeaveIn"},"EssLoginIn":{"properties":{"mobile":{"type":"string","pattern":"^[6-9][0-9]{9}$","title":"Mobile"},"password":{"type":"string","maxLength":128,"minLength":1,"title":"Password"}},"type":"object","required":["mobile","password"],"title":"EssLoginIn"},"EssLoginWaiting":{"properties":{"employee_id":{"type":"string","format":"uuid","title":"Employee Id"},"employee_name":{"type":"string","title":"Employee Name"},"employee_code":{"type":"string","title":"Employee Code"},"mobile":{"type":"string","title":"Mobile"},"asked_at":{"type":"string","format":"date-time","title":"Asked At"}},"type":"object","required":["employee_id","employee_name","employee_code","mobile","asked_at"],"title":"EssLoginWaiting"},"EssNote":{"properties":{"kind":{"type":"string","title":"Kind"},"at":{"type":"string","format":"date-time","title":"At"},"day":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Day"},"to_day":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"To Day"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"remark":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remark"}},"type":"object","required":["kind","at"],"title":"EssNote","description":"One line of the app's notification list; the app writes the words, in its own language."},"EssPasswordIn":{"properties":{"mobile":{"type":"string","pattern":"^[6-9][0-9]{9}$","title":"Mobile"},"otp":{"type":"string","pattern":"^[0-9]{6}$","title":"Otp"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password"}},"type":"object","required":["mobile","otp","password"],"title":"EssPasswordIn"},"EssProfile":{"properties":{"name":{"type":"string","title":"Name"},"code":{"type":"string","title":"Code"},"mobile":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mobile"},"job_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Title"},"company_name":{"type":"string","title":"Company Name"},"branch_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Name"},"department_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Department Name"},"can":{"$ref":"#/components/schemas/EssCan"}},"type":"object","required":["name","code","mobile","job_title","company_name","branch_name","department_name","can"],"title":"EssProfile"},"EssPunchIn":{"properties":{"latitude":{"type":"number","maximum":90.0,"minimum":-90.0,"title":"Latitude"},"longitude":{"type":"number","maximum":180.0,"minimum":-180.0,"title":"Longitude"},"accuracy_m":{"type":"number","maximum":100000.0,"minimum":0.0,"title":"Accuracy M"},"selfie":{"type":"string","maxLength":450000,"title":"Selfie"},"mocked":{"type":"boolean","title":"Mocked","default":false},"taken_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Taken At"},"client_punch_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Client Punch Id"}},"type":"object","required":["latitude","longitude","accuracy_m","selfie"],"title":"EssPunchIn"},"EssPunchOut":{"properties":{"punch_time":{"type":"string","format":"date-time","title":"Punch Time"},"repeat":{"type":"boolean","title":"Repeat"},"waits_for_admin":{"type":"boolean","title":"Waits For Admin"}},"type":"object","required":["punch_time","repeat","waits_for_admin"],"title":"EssPunchOut"},"EssPunchRequestIn":{"properties":{"punch_time":{"type":"string","format":"date-time","title":"Punch Time"},"reason":{"type":"string","maxLength":200,"minLength":3,"title":"Reason"}},"type":"object","required":["punch_time","reason"],"title":"EssPunchRequestIn"},"EssPunchRequestList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/EssPunchRequestOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"EssPunchRequestList"},"EssPunchRequestOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"employee_id":{"type":"string","format":"uuid","title":"Employee Id"},"employee_name":{"type":"string","title":"Employee Name"},"employee_code":{"type":"string","title":"Employee Code"},"punch_time":{"type":"string","format":"date-time","title":"Punch Time"},"reason":{"type":"string","title":"Reason"},"status":{"type":"string","title":"Status"},"decided_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Decided At"},"decision_remark":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Remark"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","employee_id","employee_name","employee_code","punch_time","reason","status","decided_at","decision_remark","created_at"],"title":"EssPunchRequestOut"},"EssSettings":{"properties":{"login":{"type":"boolean","title":"Login","default":true},"app_punch":{"type":"boolean","title":"App Punch","default":true},"verify_face":{"type":"boolean","title":"Verify Face","default":true},"approve_app_punch":{"type":"boolean","title":"Approve App Punch","default":false},"view_attendance":{"type":"boolean","title":"View Attendance","default":true},"view_holidays":{"type":"boolean","title":"View Holidays","default":true},"own_report":{"type":"boolean","title":"Own Report","default":true},"leave_request":{"type":"boolean","title":"Leave Request","default":true},"miss_punch_request":{"type":"boolean","title":"Miss Punch Request","default":true},"login_verification_by_owner":{"type":"boolean","title":"Login Verification By Owner","default":false}},"additionalProperties":false,"type":"object","title":"EssSettings"},"EssToken":{"properties":{"token":{"type":"string","title":"Token"},"profile":{"$ref":"#/components/schemas/EssProfile"}},"type":"object","required":["token","profile"],"title":"EssToken"},"ExceptionDayIn":{"properties":{"scopes":{"items":{"$ref":"#/components/schemas/Scope"},"type":"array","maxItems":50,"minItems":1,"title":"Scopes"},"exception_date":{"type":"string","format":"date","title":"Exception Date"},"type":{"type":"string","enum":["half_day","early_closing","late_opening","extra_break","extra_work","custom_time","less_work_done","working_day","weekly_off"],"title":"Type"},"from_time":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"From Time"},"to_time":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"To Time"},"minutes":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":1.0},{"type":"null"}],"title":"Minutes"},"remark":{"type":"string","maxLength":200,"minLength":2,"title":"Remark"}},"type":"object","required":["exception_date","type","remark"],"title":"ExceptionDayIn"},"ExceptionDayOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"exception_date":{"type":"string","format":"date","title":"Exception Date"},"type":{"type":"string","enum":["half_day","early_closing","late_opening","extra_break","extra_work","custom_time","less_work_done","working_day","weekly_off"],"title":"Type"},"from_time":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"From Time"},"to_time":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"To Time"},"minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Minutes"},"remark":{"type":"string","title":"Remark"},"scopes":{"items":{"$ref":"#/components/schemas/Scope"},"type":"array","title":"Scopes"}},"type":"object","required":["id","exception_date","type","from_time","to_time","minutes","remark","scopes"],"title":"ExceptionDayOut"},"ExceptionDayPatch":{"properties":{"exception_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Exception Date"},"type":{"anyOf":[{"type":"string","enum":["half_day","early_closing","late_opening","extra_break","extra_work","custom_time","less_work_done","working_day","weekly_off"]},{"type":"null"}],"title":"Type"},"from_time":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"From Time"},"to_time":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"To Time"},"minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Minutes"},"remark":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remark"},"scopes":{"anyOf":[{"items":{"$ref":"#/components/schemas/Scope"},"type":"array"},{"type":"null"}],"title":"Scopes"}},"additionalProperties":false,"type":"object","title":"ExceptionDayPatch"},"ExtendTrialIn":{"properties":{"ends_on":{"type":"string","format":"date","title":"Ends On"},"reason":{"type":"string","maxLength":300,"minLength":3,"title":"Reason"}},"type":"object","required":["ends_on","reason"],"title":"ExtendTrialIn"},"FinePolicy":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"rows":{"items":{"$ref":"#/components/schemas/FineRow"},"type":"array","maxItems":20,"title":"Rows","default":[]},"halfday_over_min":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":0.0},{"type":"null"}],"title":"Halfday Over Min"},"fullday_over_min":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":0.0},{"type":"null"}],"title":"Fullday Over Min"},"allowed_days":{"anyOf":[{"type":"integer","maximum":31.0,"minimum":0.0},{"type":"null"}],"title":"Allowed Days"},"allowed_cycle":{"type":"boolean","title":"Allowed Cycle","default":false},"monthly_limit_min":{"anyOf":[{"type":"integer","maximum":44640.0,"minimum":0.0},{"type":"null"}],"title":"Monthly Limit Min"},"cutoff_min":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":0.0},{"type":"null"}],"title":"Cutoff Min"}},"additionalProperties":false,"type":"object","title":"FinePolicy"},"FineRow":{"properties":{"over_min":{"type":"integer","maximum":1440.0,"minimum":0.0,"title":"Over Min"},"mark":{"anyOf":[{"type":"integer","maximum":31.0,"minimum":1.0},{"type":"null"}],"title":"Mark"},"shift_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Shift Id"},"type":{"type":"string","enum":["per_minute","fixed","minute_multiplier","half_day","full_day","day_multiplier","overtime"],"title":"Type","default":"per_minute"},"amount_paise":{"type":"integer","maximum":10000000.0,"minimum":0.0,"title":"Amount Paise","default":0},"multiplier_pct":{"type":"integer","maximum":1000.0,"minimum":0.0,"title":"Multiplier Pct","default":100},"secondary":{"type":"string","enum":["none","fixed","half_day","fixed_hour"],"title":"Secondary","default":"none"},"secondary_paise":{"type":"integer","maximum":10000000.0,"minimum":0.0,"title":"Secondary Paise","default":0},"secondary_min":{"type":"integer","maximum":1440.0,"minimum":0.0,"title":"Secondary Min","default":0}},"additionalProperties":false,"type":"object","required":["over_min"],"title":"FineRow","description":"One time range of a late coming / early going fine (PagarGuru \"Add Time Range\")."},"GstState":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"}},"type":"object","required":["code","name"],"title":"GstState"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HolidayImportCheck":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/HolidayImportRow"},"type":"array","title":"Rows"},"holidays":{"type":"integer","title":"Holidays"},"already":{"type":"integer","title":"Already"},"can_import":{"type":"boolean","title":"Can Import"}},"type":"object","required":["rows","holidays","already","can_import"],"title":"HolidayImportCheck"},"HolidayImportOut":{"properties":{"added":{"type":"integer","title":"Added"},"already":{"type":"integer","title":"Already"}},"type":"object","required":["added","already"],"title":"HolidayImportOut"},"HolidayImportRow":{"properties":{"row":{"type":"integer","title":"Row"},"holiday_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Holiday Date"},"name":{"type":"string","title":"Name"},"applies_to":{"type":"string","title":"Applies To"},"already":{"type":"boolean","title":"Already"},"problems":{"items":{"type":"string"},"type":"array","title":"Problems"}},"type":"object","required":["row","holiday_date","name","applies_to","already","problems"],"title":"HolidayImportRow"},"HolidayIn":{"properties":{"scopes":{"items":{"$ref":"#/components/schemas/Scope"},"type":"array","maxItems":50,"minItems":1,"title":"Scopes"},"holiday_date":{"type":"string","format":"date","title":"Holiday Date"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"cancellation_rule":{"type":"string","enum":["none","sandwich","present_last_7","present_prev_n","present_next_n"],"title":"Cancellation Rule","default":"none"},"cancellation_days":{"anyOf":[{"type":"integer","maximum":31.0,"minimum":1.0},{"type":"null"}],"title":"Cancellation Days"}},"type":"object","required":["holiday_date","name"],"title":"HolidayIn"},"HolidayOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"holiday_date":{"type":"string","format":"date","title":"Holiday Date"},"name":{"type":"string","title":"Name"},"cancellation_rule":{"type":"string","enum":["none","sandwich","present_last_7","present_prev_n","present_next_n"],"title":"Cancellation Rule"},"cancellation_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cancellation Days"},"scopes":{"items":{"$ref":"#/components/schemas/Scope"},"type":"array","title":"Scopes"}},"type":"object","required":["id","holiday_date","name","cancellation_rule","cancellation_days","scopes"],"title":"HolidayOut"},"HolidayPatch":{"properties":{"holiday_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Holiday Date"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"cancellation_rule":{"anyOf":[{"type":"string","enum":["none","sandwich","present_last_7","present_prev_n","present_next_n"]},{"type":"null"}],"title":"Cancellation Rule"},"cancellation_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cancellation Days"},"scopes":{"anyOf":[{"items":{"$ref":"#/components/schemas/Scope"},"type":"array"},{"type":"null"}],"title":"Scopes"}},"additionalProperties":false,"type":"object","title":"HolidayPatch","description":"Send only the fields to change; the result is validated as a whole holiday."},"HolidayPolicy":{"properties":{"weekly_off_needs_present_days":{"anyOf":[{"type":"integer","maximum":7.0,"minimum":0.0},{"type":"null"}],"title":"Weekly Off Needs Present Days"},"sandwich":{"type":"boolean","title":"Sandwich","default":false},"sandwich_needs_both_days":{"type":"boolean","title":"Sandwich Needs Both Days","default":false},"sandwich_skip_on_halfday":{"type":"boolean","title":"Sandwich Skip On Halfday","default":false},"sandwich_on_paid_leave":{"type":"boolean","title":"Sandwich On Paid Leave","default":false}},"additionalProperties":false,"type":"object","title":"HolidayPolicy"},"InvoiceBriefOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"number":{"type":"string","title":"Number"},"invoice_date":{"type":"string","format":"date","title":"Invoice Date"},"period_from":{"type":"string","format":"date","title":"Period From"},"period_to":{"type":"string","format":"date","title":"Period To"},"total_paise":{"type":"integer","title":"Total Paise"}},"type":"object","required":["id","number","invoice_date","period_from","period_to","total_paise"],"title":"InvoiceBriefOut"},"InvoiceOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"number":{"type":"string","title":"Number"},"invoice_date":{"type":"string","format":"date","title":"Invoice Date"},"period_from":{"type":"string","format":"date","title":"Period From"},"period_to":{"type":"string","format":"date","title":"Period To"},"total_paise":{"type":"integer","title":"Total Paise"},"payment_id":{"type":"string","format":"uuid","title":"Payment Id"},"sac":{"type":"string","title":"Sac"},"seller":{"$ref":"#/components/schemas/InvoiceParty"},"buyer":{"$ref":"#/components/schemas/InvoiceParty"},"lines":{"items":{"$ref":"#/components/schemas/BillingLine"},"type":"array","title":"Lines"},"subtotal_paise":{"type":"integer","title":"Subtotal Paise"},"credit_paise":{"type":"integer","title":"Credit Paise"},"taxable_paise":{"type":"integer","title":"Taxable Paise"},"gst_percent":{"type":"integer","title":"Gst Percent"},"cgst_paise":{"type":"integer","title":"Cgst Paise"},"sgst_paise":{"type":"integer","title":"Sgst Paise"},"igst_paise":{"type":"integer","title":"Igst Paise"},"provider_payment_id":{"type":"string","title":"Provider Payment Id"}},"type":"object","required":["id","number","invoice_date","period_from","period_to","total_paise","payment_id","sac","seller","buyer","lines","subtotal_paise","credit_paise","taxable_paise","gst_percent","cgst_paise","sgst_paise","igst_paise","provider_payment_id"],"title":"InvoiceOut"},"InvoiceParty":{"properties":{"name":{"type":"string","title":"Name"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"gstin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gstin"},"state_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State Code"},"state_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State Name"}},"type":"object","required":["name","address","gstin","state_code"],"title":"InvoiceParty"},"LatePolicy":{"properties":{"grace_min":{"type":"integer","maximum":1440.0,"minimum":0.0,"title":"Grace Min","default":10},"halfday_if_late_over_min":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":0.0},{"type":"null"}],"title":"Halfday If Late Over Min"},"allowed_days":{"anyOf":[{"type":"integer","maximum":31.0,"minimum":0.0},{"type":"null"}],"title":"Allowed Days"}},"additionalProperties":false,"type":"object","title":"LatePolicy"},"LatestPunch":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"employee_id":{"type":"string","format":"uuid","title":"Employee Id"},"name":{"type":"string","title":"Name"},"code":{"type":"string","title":"Code"},"punch_time":{"type":"string","format":"date-time","title":"Punch Time"},"source":{"type":"string","title":"Source"},"status":{"type":"string","title":"Status"}},"type":"object","required":["id","employee_id","name","code","punch_time","source","status"],"title":"LatestPunch","description":"One line of the dashboard's \"Latest punches\"."},"LeaveDecisionIn":{"properties":{"remark":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Remark"}},"type":"object","title":"LeaveDecisionIn"},"LeaveImportCheck":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/LeaveImportRow"},"type":"array","title":"Rows"},"leaves":{"type":"integer","title":"Leaves"},"can_import":{"type":"boolean","title":"Can Import"}},"type":"object","required":["rows","leaves","can_import"],"title":"LeaveImportCheck"},"LeaveImportOut":{"properties":{"added":{"type":"integer","title":"Added"}},"type":"object","required":["added"],"title":"LeaveImportOut"},"LeaveImportRow":{"properties":{"row":{"type":"integer","title":"Row"},"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"leave_type":{"type":"string","title":"Leave Type"},"from_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"From Date"},"to_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"To Date"},"days":{"type":"number","title":"Days"},"problems":{"items":{"type":"string"},"type":"array","title":"Problems"}},"type":"object","required":["row","code","name","leave_type","from_date","to_date","days","problems"],"title":"LeaveImportRow"},"LeavePolicy":{"properties":{"auto_adjust_absent":{"type":"boolean","title":"Auto Adjust Absent","default":false},"auto_adjust_limit":{"type":"integer","maximum":31.0,"minimum":0.0,"title":"Auto Adjust Limit","default":0},"short_leave":{"$ref":"#/components/schemas/ShortLeave","default":{"enabled":false,"per_period":2,"max_minutes":120,"covers":["late","early","excess_break"]}},"comp_off":{"$ref":"#/components/schemas/CompOff","default":{"enabled":false,"expire_months":0}},"cancel_paid_leave_if_absent_over":{"anyOf":[{"type":"integer","maximum":31.0,"minimum":0.0},{"type":"null"}],"title":"Cancel Paid Leave If Absent Over"}},"additionalProperties":false,"type":"object","title":"LeavePolicy"},"LeaveRequestIn":{"properties":{"employee_id":{"type":"string","format":"uuid","title":"Employee Id"},"leave_type_id":{"type":"string","format":"uuid","title":"Leave Type Id"},"from_date":{"type":"string","format":"date","title":"From Date"},"to_date":{"type":"string","format":"date","title":"To Date"},"is_half_day":{"type":"boolean","title":"Is Half Day","default":false},"reason":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Reason"},"approve":{"type":"boolean","title":"Approve","default":true}},"type":"object","required":["employee_id","leave_type_id","from_date","to_date"],"title":"LeaveRequestIn"},"LeaveRequestList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LeaveRequestOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"LeaveRequestList"},"LeaveRequestOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"employee_id":{"type":"string","format":"uuid","title":"Employee Id"},"employee_code":{"type":"string","title":"Employee Code"},"employee_name":{"type":"string","title":"Employee Name"},"leave_type_id":{"type":"string","format":"uuid","title":"Leave Type Id"},"leave_type_name":{"type":"string","title":"Leave Type Name"},"leave_type_code":{"type":"string","title":"Leave Type Code"},"from_date":{"type":"string","format":"date","title":"From Date"},"to_date":{"type":"string","format":"date","title":"To Date"},"is_half_day":{"type":"boolean","title":"Is Half Day"},"days":{"type":"string","title":"Days"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"status":{"type":"string","enum":["pending","approved","rejected","cancelled"],"title":"Status"},"source":{"type":"string","title":"Source"},"decided_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Decided At"},"decision_remark":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Remark"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","employee_id","employee_code","employee_name","leave_type_id","leave_type_name","leave_type_code","from_date","to_date","is_half_day","days","reason","status","source","decided_at","decision_remark","created_at"],"title":"LeaveRequestOut"},"LeaveTemplateIn":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"policy":{"type":"string","enum":["yearly","monthly","one_time"],"title":"Policy"},"year_start_month":{"type":"integer","maximum":12.0,"minimum":1.0,"title":"Year Start Month","default":1},"accrual":{"type":"string","enum":["month_start","month_end"],"title":"Accrual","default":"month_start"},"items":{"items":{"$ref":"#/components/schemas/TemplateItem-Input"},"type":"array","maxItems":20,"minItems":1,"title":"Items"}},"type":"object","required":["name","policy","items"],"title":"LeaveTemplateIn"},"LeaveTemplateOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"policy":{"type":"string","enum":["yearly","monthly","one_time"],"title":"Policy"},"year_start_month":{"type":"integer","title":"Year Start Month"},"accrual":{"type":"string","enum":["month_start","month_end"],"title":"Accrual"},"items":{"items":{"$ref":"#/components/schemas/TemplateItem-Output"},"type":"array","title":"Items"}},"type":"object","required":["id","name","policy","year_start_month","accrual","items"],"title":"LeaveTemplateOut"},"LeaveTemplatePatch":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"policy":{"type":"string","enum":["yearly","monthly","one_time"],"title":"Policy"},"year_start_month":{"type":"integer","maximum":12.0,"minimum":1.0,"title":"Year Start Month"},"accrual":{"type":"string","enum":["month_start","month_end"],"title":"Accrual"},"items":{"items":{"$ref":"#/components/schemas/TemplateItem-Input"},"type":"array","maxItems":20,"title":"Items"}},"type":"object","title":"LeaveTemplatePatch"},"LeaveTypeIn":{"properties":{"name":{"type":"string","maxLength":50,"minLength":2,"title":"Name"},"code":{"type":"string","pattern":"^[A-Za-z0-9]{1,10}$","title":"Code"},"is_paid":{"type":"boolean","title":"Is Paid","default":true},"allows_half":{"type":"boolean","title":"Allows Half","default":true},"is_short":{"type":"boolean","title":"Is Short","default":false}},"type":"object","required":["name","code"],"title":"LeaveTypeIn"},"LeaveTypeOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"code":{"type":"string","title":"Code"},"is_paid":{"type":"boolean","title":"Is Paid"},"allows_half":{"type":"boolean","title":"Allows Half"},"is_short":{"type":"boolean","title":"Is Short"},"is_system":{"type":"boolean","title":"Is System"}},"type":"object","required":["id","name","code","is_paid","allows_half","is_short","is_system"],"title":"LeaveTypeOut"},"LeaveTypePatch":{"properties":{"name":{"type":"string","maxLength":50,"minLength":2,"title":"Name"},"code":{"type":"string","pattern":"^[A-Za-z0-9]{1,10}$","title":"Code"},"is_paid":{"type":"boolean","title":"Is Paid"},"allows_half":{"type":"boolean","title":"Allows Half"},"is_short":{"type":"boolean","title":"Is Short"}},"type":"object","title":"LeaveTypePatch"},"LedgerIn":{"properties":{"leave_type_id":{"type":"string","format":"uuid","title":"Leave Type Id"},"qty":{"anyOf":[{"type":"number","maximum":366.0,"minimum":-366.0},{"type":"string"}],"title":"Qty"},"entry_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Entry Date"},"note":{"type":"string","maxLength":200,"minLength":2,"title":"Note"}},"type":"object","required":["leave_type_id","qty","note"],"title":"LedgerIn","description":"Manual correction by the admin: positive adds days, negative removes days."},"LedgerOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"leave_type_id":{"type":"string","format":"uuid","title":"Leave Type Id"},"entry_date":{"type":"string","format":"date","title":"Entry Date"},"qty":{"type":"string","title":"Qty"},"reason":{"type":"string","title":"Reason"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"expires_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expires On"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","leave_type_id","entry_date","qty","reason","note","expires_on","created_at"],"title":"LedgerOut"},"LensAdminIn":{"properties":{"pin":{"type":"string","pattern":"^[0-9]{4}$","title":"Pin"}},"type":"object","required":["pin"],"title":"LensAdminIn"},"LensAdminOut":{"properties":{"admin_token":{"type":"string","title":"Admin Token"}},"type":"object","required":["admin_token"],"title":"LensAdminOut"},"LensBranch":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"LensBranch"},"LensDeviceIn":{"properties":{"link_token":{"type":"string","title":"Link Token"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"branch_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Branch Id"},"pin":{"type":"string","pattern":"^[0-9]{4}$","title":"Pin"}},"type":"object","required":["link_token","name","pin"],"title":"LensDeviceIn"},"LensDeviceOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"branch_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Name"},"last_punch_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Punch At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","branch_name","last_punch_at","created_at"],"title":"LensDeviceOut"},"LensFaceIn":{"properties":{"admin_token":{"type":"string","title":"Admin Token"},"embeddings":{"items":{"items":{"type":"number"},"type":"array","maxItems":128,"minItems":128},"type":"array","maxItems":5,"minItems":1,"title":"Embeddings"}},"type":"object","required":["admin_token","embeddings"],"title":"LensFaceIn"},"LensLinked":{"properties":{"company_name":{"type":"string","title":"Company Name"},"device_name":{"type":"string","title":"Device Name"},"branch_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Name"},"device_token":{"type":"string","title":"Device Token"}},"type":"object","required":["company_name","device_name","branch_name","device_token"],"title":"LensLinked"},"LensMe":{"properties":{"company_name":{"type":"string","title":"Company Name"},"device_name":{"type":"string","title":"Device Name"},"branch_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Name"}},"type":"object","required":["company_name","device_name","branch_name"],"title":"LensMe"},"LensPinIn":{"properties":{"admin_token":{"type":"string","title":"Admin Token"},"pin":{"type":"string","pattern":"^[0-9]{4}$","title":"Pin"}},"type":"object","required":["admin_token","pin"],"title":"LensPinIn"},"LensPunchIn":{"properties":{"embedding":{"items":{"type":"number"},"type":"array","maxItems":128,"minItems":128,"title":"Embedding"},"photo":{"anyOf":[{"type":"string","maxLength":280000},{"type":"null"}],"title":"Photo"},"live_score":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Live Score"},"blink_asked":{"type":"boolean","title":"Blink Asked","default":false}},"type":"object","required":["embedding"],"title":"LensPunchIn"},"LensPunchItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"employee_name":{"type":"string","title":"Employee Name"},"employee_code":{"type":"string","title":"Employee Code"},"punch_time":{"type":"string","format":"date-time","title":"Punch Time"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["id","employee_name","employee_code","punch_time","phone","note"],"title":"LensPunchItem"},"LensPunchOut":{"properties":{"employee_name":{"type":"string","title":"Employee Name"},"employee_code":{"type":"string","title":"Employee Code"},"department":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Department"},"punch_time":{"type":"string","format":"date-time","title":"Punch Time"},"repeat":{"type":"boolean","title":"Repeat"}},"type":"object","required":["employee_name","employee_code","department","punch_time","repeat"],"title":"LensPunchOut"},"LensStaff":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"code":{"type":"string","title":"Code"},"department":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Department"},"has_face":{"type":"boolean","title":"Has Face"}},"type":"object","required":["id","name","code","department","has_face"],"title":"LensStaff"},"LensVerifyIn":{"properties":{"mobile":{"type":"string","pattern":"^[6-9][0-9]{9}$","title":"Mobile"},"otp":{"type":"string","pattern":"^[0-9]{6}$","title":"Otp"}},"type":"object","required":["mobile","otp"],"title":"LensVerifyIn"},"LensVerifyOut":{"properties":{"link_token":{"type":"string","title":"Link Token"},"company_name":{"type":"string","title":"Company Name"},"branches":{"items":{"$ref":"#/components/schemas/LensBranch"},"type":"array","title":"Branches"}},"type":"object","required":["link_token","company_name","branches"],"title":"LensVerifyOut"},"MachineCommandIn":{"properties":{"device_id":{"type":"string","format":"uuid","title":"Device Id"},"action":{"type":"string","enum":["push","delete"],"title":"Action"}},"type":"object","required":["device_id","action"],"title":"MachineCommandIn"},"MachineCommandLast":{"properties":{"action":{"type":"string","title":"Action"},"status":{"type":"string","title":"Status"},"result":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"done_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Done At"}},"type":"object","required":["action","status","result","created_at","done_at"],"title":"MachineCommandLast"},"ManualPaymentIn":{"properties":{"kind":{"type":"string","enum":["new","renew","add_staff","add_whatsapp"],"title":"Kind"},"employees":{"type":"integer","maximum":5000.0,"minimum":1.0,"title":"Employees","default":1},"whatsapp_staff":{"type":"integer","maximum":5000.0,"minimum":0.0,"title":"Whatsapp Staff","default":0},"whatsapp_admins":{"type":"integer","maximum":20.0,"minimum":0.0,"title":"Whatsapp Admins","default":0},"whatsapp_for_new_staff":{"type":"boolean","title":"Whatsapp For New Staff","default":true},"plan_code":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]{1,19}$"},{"type":"null"}],"title":"Plan Code"},"utr":{"type":"string","pattern":"^[A-Za-z0-9]{6,30}$","title":"Utr"},"received_on":{"type":"string","format":"date","title":"Received On"},"note":{"type":"string","maxLength":300,"title":"Note","default":""},"confirm_amount_paise":{"type":"integer","minimum":1.0,"title":"Confirm Amount Paise","description":"Must equal the server's quote, or nothing is saved"}},"additionalProperties":false,"type":"object","required":["kind","utr","received_on","confirm_amount_paise"],"title":"ManualPaymentIn","description":"A bank transfer. What is bought is priced by the server exactly as for Razorpay; the staff user only\nconfirms the amount the server shows arrived in the bank. There is no field for an amount to charge."},"MarketDayPolicy":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"weekdays":{"items":{"type":"integer","maximum":7.0,"minimum":1.0},"type":"array","title":"Weekdays","default":[]},"type":{"type":"string","enum":["extra_days","per_day","fixed"],"title":"Type","default":"per_day"},"count_pct":{"type":"integer","maximum":1000.0,"minimum":0.0,"title":"Count Pct","default":100},"amount_paise":{"type":"integer","maximum":10000000.0,"minimum":0.0,"title":"Amount Paise","default":0}},"additionalProperties":false,"type":"object","title":"MarketDayPolicy","description":"The local market day (shops): being absent on it costs extra, or working on it counts extra."},"MeOut":{"properties":{"user":{"$ref":"#/components/schemas/UserOut"},"company":{"$ref":"#/components/schemas/CompanyBrief"},"role":{"type":"string","title":"Role"},"subscription":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionOut"},{"type":"null"}]}},"type":"object","required":["user","company","role","subscription"],"title":"MeOut"},"MobileChangeIn":{"properties":{"mobile":{"type":"string","pattern":"^[6-9][0-9]{9}$","title":"Mobile"},"otp":{"type":"string","pattern":"^[0-9]{6}$","title":"Otp"},"old_otp":{"type":"string","pattern":"^[0-9]{6}$","title":"Old Otp"}},"type":"object","required":["mobile","otp","old_otp"],"title":"MobileChangeIn"},"MobileOtpOut":{"properties":{"sent":{"type":"boolean","title":"Sent","default":true},"expires_in_seconds":{"type":"integer","title":"Expires In Seconds"},"dev_otp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dev Otp","description":"Only when APP_ENV=local and no SMS provider is set"},"dev_old_otp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dev Old Otp","description":"Local only: the OTP sent to the current mobile"}},"type":"object","required":["expires_in_seconds"],"title":"MobileOtpOut"},"MonthLockIn":{"properties":{"month":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","title":"Month"}},"type":"object","required":["month"],"title":"MonthLockIn"},"MonthLockOut":{"properties":{"month":{"type":"string","title":"Month"},"locked_at":{"type":"string","format":"date-time","title":"Locked At"},"locked_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locked By Name"}},"type":"object","required":["month","locked_at","locked_by_name"],"title":"MonthLockOut"},"NotificationDeliveryOut":{"properties":{"channel":{"type":"string","enum":["whatsapp","email","sms"],"title":"Channel"},"to":{"type":"string","title":"To"},"status":{"type":"string","enum":["queued","sent","skipped","failed"],"title":"Status"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"}},"type":"object","required":["channel","to","status"],"title":"NotificationDeliveryOut"},"NotificationOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"kind":{"type":"string","title":"Kind"},"title":{"type":"string","title":"Title"},"body":{"type":"string","title":"Body"},"link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"read":{"type":"boolean","title":"Read"},"deliveries":{"items":{"$ref":"#/components/schemas/NotificationDeliveryOut"},"type":"array","title":"Deliveries"}},"type":"object","required":["id","kind","title","body","link","created_at","read","deliveries"],"title":"NotificationOut"},"NotificationReadIn":{"properties":{"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":200},{"type":"null"}],"title":"Ids"},"all":{"type":"boolean","title":"All","default":false}},"type":"object","title":"NotificationReadIn"},"NotificationReadOut":{"properties":{"marked":{"type":"integer","title":"Marked"}},"type":"object","required":["marked"],"title":"NotificationReadOut"},"NotificationUnread":{"properties":{"unread":{"type":"integer","title":"Unread"}},"type":"object","required":["unread"],"title":"NotificationUnread"},"OtpSendIn":{"properties":{"mobile":{"type":"string","pattern":"^[6-9][0-9]{9}$","title":"Mobile"}},"type":"object","required":["mobile"],"title":"OtpSendIn"},"OtpSendOut":{"properties":{"sent":{"type":"boolean","title":"Sent","default":true},"expires_in_seconds":{"type":"integer","title":"Expires In Seconds"},"dev_otp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dev Otp","description":"Only when APP_ENV=local and no SMS provider is set"}},"type":"object","required":["expires_in_seconds"],"title":"OtpSendOut"},"OtpVerifyIn":{"properties":{"mobile":{"type":"string","pattern":"^[6-9][0-9]{9}$","title":"Mobile"},"otp":{"type":"string","pattern":"^[0-9]{6}$","title":"Otp"}},"type":"object","required":["mobile","otp"],"title":"OtpVerifyIn"},"OvertimePolicy":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"rows":{"items":{"$ref":"#/components/schemas/OvertimeRow"},"type":"array","maxItems":20,"title":"Rows","default":[]},"halfday_over_min":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":0.0},{"type":"null"}],"title":"Halfday Over Min"},"fullday_over_min":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":0.0},{"type":"null"}],"title":"Fullday Over Min"},"max_min":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":0.0},{"type":"null"}],"title":"Max Min"},"cutoff_min":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":0.0},{"type":"null"}],"title":"Cutoff Min"},"after_actual_work":{"type":"boolean","title":"After Actual Work","default":false},"early":{"type":"boolean","title":"Early","default":false},"cancel_if_no_rate":{"type":"boolean","title":"Cancel If No Rate","default":false}},"additionalProperties":false,"type":"object","title":"OvertimePolicy"},"OvertimeRow":{"properties":{"over_min":{"type":"integer","maximum":1440.0,"minimum":0.0,"title":"Over Min"},"mark":{"anyOf":[{"type":"integer","maximum":31.0,"minimum":1.0},{"type":"null"}],"title":"Mark"},"shift_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Shift Id"},"type":{"type":"string","enum":["rate","per_minute","fixed","minute_multiplier","half_day","full_day","day_multiplier"],"title":"Type","default":"rate"},"amount_paise":{"type":"integer","maximum":10000000.0,"minimum":0.0,"title":"Amount Paise","default":0},"multiplier_pct":{"type":"integer","maximum":1000.0,"minimum":0.0,"title":"Multiplier Pct","default":100},"secondary":{"type":"string","enum":["none","fixed","half_day","fixed_hour"],"title":"Secondary","default":"none"},"secondary_paise":{"type":"integer","maximum":10000000.0,"minimum":0.0,"title":"Secondary Paise","default":0},"secondary_min":{"type":"integer","maximum":1440.0,"minimum":0.0,"title":"Secondary Min","default":0},"interval_min":{"type":"integer","maximum":1440.0,"minimum":0.0,"title":"Interval Min","default":0}},"additionalProperties":false,"type":"object","required":["over_min"],"title":"OvertimeRow","description":"One time range of overtime pay; \"rate\" = the employee's own overtime rate per hour."},"PanelUserIn":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"mobile":{"type":"string","pattern":"^[6-9][0-9]{9}$","title":"Mobile"}},"type":"object","required":["name","mobile"],"title":"PanelUserIn"},"PanelUserOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"mobile":{"type":"string","title":"Mobile"},"role":{"type":"string","enum":["owner","admin"],"title":"Role"},"last_login_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Login At"},"added_at":{"type":"string","format":"date-time","title":"Added At"}},"type":"object","required":["id","name","mobile","role","last_login_at","added_at"],"title":"PanelUserOut"},"PasswordLoginIn":{"properties":{"mobile":{"type":"string","pattern":"^[6-9][0-9]{9}$","title":"Mobile"},"password":{"type":"string","maxLength":128,"minLength":1,"title":"Password"}},"type":"object","required":["mobile","password"],"title":"PasswordLoginIn"},"PasswordResetIn":{"properties":{"mobile":{"type":"string","pattern":"^[6-9][0-9]{9}$","title":"Mobile"},"otp":{"type":"string","pattern":"^[0-9]{6}$","title":"Otp"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password"}},"type":"object","required":["mobile","otp","password"],"title":"PasswordResetIn","description":"Set a new password (or the first one) with an OTP sent to the mobile."},"PayslipOut":{"properties":{"month":{"type":"string","format":"date","title":"Month"},"month_days":{"type":"integer","title":"Month Days"},"paid_days":{"type":"string","title":"Paid Days"},"earnings":{"additionalProperties":{"type":"integer"},"type":"object","title":"Earnings"},"gross":{"type":"integer","title":"Gross"},"overtime":{"type":"integer","title":"Overtime"},"bonus":{"type":"integer","title":"Bonus"},"market_deduction":{"type":"integer","title":"Market Deduction"},"late_fine":{"type":"integer","title":"Late Fine"},"early_fine":{"type":"integer","title":"Early Fine"},"pf":{"type":"integer","title":"Pf"},"esi":{"type":"integer","title":"Esi"},"pt":{"type":"integer","title":"Pt"},"tds":{"type":"integer","title":"Tds"},"lwf":{"type":"integer","title":"Lwf"},"employer_share_cut":{"type":"integer","title":"Employer Share Cut"},"reimbursement":{"type":"integer","title":"Reimbursement"},"net":{"type":"integer","title":"Net"},"employer_pf":{"type":"integer","title":"Employer Pf"},"employer_esi":{"type":"integer","title":"Employer Esi"},"pf_admin":{"type":"integer","title":"Pf Admin"},"edli":{"type":"integer","title":"Edli"},"employer_lwf":{"type":"integer","title":"Employer Lwf"},"ctc":{"type":"integer","title":"Ctc"},"remarks":{"items":{"type":"string"},"type":"array","title":"Remarks"},"version":{"type":"integer","title":"Version"}},"type":"object","required":["month","month_days","paid_days","earnings","gross","overtime","bonus","market_deduction","late_fine","early_fine","pf","esi","pt","tds","lwf","employer_share_cut","reimbursement","net","employer_pf","employer_esi","pf_admin","edli","employer_lwf","ctc","remarks","version"],"title":"PayslipOut","description":"What the payroll engine worked out (paise). `earnings`: salary part number -> paise."},"Policies":{"properties":{"v":{"type":"integer","const":1,"title":"V","default":1},"holiday":{"$ref":"#/components/schemas/HolidayPolicy","default":{"sandwich":false,"sandwich_needs_both_days":false,"sandwich_skip_on_halfday":false,"sandwich_on_paid_leave":false}},"late":{"$ref":"#/components/schemas/LatePolicy","default":{"grace_min":10}},"early":{"$ref":"#/components/schemas/EarlyPolicy","default":{"grace_min":0,"weekday_allowance":[]}},"break":{"$ref":"#/components/schemas/BreakPolicy","default":{"multiple":true}},"basic":{"$ref":"#/components/schemas/BasicPolicy","default":{"auto_out_punch":false,"fix_in_out":false,"roundup_min":0}},"leave":{"$ref":"#/components/schemas/LeavePolicy","default":{"auto_adjust_absent":false,"auto_adjust_limit":0,"short_leave":{"covers":["late","early","excess_break"],"enabled":false,"max_minutes":120,"per_period":2},"comp_off":{"enabled":false,"expire_months":0}}},"roster":{"$ref":"#/components/schemas/RosterPolicy","default":{"rotation":false,"roster":false}},"salary":{"$ref":"#/components/schemas/SalaryPolicy","default":{"management":"none","daily_pay_offs":false,"late_fine":{"allowed_cycle":false,"enabled":false,"rows":[]},"early_fine":{"allowed_cycle":false,"enabled":false,"rows":[]},"overtime":{"after_actual_work":false,"cancel_if_no_rate":false,"early":false,"enabled":false,"rows":[]},"bonus":{"daily_paise":0,"monthly":false,"one_absent_paise":0,"three_absent_paise":0},"market_day":{"amount_paise":0,"count_pct":100,"enabled":false,"type":"per_day","weekdays":[]},"compliance":{"employer_share_from_employee":false,"enabled":false,"esi_after_fines":false,"esi_holiday":true,"esi_overtime":true,"esi_reimburse":false,"pf_reimburse":false,"pt_holiday":true,"pt_overtime":true}}}},"additionalProperties":false,"type":"object","title":"Policies","description":"Full policies in responses. In a POST / PATCH body, send only the sections / keys to set."},"ProfileIn":{"properties":{"dob":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Dob"},"anniversary":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Anniversary"},"temp_address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Temp Address"},"perm_address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Perm Address"},"alt_mobile":{"anyOf":[{"type":"string","maxLength":10,"pattern":"^[6-9][0-9]{9}$"},{"type":"null"}],"title":"Alt Mobile"},"qualification":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Qualification"},"blood_group":{"anyOf":[{"type":"string","maxLength":5},{"type":"null"}],"title":"Blood Group"},"marital_status":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Marital Status"},"father_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Father Name"}},"type":"object","title":"ProfileIn"},"ProfileOut":{"properties":{"dob":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Dob"},"anniversary":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Anniversary"},"temp_address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Temp Address"},"perm_address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Perm Address"},"alt_mobile":{"anyOf":[{"type":"string","maxLength":10,"pattern":"^[6-9][0-9]{9}$"},{"type":"null"}],"title":"Alt Mobile"},"qualification":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Qualification"},"blood_group":{"anyOf":[{"type":"string","maxLength":5},{"type":"null"}],"title":"Blood Group"},"marital_status":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Marital Status"},"father_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Father Name"}},"type":"object","title":"ProfileOut"},"PublicPlanOut":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"price_per_employee_year_paise":{"type":"integer","title":"Price Per Employee Year Paise"},"whatsapp_staff_paise_year":{"type":"integer","title":"Whatsapp Staff Paise Year"},"whatsapp_admin_paise_year":{"type":"integer","title":"Whatsapp Admin Paise Year"},"trial_days":{"type":"integer","title":"Trial Days"},"trial_staff":{"type":"integer","title":"Trial Staff"},"is_trial":{"type":"boolean","title":"Is Trial"},"max_devices":{"type":"integer","title":"Max Devices"},"max_admins":{"type":"integer","title":"Max Admins"},"features":{"items":{"type":"string"},"type":"array","title":"Features"}},"type":"object","required":["code","name","description","price_per_employee_year_paise","whatsapp_staff_paise_year","whatsapp_admin_paise_year","trial_days","trial_staff","is_trial","max_devices","max_admins","features"],"title":"PublicPlanOut","description":"A plan shown to customers (website pricing, Billing page). Prices in paise, per staff per year."},"PunchImportCheck":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/PunchImportRow"},"type":"array","title":"Rows"},"punches":{"type":"integer","title":"Punches"},"already":{"type":"integer","title":"Already"},"can_import":{"type":"boolean","title":"Can Import"}},"type":"object","required":["rows","punches","already","can_import"],"title":"PunchImportCheck"},"PunchImportOut":{"properties":{"added":{"type":"integer","title":"Added"},"already":{"type":"integer","title":"Already"}},"type":"object","required":["added","already"],"title":"PunchImportOut"},"PunchImportRow":{"properties":{"row":{"type":"integer","title":"Row"},"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"work_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Work Date"},"punches":{"type":"integer","title":"Punches"},"already":{"type":"integer","title":"Already"},"problems":{"items":{"type":"string"},"type":"array","title":"Problems"}},"type":"object","required":["row","code","name","work_date","punches","already","problems"],"title":"PunchImportRow"},"PunchIn":{"properties":{"employee_id":{"type":"string","format":"uuid","title":"Employee Id"},"punch_time":{"type":"string","format":"date-time","title":"Punch Time"},"note":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Note"}},"type":"object","required":["employee_id","punch_time"],"title":"PunchIn"},"PunchLogOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"punch_time":{"type":"string","format":"date-time","title":"Punch Time"},"source":{"type":"string","title":"Source"},"status":{"type":"string","title":"Status"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name"},"received_at":{"type":"string","format":"date-time","title":"Received At"},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latitude"},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Longitude"},"accuracy_m":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Accuracy M"}},"type":"object","required":["id","punch_time","source","status","note","created_by_name","received_at"],"title":"PunchLogOut"},"PunchOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"punch_time":{"type":"string","format":"date-time","title":"Punch Time"},"source":{"type":"string","title":"Source"},"status":{"type":"string","title":"Status"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["id","punch_time","source","status","note"],"title":"PunchOut"},"PunchRejectIn":{"properties":{"note":{"type":"string","maxLength":200,"minLength":2,"title":"Note"}},"type":"object","required":["note"],"title":"PunchRejectIn"},"PunchSettings":{"properties":{"double_punch_interval_min":{"type":"integer","maximum":60.0,"minimum":0.0,"title":"Double Punch Interval Min","default":5},"single_punch_action":{"type":"string","enum":["miss_punch","half_day","absent","present"],"title":"Single Punch Action","default":"miss_punch"}},"additionalProperties":false,"type":"object","title":"PunchSettings"},"ReasonIn":{"properties":{"reason":{"type":"string","maxLength":300,"minLength":3,"title":"Reason"}},"type":"object","required":["reason"],"title":"ReasonIn"},"ReportColumn":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"align":{"type":"string","enum":["left","right","center"],"title":"Align"},"kind":{"type":"string","enum":["text","number","minutes","date","time","status"],"title":"Kind"}},"type":"object","required":["key","label","align","kind"],"title":"ReportColumn"},"ReportInfo":{"properties":{"key":{"type":"string","title":"Key"},"title":{"type":"string","title":"Title"},"group":{"type":"string","title":"Group"},"description":{"type":"string","title":"Description"},"period":{"type":"string","enum":["month","range","date"],"title":"Period"},"filters":{"items":{"type":"string"},"type":"array","title":"Filters"}},"type":"object","required":["key","title","group","description","period","filters"],"title":"ReportInfo"},"ReportOut":{"properties":{"key":{"type":"string","title":"Key"},"title":{"type":"string","title":"Title"},"subtitle":{"type":"string","title":"Subtitle"},"from_date":{"type":"string","format":"date","title":"From Date"},"to_date":{"type":"string","format":"date","title":"To Date"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"columns":{"items":{"$ref":"#/components/schemas/ReportColumn"},"type":"array","title":"Columns"},"rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Rows"},"totals":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Totals"},"subtotals":{"anyOf":[{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object"},{"type":"null"}],"title":"Subtotals"},"legend":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legend"}},"type":"object","required":["key","title","subtitle","from_date","to_date","generated_at","columns","rows"],"title":"ReportOut","description":"One table. `rows` hold values by column key (+ optional `group`); minutes are integers, times ISO\nwith the company's offset, dates YYYY-MM-DD, status the engine's status key or a register letter."},"RosterCell":{"properties":{"work_date":{"type":"string","format":"date","title":"Work Date"},"shift_id":{"type":"string","format":"uuid","title":"Shift Id"},"slot_seq":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Slot Seq"}},"type":"object","required":["work_date","shift_id","slot_seq"],"title":"RosterCell"},"RosterCellIn":{"properties":{"employee_id":{"type":"string","format":"uuid","title":"Employee Id"},"work_date":{"type":"string","format":"date","title":"Work Date"},"shift_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Shift Id"},"slot_seq":{"anyOf":[{"type":"integer","maximum":50.0,"minimum":1.0},{"type":"null"}],"title":"Slot Seq"}},"type":"object","required":["employee_id","work_date","shift_id"],"title":"RosterCellIn"},"RosterDayIn":{"properties":{"employee_id":{"type":"string","format":"uuid","title":"Employee Id"},"work_date":{"type":"string","format":"date","title":"Work Date"},"day_type":{"anyOf":[{"type":"string","enum":["working","half_day","weekly_off","holiday"]},{"type":"null"}],"title":"Day Type"},"start_time":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"End Time"},"break_minutes":{"anyOf":[{"type":"integer","maximum":720.0,"minimum":0.0},{"type":"null"}],"title":"Break Minutes"}},"type":"object","required":["employee_id","work_date","day_type"],"title":"RosterDayIn"},"RosterDayRow":{"properties":{"employee_id":{"type":"string","format":"uuid","title":"Employee Id"},"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"work_date":{"type":"string","format":"date","title":"Work Date"},"normal_shift":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Normal Shift"},"day_type":{"anyOf":[{"type":"string","enum":["working","half_day","weekly_off","holiday"]},{"type":"null"}],"title":"Day Type"},"start_time":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"End Time"},"break_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Break Minutes"},"editable":{"type":"boolean","title":"Editable"}},"type":"object","required":["employee_id","code","name","work_date","normal_shift","day_type","start_time","end_time","break_minutes","editable"],"title":"RosterDayRow"},"RosterDaysOut":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/RosterDayRow"},"type":"array","title":"Rows"}},"type":"object","required":["rows"],"title":"RosterDaysOut"},"RosterDaysSaveIn":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/RosterDayIn"},"type":"array","maxItems":15500,"minItems":1,"title":"Rows"}},"type":"object","required":["rows"],"title":"RosterDaysSaveIn"},"RosterEmployee":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"joining_date":{"type":"string","format":"date","title":"Joining Date"},"leaving_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Leaving Date"},"normal_shift_ids":{"items":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"type":"array","title":"Normal Shift Ids"},"cells":{"items":{"$ref":"#/components/schemas/RosterCell"},"type":"array","title":"Cells"}},"type":"object","required":["id","code","name","joining_date","leaving_date","normal_shift_ids","cells"],"title":"RosterEmployee"},"RosterGrid":{"properties":{"dates":{"items":{"type":"string","format":"date"},"type":"array","title":"Dates"},"locked_months":{"items":{"type":"string"},"type":"array","title":"Locked Months"},"employees":{"items":{"$ref":"#/components/schemas/RosterEmployee"},"type":"array","title":"Employees"}},"type":"object","required":["dates","locked_months","employees"],"title":"RosterGrid"},"RosterImportCheck":{"properties":{"dates":{"items":{"type":"string","format":"date"},"type":"array","title":"Dates"},"rows":{"items":{"$ref":"#/components/schemas/RosterImportRow"},"type":"array","title":"Rows"},"changes":{"type":"integer","title":"Changes"},"can_import":{"type":"boolean","title":"Can Import"}},"type":"object","required":["dates","rows","changes","can_import"],"title":"RosterImportCheck"},"RosterImportRow":{"properties":{"row":{"type":"integer","title":"Row"},"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"changes":{"type":"integer","title":"Changes"},"problems":{"items":{"type":"string"},"type":"array","title":"Problems"}},"type":"object","required":["row","code","name","changes","problems"],"title":"RosterImportRow"},"RosterPolicy":{"properties":{"rotation":{"type":"boolean","title":"Rotation","default":false},"roster":{"type":"boolean","title":"Roster","default":false}},"additionalProperties":false,"type":"object","title":"RosterPolicy"},"RosterSaveIn":{"properties":{"cells":{"items":{"$ref":"#/components/schemas/RosterCellIn"},"type":"array","maxItems":15500,"minItems":1,"title":"Cells"}},"type":"object","required":["cells"],"title":"RosterSaveIn"},"RosterSaveOut":{"properties":{"set":{"type":"integer","title":"Set"},"cleared":{"type":"integer","title":"Cleared"},"unchanged":{"type":"integer","title":"Unchanged"}},"type":"object","required":["set","cleared","unchanged"],"title":"RosterSaveOut"},"RuleSetIn":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"is_active":{"type":"boolean","title":"Is Active","default":true},"policies":{"$ref":"#/components/schemas/Policies","default":{"v":1,"holiday":{"sandwich":false,"sandwich_needs_both_days":false,"sandwich_on_paid_leave":false,"sandwich_skip_on_halfday":false},"late":{"grace_min":10},"early":{"grace_min":0,"weekday_allowance":[]},"break":{"multiple":true},"basic":{"auto_out_punch":false,"fix_in_out":false,"roundup_min":0},"leave":{"auto_adjust_absent":false,"auto_adjust_limit":0,"comp_off":{"enabled":false,"expire_months":0},"short_leave":{"covers":["late","early","excess_break"],"enabled":false,"max_minutes":120,"per_period":2}},"roster":{"roster":false,"rotation":false},"salary":{"bonus":{"daily_paise":0,"monthly":false,"one_absent_paise":0,"three_absent_paise":0},"compliance":{"employer_share_from_employee":false,"enabled":false,"esi_after_fines":false,"esi_holiday":true,"esi_overtime":true,"esi_reimburse":false,"pf_reimburse":false,"pt_holiday":true,"pt_overtime":true},"daily_pay_offs":false,"early_fine":{"allowed_cycle":false,"enabled":false,"rows":[]},"late_fine":{"allowed_cycle":false,"enabled":false,"rows":[]},"management":"none","market_day":{"amount_paise":0,"count_pct":100,"enabled":false,"type":"per_day","weekdays":[]},"overtime":{"after_actual_work":false,"cancel_if_no_rate":false,"early":false,"enabled":false,"rows":[]}}}}},"type":"object","required":["name"],"title":"RuleSetIn"},"RuleSetOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"is_active":{"type":"boolean","title":"Is Active"},"version":{"type":"integer","title":"Version"},"policies":{"$ref":"#/components/schemas/Policies"}},"type":"object","required":["id","name","is_active","version","policies"],"title":"RuleSetOut"},"RuleSetPatch":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"is_active":{"type":"boolean","title":"Is Active"},"policies":{"$ref":"#/components/schemas/Policies"}},"type":"object","title":"RuleSetPatch"},"SalaryBulkIn":{"properties":{"employee_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":500,"minItems":1,"title":"Employee Ids"},"salary":{"$ref":"#/components/schemas/EmployeeSalaryIn"}},"additionalProperties":false,"type":"object","required":["employee_ids","salary"],"title":"SalaryBulkIn"},"SalaryBulkOut":{"properties":{"updated":{"type":"integer","title":"Updated"}},"type":"object","required":["updated"],"title":"SalaryBulkOut"},"SalaryEarning-Input":{"properties":{"component":{"type":"integer","maximum":15.0,"minimum":2.0,"title":"Component"},"percent":{"anyOf":[{"type":"number","exclusiveMaximum":100.0,"exclusiveMinimum":0.0},{"type":"string"}],"title":"Percent"}},"additionalProperties":false,"type":"object","required":["component","percent"],"title":"SalaryEarning"},"SalaryEarning-Output":{"properties":{"component":{"type":"integer","maximum":15.0,"minimum":2.0,"title":"Component"},"percent":{"type":"string","title":"Percent"}},"additionalProperties":false,"type":"object","required":["component","percent"],"title":"SalaryEarning"},"SalaryImportCheck":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/SalaryImportRow"},"type":"array","title":"Rows"},"can_import":{"type":"boolean","title":"Can Import"}},"type":"object","required":["rows","can_import"],"title":"SalaryImportCheck"},"SalaryImportOut":{"properties":{"imported":{"type":"integer","title":"Imported"}},"type":"object","required":["imported"],"title":"SalaryImportOut"},"SalaryImportRow":{"properties":{"row":{"type":"integer","title":"Row"},"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"valid_from":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Valid From"},"amount_paise":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount Paise"},"problems":{"items":{"type":"string"},"type":"array","title":"Problems"}},"type":"object","required":["row","code","name","valid_from","amount_paise","problems"],"title":"SalaryImportRow"},"SalaryPolicy":{"properties":{"salary_days":{"anyOf":[{"type":"integer","maximum":31.0,"minimum":25.0},{"type":"null"}],"title":"Salary Days"},"management":{"type":"string","enum":["none","without_attendance","no_deduction"],"title":"Management","default":"none"},"daily_pay_offs":{"type":"boolean","title":"Daily Pay Offs","default":false},"late_fine":{"$ref":"#/components/schemas/FinePolicy","default":{"enabled":false,"rows":[],"allowed_cycle":false}},"early_fine":{"$ref":"#/components/schemas/FinePolicy","default":{"enabled":false,"rows":[],"allowed_cycle":false}},"overtime":{"$ref":"#/components/schemas/OvertimePolicy","default":{"enabled":false,"rows":[],"after_actual_work":false,"early":false,"cancel_if_no_rate":false}},"bonus":{"$ref":"#/components/schemas/BonusPolicy","default":{"daily_paise":0,"monthly":false,"one_absent_paise":0,"three_absent_paise":0}},"market_day":{"$ref":"#/components/schemas/MarketDayPolicy","default":{"enabled":false,"weekdays":[],"type":"per_day","count_pct":100,"amount_paise":0}},"compliance":{"$ref":"#/components/schemas/CompliancePolicy","default":{"enabled":false,"esi_overtime":true,"esi_holiday":true,"esi_after_fines":false,"pt_overtime":true,"pt_holiday":true,"pf_reimburse":false,"esi_reimburse":false,"employer_share_from_employee":false}}},"additionalProperties":false,"type":"object","title":"SalaryPolicy","description":"Money rules of the payroll engine (Lite, feature `payroll`); attendance does not read them."},"SalarySettings-Input":{"properties":{"payment_day":{"type":"integer","maximum":31.0,"minimum":1.0,"title":"Payment Day","default":10},"fifteen_days":{"type":"boolean","title":"Fifteen Days","default":false},"weekly":{"type":"boolean","title":"Weekly","default":false},"slip_name":{"type":"string","maxLength":40,"title":"Slip Name","default":""},"slip_phone":{"type":"string","maxLength":40,"title":"Slip Phone","default":""},"show_ctc":{"type":"boolean","title":"Show Ctc","default":false},"bank_name":{"type":"string","maxLength":40,"title":"Bank Name","default":""},"bank_account":{"type":"string","pattern":"^([0-9]{6,20})?$","title":"Bank Account","default":""},"bank_ifsc":{"type":"string","title":"Bank Ifsc","default":""}},"additionalProperties":false,"type":"object","title":"SalarySettings"},"SalarySettings-Output":{"properties":{"payment_day":{"type":"integer","maximum":31.0,"minimum":1.0,"title":"Payment Day","default":10},"fifteen_days":{"type":"boolean","title":"Fifteen Days","default":false},"weekly":{"type":"boolean","title":"Weekly","default":false},"slip_name":{"type":"string","maxLength":40,"title":"Slip Name","default":""},"slip_phone":{"type":"string","maxLength":40,"title":"Slip Phone","default":""},"show_ctc":{"type":"boolean","title":"Show Ctc","default":false},"bank_name":{"type":"string","maxLength":40,"title":"Bank Name","default":""},"bank_account":{"type":"string","pattern":"^([0-9]{6,20})?$","title":"Bank Account","default":""},"bank_ifsc":{"type":"string","pattern":"^([A-Z]{4}0[A-Z0-9]{6})?$","title":"Bank Ifsc","default":""}},"additionalProperties":false,"type":"object","title":"SalarySettings"},"SalaryStructure":{"properties":{"components":{"items":{"type":"string","maxLength":40},"type":"array","maxItems":15,"minItems":15,"title":"Components","default":["Basic+DA","HRA","Medical Allowance","Special Allowance","Travelling Allowance","Conveyance Allowance","Education Allowance","Telephone Allowance","Other Allowance","","","","","",""]},"overtime_name":{"type":"string","maxLength":40,"title":"Overtime Name","default":"Overtime"},"employee_deductions":{"items":{"type":"string","maxLength":40},"type":"array","maxItems":3,"minItems":3,"title":"Employee Deductions","default":["","",""]},"employer_contributions":{"items":{"type":"string","maxLength":40},"type":"array","maxItems":3,"minItems":3,"title":"Employer Contributions","default":["","",""]},"punch_day_contribution":{"type":"string","maxLength":40,"title":"Punch Day Contribution","default":""},"pf_on":{"type":"string","enum":["all","selected"],"title":"Pf On","default":"all"},"pf_components":{"items":{"type":"integer","maximum":15.0,"minimum":1.0},"type":"array","title":"Pf Components","default":[]},"esi_on":{"type":"string","enum":["all","selected"],"title":"Esi On","default":"all"},"esi_components":{"items":{"type":"integer","maximum":15.0,"minimum":1.0},"type":"array","title":"Esi Components","default":[]}},"additionalProperties":false,"type":"object","title":"SalaryStructure","description":"Names of the salary parts (PagarGuru \"Salary Structure Setting\"): 15 fixed earning slots, slot 1 is\nBasic+DA and always named; PF / ESI on all earnings or on the selected slots."},"SalaryTemplateIn":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"earnings":{"items":{"$ref":"#/components/schemas/SalaryEarning-Input"},"type":"array","title":"Earnings","default":[]},"pf":{"type":"string","enum":["no","auto","pct12","fixed"],"title":"Pf","default":"no"},"esi":{"type":"string","enum":["no","auto","fixed"],"title":"Esi","default":"no"},"pt_auto":{"type":"boolean","title":"Pt Auto","default":false},"tds":{"type":"string","enum":["no","pct10","pct1","fixed"],"title":"Tds","default":"no"},"pf_admin_charge":{"type":"boolean","title":"Pf Admin Charge","default":false}},"additionalProperties":false,"type":"object","required":["name"],"title":"SalaryTemplateIn"},"SalaryTemplateOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"basic_percent":{"type":"string","title":"Basic Percent"},"earnings":{"items":{"$ref":"#/components/schemas/SalaryEarning-Output"},"type":"array","title":"Earnings"},"pf":{"type":"string","enum":["no","auto","pct12","fixed"],"title":"Pf"},"esi":{"type":"string","enum":["no","auto","fixed"],"title":"Esi"},"pt_auto":{"type":"boolean","title":"Pt Auto"},"tds":{"type":"string","enum":["no","pct10","pct1","fixed"],"title":"Tds"},"pf_admin_charge":{"type":"boolean","title":"Pf Admin Charge"}},"type":"object","required":["id","name","basic_percent","earnings","pf","esi","pt_auto","tds","pf_admin_charge"],"title":"SalaryTemplateOut"},"SalaryTemplatePatch":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"earnings":{"items":{"$ref":"#/components/schemas/SalaryEarning-Input"},"type":"array","title":"Earnings"},"pf":{"type":"string","enum":["no","auto","pct12","fixed"],"title":"Pf"},"esi":{"type":"string","enum":["no","auto","fixed"],"title":"Esi"},"pt_auto":{"type":"boolean","title":"Pt Auto"},"tds":{"type":"string","enum":["no","pct10","pct1","fixed"],"title":"Tds"},"pf_admin_charge":{"type":"boolean","title":"Pf Admin Charge"}},"additionalProperties":false,"type":"object","title":"SalaryTemplatePatch"},"Scope":{"properties":{"scope_type":{"type":"string","enum":["all","branch","department","employee","shift"],"title":"Scope Type"},"scope_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scope Id"}},"type":"object","required":["scope_type"],"title":"Scope","description":"Who the day applies to: `all` (no id), or a branch / department / employee / shift id."},"SessionOut":{"properties":{"access_token":{"type":"string","title":"Access Token"},"user":{"$ref":"#/components/schemas/UserOut"},"company":{"$ref":"#/components/schemas/CompanyBrief"},"role":{"type":"string","title":"Role"}},"type":"object","required":["access_token","user","company","role"],"title":"SessionOut","description":"A logged-in session. The refresh token is not here: it is set as an httpOnly cookie."},"ShiftIn":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"type":{"type":"string","enum":["single","rotation","open","daywise"],"title":"Type"},"excess_before_min":{"type":"integer","maximum":1440.0,"minimum":0.0,"title":"Excess Before Min","default":120},"excess_after_min":{"type":"integer","maximum":1440.0,"minimum":0.0,"title":"Excess After Min","default":540},"break_minutes":{"type":"integer","maximum":1440.0,"minimum":0.0,"title":"Break Minutes","default":0},"break_fixed_from":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Break Fixed From"},"break_fixed_to":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Break Fixed To"},"absent_below_minutes":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":0.0},{"type":"null"}],"title":"Absent Below Minutes"},"halfday_from_minutes":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":0.0},{"type":"null"}],"title":"Halfday From Minutes"},"halfday_to_minutes":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":0.0},{"type":"null"}],"title":"Halfday To Minutes"},"weekly_off_1":{"items":{"type":"integer","maximum":7.0,"minimum":1.0},"type":"array","title":"Weekly Off 1","default":[7]},"weekly_off_2":{"items":{"type":"integer","maximum":7.0,"minimum":1.0},"type":"array","title":"Weekly Off 2","default":[]},"weekly_off_2_weeks":{"items":{"type":"integer","maximum":5.0,"minimum":1.0},"type":"array","title":"Weekly Off 2 Weeks","default":[]},"weekly_off_half":{"items":{"type":"integer","maximum":7.0,"minimum":1.0},"type":"array","title":"Weekly Off Half","default":[]},"open_work_minutes":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":1.0},{"type":"null"}],"title":"Open Work Minutes"},"open_max_minutes":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":0.0},{"type":"null"}],"title":"Open Max Minutes"},"open_in_from":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Open In From"},"open_in_to":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Open In To"},"rotate_every":{"anyOf":[{"type":"integer","maximum":365.0,"minimum":1.0},{"type":"null"}],"title":"Rotate Every"},"rotate_unit":{"anyOf":[{"type":"string","enum":["day","week","month"]},{"type":"null"}],"title":"Rotate Unit"},"slots":{"items":{"$ref":"#/components/schemas/SlotIn"},"type":"array","maxItems":31,"title":"Slots","default":[]}},"type":"object","required":["name","type"],"title":"ShiftIn"},"ShiftOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"type":"string","enum":["single","rotation","open","daywise"],"title":"Type"},"excess_before_min":{"type":"integer","title":"Excess Before Min"},"excess_after_min":{"type":"integer","title":"Excess After Min"},"break_minutes":{"type":"integer","title":"Break Minutes"},"break_fixed_from":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Break Fixed From"},"break_fixed_to":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Break Fixed To"},"absent_below_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Absent Below Minutes"},"halfday_from_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Halfday From Minutes"},"halfday_to_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Halfday To Minutes"},"weekly_off_1":{"items":{"type":"integer"},"type":"array","title":"Weekly Off 1"},"weekly_off_2":{"items":{"type":"integer"},"type":"array","title":"Weekly Off 2"},"weekly_off_2_weeks":{"items":{"type":"integer"},"type":"array","title":"Weekly Off 2 Weeks"},"weekly_off_half":{"items":{"type":"integer"},"type":"array","title":"Weekly Off Half"},"open_work_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Open Work Minutes"},"open_max_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Open Max Minutes"},"open_in_from":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Open In From"},"open_in_to":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Open In To"},"rotate_every":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rotate Every"},"rotate_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rotate Unit"},"slots":{"items":{"$ref":"#/components/schemas/SlotOut"},"type":"array","title":"Slots"}},"type":"object","required":["id","name","type","excess_before_min","excess_after_min","break_minutes","break_fixed_from","break_fixed_to","absent_below_minutes","halfday_from_minutes","halfday_to_minutes","weekly_off_1","weekly_off_2","weekly_off_2_weeks","weekly_off_half","open_work_minutes","open_max_minutes","open_in_from","open_in_to","rotate_every","rotate_unit","slots"],"title":"ShiftOut"},"ShiftPatch":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"type":{"type":"string","enum":["single","rotation","open","daywise"],"title":"Type"},"excess_before_min":{"type":"integer","maximum":1440.0,"minimum":0.0,"title":"Excess Before Min"},"excess_after_min":{"type":"integer","maximum":1440.0,"minimum":0.0,"title":"Excess After Min"},"break_minutes":{"type":"integer","maximum":1440.0,"minimum":0.0,"title":"Break Minutes"},"break_fixed_from":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Break Fixed From"},"break_fixed_to":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Break Fixed To"},"absent_below_minutes":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":0.0},{"type":"null"}],"title":"Absent Below Minutes"},"halfday_from_minutes":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":0.0},{"type":"null"}],"title":"Halfday From Minutes"},"halfday_to_minutes":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":0.0},{"type":"null"}],"title":"Halfday To Minutes"},"weekly_off_1":{"items":{"type":"integer","maximum":7.0,"minimum":1.0},"type":"array","title":"Weekly Off 1"},"weekly_off_2":{"items":{"type":"integer","maximum":7.0,"minimum":1.0},"type":"array","title":"Weekly Off 2"},"weekly_off_2_weeks":{"items":{"type":"integer","maximum":5.0,"minimum":1.0},"type":"array","title":"Weekly Off 2 Weeks"},"weekly_off_half":{"items":{"type":"integer","maximum":7.0,"minimum":1.0},"type":"array","title":"Weekly Off Half"},"open_work_minutes":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":1.0},{"type":"null"}],"title":"Open Work Minutes"},"open_max_minutes":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":0.0},{"type":"null"}],"title":"Open Max Minutes"},"open_in_from":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Open In From"},"open_in_to":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Open In To"},"rotate_every":{"anyOf":[{"type":"integer","maximum":365.0,"minimum":1.0},{"type":"null"}],"title":"Rotate Every"},"rotate_unit":{"anyOf":[{"type":"string","enum":["day","week","month"]},{"type":"null"}],"title":"Rotate Unit"},"slots":{"items":{"$ref":"#/components/schemas/SlotIn"},"type":"array","maxItems":31,"title":"Slots"}},"type":"object","title":"ShiftPatch"},"ShortLeave":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"per_period":{"type":"integer","maximum":31.0,"minimum":0.0,"title":"Per Period","default":2},"max_minutes":{"type":"integer","maximum":1440.0,"minimum":0.0,"title":"Max Minutes","default":120},"covers":{"items":{"type":"string","enum":["late","early","excess_break"]},"type":"array","title":"Covers","default":["late","early","excess_break"]}},"additionalProperties":false,"type":"object","title":"ShortLeave"},"SignupIn":{"properties":{"signup_token":{"type":"string","title":"Signup Token"},"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"company_name":{"type":"string","maxLength":150,"minLength":2,"title":"Company Name"},"city":{"type":"string","maxLength":100,"minLength":2,"title":"City"},"business_type":{"type":"string","enum":["shop","factory","office","hospital","education","hotel","construction","transport","other"],"title":"Business Type"},"employee_band":{"type":"string","enum":["1-10","11-20","21-50","51-100","100+"],"title":"Employee Band"},"email":{"anyOf":[{"type":"string","maxLength":254,"pattern":"^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$"},{"type":"null"}],"title":"Email"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password"}},"type":"object","required":["signup_token","name","company_name","city","business_type","employee_band","password"],"title":"SignupIn"},"SlotIn":{"properties":{"weekday":{"anyOf":[{"type":"integer","maximum":7.0,"minimum":1.0},{"type":"null"}],"title":"Weekday"},"start_time":{"type":"string","format":"time","title":"Start Time"},"end_time":{"type":"string","format":"time","title":"End Time"},"break_minutes":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":0.0},{"type":"null"}],"title":"Break Minutes"},"next_slot_punch_from":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Next Slot Punch From"}},"type":"object","required":["start_time","end_time"],"title":"SlotIn","description":"`seq` and `work_minutes` are set by the server (seq = position in the list; daywise: by weekday)."},"SlotOut":{"properties":{"seq":{"type":"integer","title":"Seq"},"weekday":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Weekday"},"start_time":{"type":"string","format":"time","title":"Start Time"},"end_time":{"type":"string","format":"time","title":"End Time"},"work_minutes":{"type":"integer","title":"Work Minutes"},"break_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Break Minutes"},"next_slot_punch_from":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Next Slot Punch From"}},"type":"object","required":["seq","weekday","start_time","end_time","work_minutes","break_minutes","next_slot_punch_from"],"title":"SlotOut"},"StaffAuditOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"at":{"type":"string","format":"date-time","title":"At"},"staff_id":{"type":"string","format":"uuid","title":"Staff Id"},"staff_name":{"type":"string","title":"Staff Name"},"action":{"type":"string","title":"Action"},"company_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Company Id"},"before":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Before"},"after":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"After"},"ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip"}},"type":"object","required":["id","at","staff_id","staff_name","action","company_id","before","after","ip"],"title":"StaffAuditOut"},"StaffIn":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"mobile":{"type":"string","pattern":"^[6-9][0-9]{9}$","title":"Mobile"},"email":{"anyOf":[{"type":"string","maxLength":254,"pattern":"^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$"},{"type":"null"}],"title":"Email"},"password":{"type":"string","maxLength":128,"minLength":12,"title":"Password"},"permissions":{"items":{"type":"string","enum":["companies.view","companies.extend_trial","companies.close","payments.manual","companies.open_panel"]},"type":"array","title":"Permissions","default":[]}},"additionalProperties":false,"type":"object","required":["name","mobile","password"],"title":"StaffIn"},"StaffLoginIn":{"properties":{"mobile":{"type":"string","pattern":"^[6-9][0-9]{9}$","title":"Mobile"},"password":{"type":"string","maxLength":128,"minLength":1,"title":"Password"}},"type":"object","required":["mobile","password"],"title":"StaffLoginIn"},"StaffLoginOut":{"properties":{"login_token":{"type":"string","title":"Login Token"},"expires_in_seconds":{"type":"integer","title":"Expires In Seconds"},"dev_otp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dev Otp","description":"Only when APP_ENV=local and no SMS provider is set"}},"type":"object","required":["login_token","expires_in_seconds"],"title":"StaffLoginOut","description":"Password was right: an OTP went to the mobile. Send it with `login_token` to /console/auth/verify."},"StaffMeOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"mobile":{"type":"string","title":"Mobile"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"is_super":{"type":"boolean","title":"Is Super"},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions"}},"type":"object","required":["id","name","mobile","email","is_super","permissions"],"title":"StaffMeOut"},"StaffOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"mobile":{"type":"string","title":"Mobile"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"is_super":{"type":"boolean","title":"Is Super"},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions"},"status":{"type":"string","title":"Status"},"last_login_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Login At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","mobile","email","is_super","permissions","status","last_login_at","created_at"],"title":"StaffOut"},"StaffPasswordIn":{"properties":{"password":{"type":"string","maxLength":128,"minLength":12,"title":"Password"}},"type":"object","required":["password"],"title":"StaffPasswordIn"},"StaffPatch":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":2},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string","maxLength":254,"pattern":"^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$"},{"type":"null"}],"title":"Email"},"permissions":{"anyOf":[{"items":{"type":"string","enum":["companies.view","companies.extend_trial","companies.close","payments.manual","companies.open_panel"]},"type":"array"},{"type":"null"}],"title":"Permissions"},"status":{"anyOf":[{"type":"string","enum":["active","disabled"]},{"type":"null"}],"title":"Status"}},"additionalProperties":false,"type":"object","title":"StaffPatch"},"StaffSessionOut":{"properties":{"access_token":{"type":"string","title":"Access Token"},"staff":{"$ref":"#/components/schemas/StaffMeOut"}},"type":"object","required":["access_token","staff"],"title":"StaffSessionOut","description":"The refresh token is not here: it is an httpOnly cookie for /api/v1/console/auth only."},"StaffVerifyIn":{"properties":{"login_token":{"type":"string","title":"Login Token"},"otp":{"type":"string","pattern":"^[0-9]{6}$","title":"Otp"}},"type":"object","required":["login_token","otp"],"title":"StaffVerifyIn"},"SubscriptionOut":{"properties":{"plan":{"type":"string","title":"Plan"},"status":{"type":"string","title":"Status"},"employee_limit":{"type":"integer","title":"Employee Limit"},"ends_on":{"type":"string","format":"date","title":"Ends On"},"state":{"type":"string","title":"State"},"days_left":{"type":"integer","title":"Days Left"},"plan_name":{"type":"string","title":"Plan Name","default":""},"features":{"items":{"type":"string"},"type":"array","title":"Features","default":[]}},"type":"object","required":["plan","status","employee_limit","ends_on","state","days_left"],"title":"SubscriptionOut"},"TemplateItem-Input":{"properties":{"leave_type_id":{"type":"string","format":"uuid","title":"Leave Type Id"},"count":{"anyOf":[{"type":"number","maximum":366.0,"minimum":0.0},{"type":"string"}],"title":"Count"},"unused_rule":{"type":"string","enum":["lapse","carry_forward"],"title":"Unused Rule","default":"lapse"},"carry_limit":{"anyOf":[{"type":"number","maximum":366.0,"minimum":0.0},{"type":"string"},{"type":"null"}],"title":"Carry Limit"}},"type":"object","required":["leave_type_id","count"],"title":"TemplateItem"},"TemplateItem-Output":{"properties":{"leave_type_id":{"type":"string","format":"uuid","title":"Leave Type Id"},"count":{"type":"string","title":"Count"},"unused_rule":{"type":"string","enum":["lapse","carry_forward"],"title":"Unused Rule","default":"lapse"},"carry_limit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carry Limit"}},"type":"object","required":["leave_type_id","count"],"title":"TemplateItem"},"UserOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"mobile":{"type":"string","title":"Mobile"}},"type":"object","required":["id","name","mobile"],"title":"UserOut"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerifyOut":{"properties":{"session":{"anyOf":[{"$ref":"#/components/schemas/SessionOut"},{"type":"null"}]},"signup_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signup Token"}},"type":"object","title":"VerifyOut","description":"Existing mobile → `session`. New mobile → `signup_token` to send to POST /signup."},"WeekdayAllowance":{"properties":{"weekday":{"type":"integer","maximum":7.0,"minimum":1.0,"title":"Weekday"},"minutes":{"type":"integer","maximum":1440.0,"minimum":0.0,"title":"Minutes"}},"additionalProperties":false,"type":"object","required":["weekday","minutes"],"title":"WeekdayAllowance"}},"securitySchemes":{"HTTPBearer":{"type":"http","description":"Access token from /api/v1/auth/otp/verify","scheme":"bearer"}}}}