{"openapi":"3.1.0","info":{"title":"Sedoickin CNC Control API","description":"Учёт работы цеха ЧПУ-станков «Sedoickin comp.».\n\nРоли: `chief` — генерация QR, отчёты, лицензии; `adjuster` — наладка и нормы; `operator` — смены и расход пластин.","version":"1.0.0"},"paths":{"/auth/login":{"post":{"tags":["auth"],"summary":"Вход по логину и паролю (начальник — +QR 2FA)","operationId":"login_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenPair"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/login-by-qr":{"post":{"tags":["auth"],"summary":"Вход по QR-бирке (наладчик/оператор; начальнику запрещён)","operationId":"login_by_qr_auth_login_by_qr_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginByQRIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenPair"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/refresh":{"post":{"tags":["auth"],"summary":"Обновить пару токенов по refresh-токену","operationId":"refresh_auth_refresh_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenPair"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/logout":{"post":{"tags":["auth"],"summary":"Выход из системы","operationId":"logout_auth_logout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogoutIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/auth/me":{"get":{"tags":["auth"],"summary":"Профиль текущего пользователя","operationId":"me_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}}},"security":[{"HTTPBearer":[]}]}},"/users":{"get":{"tags":["users"],"summary":"Список сотрудников","operationId":"list_users_users_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"role","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Role"},{"type":"null"}],"description":"Фильтр по роли","title":"Role"},"description":"Фильтр по роли"},{"name":"active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Фильтр по активности","title":"Active"},"description":"Фильтр по активности"},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"description":"Поиск по ФИО/логину","title":"Q"},"description":"Поиск по ФИО/логину"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"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":{"type":"array","items":{"$ref":"#/components/schemas/UserOut"},"title":"Response List Users Users Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["users"],"summary":"Создать сотрудника","operationId":"create_user_users_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{user_id}":{"get":{"tags":["users"],"summary":"Карточка сотрудника","operationId":"get_user_users__user_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["users"],"summary":"Изменить сотрудника","operationId":"update_user_users__user_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["users"],"summary":"Отключить сотрудника","operationId":"delete_user_users__user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{user_id}/rotate-qr":{"post":{"tags":["users"],"summary":"Перегенерировать QR сотрудника","operationId":"rotate_user_qr_users__user_id__rotate_qr_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/machines":{"get":{"tags":["machines"],"summary":"Список станков","operationId":"list_machines_machines_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/MachineType"},{"type":"null"}],"description":"Тип станка","title":"Type"},"description":"Тип станка"},{"name":"active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Фильтр по активности","title":"Active"},"description":"Фильтр по активности"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MachineOut"},"title":"Response List Machines Machines Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["machines"],"summary":"Добавить станок","operationId":"create_machine_machines_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/machines/{machine_id}":{"get":{"tags":["machines"],"summary":"Карточка станка","operationId":"get_machine_machines__machine_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"machine_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Machine Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["machines"],"summary":"Изменить станок","operationId":"update_machine_machines__machine_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"machine_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Machine Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["machines"],"summary":"Отключить станок","operationId":"delete_machine_machines__machine_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"machine_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Machine Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/machines/{machine_id}/rotate-qr":{"post":{"tags":["machines"],"summary":"Перегенерировать QR станка","operationId":"rotate_machine_qr_machines__machine_id__rotate_qr_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"machine_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Machine Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/parts":{"get":{"tags":["parts"],"summary":"Список деталей","operationId":"list_parts_parts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"description":"Поиск по коду/названию","title":"Q"},"description":"Поиск по коду/названию"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PartOut"},"title":"Response List Parts Parts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["parts"],"summary":"Добавить деталь","operationId":"create_part_parts_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/parts/{part_id}":{"get":{"tags":["parts"],"summary":"Карточка детали","operationId":"get_part_parts__part_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"part_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Part Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["parts"],"summary":"Изменить деталь","operationId":"update_part_parts__part_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"part_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Part Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["parts"],"summary":"Удалить деталь","operationId":"delete_part_parts__part_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"part_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Part Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/parts/{part_id}/operations":{"get":{"tags":["parts"],"summary":"Операции детали","operationId":"list_part_operations_parts__part_id__operations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"part_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Part Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OperationOut"},"title":"Response List Part Operations Parts  Part Id  Operations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/parts/{part_id}/rotate-qr":{"post":{"tags":["parts"],"summary":"Перегенерировать QR детали","operationId":"rotate_part_qr_parts__part_id__rotate_qr_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"part_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Part Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/operations":{"get":{"tags":["operations"],"summary":"Список операций","operationId":"list_operations_operations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"part_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Фильтр по детали","title":"Part Id"},"description":"Фильтр по детали"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OperationOut"},"title":"Response List Operations Operations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["operations"],"summary":"Добавить операцию","operationId":"create_operation_operations_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/operations/{operation_id}":{"get":{"tags":["operations"],"summary":"Карточка операции","operationId":"get_operation_operations__operation_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"operation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Operation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["operations"],"summary":"Изменить операцию","operationId":"update_operation_operations__operation_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"operation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Operation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["operations"],"summary":"Удалить операцию","operationId":"delete_operation_operations__operation_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"operation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Operation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/operations/{operation_id}/rotate-qr":{"post":{"tags":["operations"],"summary":"Перегенерировать QR операции","operationId":"rotate_operation_qr_operations__operation_id__rotate_qr_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"operation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Operation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/shifts":{"get":{"tags":["shift-templates"],"summary":"Список смен","operationId":"list_shift_templates_shifts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ShiftTemplateOut"},"type":"array","title":"Response List Shift Templates Shifts Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["shift-templates"],"summary":"Добавить смену","operationId":"create_shift_template_shifts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShiftTemplateCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShiftTemplateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/shifts/{shift_id}":{"get":{"tags":["shift-templates"],"summary":"Карточка смены","operationId":"get_shift_template_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/ShiftTemplateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["shift-templates"],"summary":"Изменить смену","operationId":"update_shift_template_shifts__shift_id__put","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/ShiftTemplateUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShiftTemplateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["shift-templates"],"summary":"Удалить смену","operationId":"delete_shift_template_shifts__shift_id__delete","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/MessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/plates":{"get":{"tags":["plates"],"summary":"Список пластин","operationId":"list_plates_plates_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mode","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/PlateMode"},{"type":"null"}],"description":"Режим учёта","title":"Mode"},"description":"Режим учёта"},{"name":"active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Фильтр по активности","title":"Active"},"description":"Фильтр по активности"},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"description":"Поиск по названию/артикулу/партии","title":"Q"},"description":"Поиск по названию/артикулу/партии"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PlateOut"},"title":"Response List Plates Plates Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["plates"],"summary":"Добавить пластину","operationId":"create_plate_plates_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlateCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/plates/{plate_id}":{"get":{"tags":["plates"],"summary":"Карточка пластины","operationId":"get_plate_plates__plate_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["plates"],"summary":"Изменить пластину","operationId":"update_plate_plates__plate_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlateUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["plates"],"summary":"Отключить пластину","operationId":"delete_plate_plates__plate_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/plates/{plate_id}/rotate-qr":{"post":{"tags":["plates"],"summary":"Перегенерировать QR пластины","operationId":"rotate_plate_qr_plates__plate_id__rotate_qr_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/plates/{plate_id}/consumption":{"get":{"tags":["plates"],"summary":"История расхода пластины","operationId":"list_plate_consumption_plates__plate_id__consumption_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PlateConsumeOut"},"title":"Response List Plate Consumption Plates  Plate Id  Consumption Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/qr-generate":{"post":{"tags":["qr"],"summary":"Generate Qr","description":"Сгенерировать подписанные QR-строки для списка записей (только chief).","operationId":"generate_qr_qr_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QrGenerateIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QrGenerateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/qr-generate/pdf":{"post":{"tags":["qr"],"summary":"Generate Qr Pdf","description":"Отрисовать A4-PDF с QR-бирками и вернуть файл (только chief).","operationId":"generate_qr_pdf_qr_generate_pdf_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QrGenerateIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/adjuster/start":{"post":{"tags":["adjuster"],"summary":"Start Adjuster Session","description":"Начать наладку: QR сотрудника + QR станка + QR операции + новая норма.","operationId":"start_adjuster_session_adjuster_start_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdjusterStartIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdjusterSessionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/adjuster/sessions":{"get":{"tags":["adjuster"],"summary":"List Adjuster Sessions","description":"История наладок текущего наладчика (свежие — первыми).","operationId":"list_adjuster_sessions_adjuster_sessions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"machine_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Machine Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdjusterSessionOut"},"title":"Response List Adjuster Sessions Adjuster Sessions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/shift/open":{"post":{"tags":["shift"],"summary":"Open Shift","description":"Открыть смену сканированием своего QR и QR станка.","operationId":"open_shift_shift_open_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShiftOpenIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShiftStateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/shift/current":{"get":{"tags":["shift"],"summary":"Current Shift","description":"Открытая смена текущего оператора или ``null``.","operationId":"current_shift_shift_current_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ShiftStateOut"},{"type":"null"}],"title":"Response Current Shift Shift Current Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/shift/{session_id}":{"get":{"tags":["shift"],"summary":"Get Shift","description":"Состояние смены: оператор — своя, начальник — любая.","operationId":"get_shift_shift__session_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShiftStateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/shift/{session_id}/operation":{"post":{"tags":["shift"],"summary":"Switch Operation","description":"Сканирование QR операции: закрыть текущую сессию, начать новую.","operationId":"switch_operation_shift__session_id__operation_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationSwitchIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShiftStateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/shift/{session_id}/pause":{"post":{"tags":["shift"],"summary":"Pause Shift","description":"Поставить смену на паузу.","operationId":"pause_shift_shift__session_id__pause_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PauseResumeIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShiftStateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/shift/{session_id}/resume":{"post":{"tags":["shift"],"summary":"Resume Shift","description":"Снять смену с паузы (тело запроса необязательно).","operationId":"resume_shift_shift__session_id__resume_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PauseResumeIn"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShiftStateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/shift/{session_id}/part-complete":{"post":{"tags":["shift"],"summary":"Part Complete","description":"Зарегистрировать выпущенные детали по активной операции.","operationId":"part_complete_shift__session_id__part_complete_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartCompleteIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperatorSessionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/shift/{session_id}/plate-consume":{"post":{"tags":["shift"],"summary":"Consume Plate","description":"Списать пластины по QR — подтверждает использование пластин в смене.","operationId":"consume_plate_shift__session_id__plate_consume_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlateConsumeIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlateConsumeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/shift/{session_id}/plates-not-used":{"post":{"tags":["shift"],"summary":"Plates Not Used","description":"Подтвердить, что пластины не использовались (разблокирует закрытие).","operationId":"plates_not_used_shift__session_id__plates_not_used_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShiftStateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/shift/{session_id}/close":{"post":{"tags":["shift"],"summary":"Close Shift","description":"Закрыть смену и вернуть итоговые агрегаты вместе с отчётом.","operationId":"close_shift_shift__session_id__close_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShiftCloseOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/shift/{session_id}/report":{"get":{"tags":["shift"],"summary":"Shift Report","description":"Полный отчёт по смене (оператор — своя, начальник — любая).","operationId":"shift_report_shift__session_id__report_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShiftReportOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/shifts":{"get":{"tags":["reports"],"summary":"Отчёт по сменам за период","operationId":"get_shift_report_reports_shifts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Дата начала (включительно)","title":"Date From"},"description":"Дата начала (включительно)"},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Дата окончания (включительно)","title":"Date To"},"description":"Дата окончания (включительно)"},{"name":"shift_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Шаблон смены","title":"Shift Id"},"description":"Шаблон смены"},{"name":"machine_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Станок","title":"Machine Id"},"description":"Станок"},{"name":"operator_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Оператор","title":"Operator Id"},"description":"Оператор"},{"name":"plate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Пластина","title":"Plate Id"},"description":"Пластина"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":200,"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/ShiftReportPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/machines":{"get":{"tags":["reports"],"summary":"Сводка по станкам","operationId":"get_machine_report_reports_machines_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Дата начала (включительно)","title":"Date From"},"description":"Дата начала (включительно)"},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Дата окончания (включительно)","title":"Date To"},"description":"Дата окончания (включительно)"},{"name":"machine_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Станок","title":"Machine Id"},"description":"Станок"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MachineSummaryRow"},"title":"Response Get Machine Report Reports Machines Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/plates":{"get":{"tags":["reports"],"summary":"Расход пластин за период","operationId":"get_plate_report_reports_plates_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Дата начала (включительно)","title":"Date From"},"description":"Дата начала (включительно)"},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Дата окончания (включительно)","title":"Date To"},"description":"Дата окончания (включительно)"},{"name":"plate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Пластина","title":"Plate Id"},"description":"Пластина"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PlateUsageRow"},"title":"Response Get Plate Report Reports Plates Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/export":{"get":{"tags":["reports"],"summary":"Выгрузка отчёта в XLSX или PDF","operationId":"export_report_reports_export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kind","in":"query","required":true,"schema":{"enum":["shifts","machines","plates"],"type":"string","description":"Тип отчёта","title":"Kind"},"description":"Тип отчёта"},{"name":"format","in":"query","required":false,"schema":{"enum":["xlsx","pdf"],"type":"string","description":"Формат файла","default":"xlsx","title":"Format"},"description":"Формат файла"},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Дата начала (включительно)","title":"Date From"},"description":"Дата начала (включительно)"},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Дата окончания (включительно)","title":"Date To"},"description":"Дата окончания (включительно)"},{"name":"shift_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Шаблон смены","title":"Shift Id"},"description":"Шаблон смены"},{"name":"machine_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Станок","title":"Machine Id"},"description":"Станок"},{"name":"operator_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Оператор","title":"Operator Id"},"description":"Оператор"},{"name":"plate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Пластина","title":"Plate Id"},"description":"Пластина"}],"responses":{"200":{"description":"Файл с Content-Disposition: attachment","content":{"application/json":{"schema":{}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{},"application/pdf":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/license/activate":{"post":{"tags":["license"],"summary":"Activate License","description":"Активировать устройство по короткому ключу или токену из QR.","operationId":"activate_license_license_activate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseActivateIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseActivateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/license/onboard":{"post":{"tags":["license"],"summary":"Onboard Owner","description":"Первичная настройка компании: владелец вводит ключ и создаёт логин/пароль.\n\nСоздаётся chief-аккаунт владельца, лицензия привязывается к нему\n(`created_by`). Пароль хранится только как bcrypt-хэш.","operationId":"onboard_owner_license_onboard_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseOnboardIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseOnboardOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/license/heartbeat":{"post":{"tags":["license"],"summary":"License Heartbeat","description":"Подтвердить lease и получить свежий (403 при revoked/expired).","operationId":"license_heartbeat_license_heartbeat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseHeartbeatIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseHeartbeatOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/license/public-key":{"get":{"tags":["license"],"summary":"Public Key","description":"Публичный ключ вендора для офлайн-проверки лицензий (без JWT).","operationId":"public_key_license_public_key_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Public Key License Public Key Get"}}}}}}},"/license/me":{"get":{"tags":["license"],"summary":"License Me","description":"Лицензия, выпущенная текущим пользователем, и её активации.","operationId":"license_me_license_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseMeOut"}}}}},"security":[{"HTTPBearer":[]}]}},"/license/issue":{"post":{"tags":["license"],"summary":"Issue License","description":"Выпустить новую лицензию и вернуть подписанный токен (только chief).","operationId":"issue_license_license_issue_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseIssueIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseIssueOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/license/import":{"post":{"tags":["license"],"summary":"Import License","description":"Импортировать лицензию, подписанную офлайн-keygen вендора.\n\nЗащищено отдельным секретом ``VENDOR_API_TOKEN``; приватный ключ на сервере\nне нужен — проверяется только Ed25519-подпись публичным ключом.","operationId":"import_license_license_import_post","parameters":[{"name":"X-Vendor-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Vendor-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseImportIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/license/revoke":{"post":{"tags":["license"],"summary":"Revoke License","description":"Отозвать лицензию по id, короткому ключу или полному токену.","operationId":"revoke_license_license_revoke_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseRevokeIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/license/list":{"get":{"tags":["license"],"summary":"List Licenses","description":"Список лицензий с фильтрами по статусу и тарифу (только chief).","operationId":"list_licenses_license_list_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/LicenseStatus"},{"type":"null"}],"title":"Status"}},{"name":"plan","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/LicensePlan"},{"type":"null"}],"title":"Plan"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"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/LicenseListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/license/{license_id}/activations":{"get":{"tags":["license"],"summary":"License Activations","description":"Активации лицензии, включая отозванные (только chief).","operationId":"license_activations_license__license_id__activations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"license_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"License Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ActivationOut"},"title":"Response License Activations License  License Id  Activations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/license/{license_id}":{"get":{"tags":["license"],"summary":"Get License","description":"Карточка лицензии по ``id`` или публичному ``license_id`` (только chief).","operationId":"get_license_license__license_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"license_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"License Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"tags":["server"],"summary":"Admin Panel","description":"HTML-«админ-панель» с версией, uptime и счётчиками (без секретов).","operationId":"admin_panel__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/v1/status":{"get":{"tags":["server"],"summary":"Api Status","description":"JSON-статус сервера для скриптов установщика и меню «Пуск».","operationId":"api_status_api_v1_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusOut"}}}}}}},"/api/v1/update/check":{"get":{"tags":["server"],"summary":"Api Update Check","description":"Проверить обновления сервера (кэш в памяти, сетевые ошибки — не 500).","operationId":"api_update_check_api_v1_update_check_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCheckOut"}}}}}}},"/api/v1/client/android/latest":{"get":{"tags":["server"],"summary":"Android Latest","description":"Сведения о последнем APK Android-клиента (404, если APK не выложен).","operationId":"android_latest_api_v1_client_android_latest_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AndroidLatestOut"}}}}}}},"/download/android":{"get":{"tags":["server"],"summary":"Download Android","description":"Отдать APK Android-клиента (``application/vnd.android.package-archive``).","operationId":"download_android_download_android_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/setup/info":{"get":{"tags":["server"],"summary":"Setup Info","description":"Адрес сервера для установщика/клиентов: SERVER_PUBLIC_URL или Host.","operationId":"setup_info_setup_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupInfoOut"}}}}}}},"/setup/qr.png":{"get":{"tags":["server"],"summary":"Setup Qr Png","description":"PNG QR с адресом сервера (для Android-клиента и печати реквизитов).","operationId":"setup_qr_png_setup_qr_png_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/workshop/status":{"get":{"tags":["workshop"],"summary":"Status","operationId":"status_workshop_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-License-Lease","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-License-Lease"}},{"name":"X-License-Fingerprint","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-License-Fingerprint"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Status Workshop Status Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workshop/snapshot":{"get":{"tags":["workshop"],"summary":"Get Snapshot","operationId":"get_snapshot_workshop_snapshot_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-License-Lease","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-License-Lease"}},{"name":"X-License-Fingerprint","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-License-Fingerprint"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Snapshot Workshop Snapshot Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["workshop"],"summary":"Save Snapshot","operationId":"save_snapshot_workshop_snapshot_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-License-Lease","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-License-Lease"}},{"name":"X-License-Fingerprint","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-License-Fingerprint"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Save Snapshot Workshop Snapshot Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workshop/chat":{"get":{"tags":["workshop"],"summary":"Get Chat","operationId":"get_chat_workshop_chat_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"after_id","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"After Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":200,"title":"Limit"}},{"name":"X-License-Lease","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-License-Lease"}},{"name":"X-License-Fingerprint","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-License-Fingerprint"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Chat Workshop Chat Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["workshop"],"summary":"Send Chat","operationId":"send_chat_workshop_chat_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-License-Lease","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-License-Lease"}},{"name":"X-License-Fingerprint","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-License-Fingerprint"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Send Chat Workshop Chat Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/panel/2fa/setup":{"get":{"tags":["panel"],"summary":"Totp Setup Get","operationId":"totp_setup_get_panel_2fa_setup_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}},"post":{"tags":["panel"],"summary":"Totp Setup Post","operationId":"totp_setup_post_panel_2fa_setup_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_totp_setup_post_panel_2fa_setup_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/panel/login":{"get":{"tags":["panel"],"summary":"Login Form","operationId":"login_form_panel_login_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}},"post":{"tags":["panel"],"summary":"Login","operationId":"login_panel_login_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_login_panel_login_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/panel/logout":{"get":{"tags":["panel"],"summary":"Logout","operationId":"logout_panel_logout_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/panel":{"get":{"tags":["panel"],"summary":"Dashboard","operationId":"dashboard_panel_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/panel/license/revoke":{"post":{"tags":["panel"],"summary":"Revoke License","operationId":"revoke_license_panel_license_revoke_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_revoke_license_panel_license_revoke_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/panel/owner/password":{"post":{"tags":["panel"],"summary":"Reset Owner Password","operationId":"reset_owner_password_panel_owner_password_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_reset_owner_password_panel_owner_password_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/panel/owner/totp-reset":{"post":{"tags":["panel"],"summary":"Reset Owner Totp","operationId":"reset_owner_totp_panel_owner_totp_reset_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_reset_owner_totp_panel_owner_totp_reset_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/panel/device/revoke":{"post":{"tags":["panel"],"summary":"Revoke Device","operationId":"revoke_device_panel_device_revoke_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_revoke_device_panel_device_revoke_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"tags":["system"],"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthOut"}}}}}}}},"components":{"schemas":{"ActivationOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"device_fingerprint":{"type":"string","title":"Device Fingerprint"},"platform":{"$ref":"#/components/schemas/Platform"},"activated_at":{"type":"string","format":"date-time","title":"Activated At"},"last_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen At"},"revoked":{"type":"boolean","title":"Revoked"}},"type":"object","required":["id","device_fingerprint","platform","activated_at","last_seen_at","revoked"],"title":"ActivationOut"},"AdjusterSessionOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"user_name":{"type":"string","title":"User Name"},"machine_id":{"type":"string","format":"uuid","title":"Machine Id"},"machine_name":{"type":"string","title":"Machine Name"},"operation_id":{"type":"string","format":"uuid","title":"Operation Id"},"operation_name":{"type":"string","title":"Operation Name"},"part_code":{"type":"string","title":"Part Code"},"norm_set_minutes":{"type":"number","title":"Norm Set Minutes"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"duration_sec":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Sec"}},"type":"object","required":["id","user_id","user_name","machine_id","machine_name","operation_id","operation_name","part_code","norm_set_minutes","started_at","finished_at"],"title":"AdjusterSessionOut"},"AdjusterStartIn":{"properties":{"user_qr":{"type":"string","maxLength":4096,"minLength":8,"title":"User Qr"},"machine_qr":{"type":"string","maxLength":4096,"minLength":8,"title":"Machine Qr"},"operation_qr":{"type":"string","maxLength":4096,"minLength":8,"title":"Operation Qr"},"norm_set_minutes":{"type":"number","maximum":100000.0,"exclusiveMinimum":0.0,"title":"Norm Set Minutes"}},"type":"object","required":["user_qr","machine_qr","operation_qr","norm_set_minutes"],"title":"AdjusterStartIn"},"AndroidLatestOut":{"properties":{"versionName":{"type":"string","title":"Versionname"},"versionCode":{"type":"integer","title":"Versioncode"},"size":{"type":"integer","title":"Size"},"url":{"type":"string","title":"Url"},"sha256":{"type":"string","title":"Sha256","default":""}},"type":"object","required":["versionName","versionCode","size","url"],"title":"AndroidLatestOut"},"Body_login_panel_login_post":{"properties":{"role":{"type":"string","title":"Role"},"login":{"type":"string","title":"Login"},"password":{"type":"string","title":"Password"},"code":{"type":"string","title":"Code","default":""}},"type":"object","required":["role","login","password"],"title":"Body_login_panel_login_post"},"Body_reset_owner_password_panel_owner_password_post":{"properties":{"user_id":{"type":"string","title":"User Id"},"password":{"type":"string","title":"Password"},"csrf":{"type":"string","title":"Csrf"}},"type":"object","required":["user_id","password","csrf"],"title":"Body_reset_owner_password_panel_owner_password_post"},"Body_reset_owner_totp_panel_owner_totp_reset_post":{"properties":{"user_id":{"type":"string","title":"User Id"},"csrf":{"type":"string","title":"Csrf"}},"type":"object","required":["user_id","csrf"],"title":"Body_reset_owner_totp_panel_owner_totp_reset_post"},"Body_revoke_device_panel_device_revoke_post":{"properties":{"activation_id":{"type":"string","title":"Activation Id"},"csrf":{"type":"string","title":"Csrf"}},"type":"object","required":["activation_id","csrf"],"title":"Body_revoke_device_panel_device_revoke_post"},"Body_revoke_license_panel_license_revoke_post":{"properties":{"license_id":{"type":"string","title":"License Id"},"csrf":{"type":"string","title":"Csrf"}},"type":"object","required":["license_id","csrf"],"title":"Body_revoke_license_panel_license_revoke_post"},"Body_totp_setup_post_panel_2fa_setup_post":{"properties":{"code":{"type":"string","title":"Code","default":""}},"type":"object","title":"Body_totp_setup_post_panel_2fa_setup_post"},"ChatIn":{"properties":{"sender":{"type":"string","maxLength":120,"minLength":1,"title":"Sender"},"text":{"type":"string","maxLength":4000,"minLength":1,"title":"Text"}},"type":"object","required":["sender","text"],"title":"ChatIn"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthOut":{"properties":{"status":{"type":"string","title":"Status"},"version":{"type":"string","title":"Version"},"time":{"type":"string","format":"date-time","title":"Time"},"database":{"type":"string","title":"Database"}},"type":"object","required":["status","version","time","database"],"title":"HealthOut"},"LicenseActivateIn":{"properties":{"license_key":{"type":"string","maxLength":4096,"minLength":8,"title":"License Key"},"fingerprint":{"type":"string","maxLength":128,"minLength":16,"title":"Fingerprint"},"platform":{"$ref":"#/components/schemas/Platform"}},"type":"object","required":["license_key","fingerprint","platform"],"title":"LicenseActivateIn"},"LicenseActivateOut":{"properties":{"lease":{"type":"string","title":"Lease"},"lease_expires_at":{"type":"string","format":"date-time","title":"Lease Expires At"},"license_id":{"type":"string","format":"uuid","title":"License Id"},"tenant":{"type":"string","title":"Tenant"},"plan":{"$ref":"#/components/schemas/LicensePlan"},"status":{"$ref":"#/components/schemas/LicenseStatus"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"max_devices":{"type":"integer","title":"Max Devices"},"features":{"items":{"type":"string"},"type":"array","title":"Features"},"offline_grace_days":{"type":"integer","title":"Offline Grace Days"}},"type":"object","required":["lease","lease_expires_at","license_id","tenant","plan","status","expires_at","max_devices","features","offline_grace_days"],"title":"LicenseActivateOut"},"LicenseHeartbeatIn":{"properties":{"lease":{"type":"string","maxLength":4096,"minLength":10,"title":"Lease"},"fingerprint":{"type":"string","maxLength":128,"minLength":16,"title":"Fingerprint"}},"type":"object","required":["lease","fingerprint"],"title":"LicenseHeartbeatIn"},"LicenseHeartbeatOut":{"properties":{"lease":{"type":"string","title":"Lease"},"lease_expires_at":{"type":"string","format":"date-time","title":"Lease Expires At"},"license_id":{"type":"string","format":"uuid","title":"License Id"},"status":{"$ref":"#/components/schemas/LicenseStatus"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"features":{"items":{"type":"string"},"type":"array","title":"Features"},"offline_grace_days":{"type":"integer","title":"Offline Grace Days"},"server_time":{"type":"string","format":"date-time","title":"Server Time"}},"type":"object","required":["lease","lease_expires_at","license_id","status","expires_at","features","offline_grace_days","server_time"],"title":"LicenseHeartbeatOut"},"LicenseImportIn":{"properties":{"license_key":{"type":"string","maxLength":64,"minLength":8,"title":"License Key"},"license_token":{"type":"string","maxLength":4096,"minLength":20,"title":"License Token"}},"type":"object","required":["license_key","license_token"],"title":"LicenseImportIn","description":"Лицензия, подписанная офлайн-keygen вендора."},"LicenseIssueIn":{"properties":{"plan":{"$ref":"#/components/schemas/LicensePlan"},"tenant":{"type":"string","maxLength":64,"minLength":1,"title":"Tenant","default":"sedoickin"},"max_devices":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":0.0},{"type":"null"}],"title":"Max Devices"},"hw_bind":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Hw Bind"},"days":{"anyOf":[{"type":"integer","maximum":3650.0,"minimum":1.0},{"type":"null"}],"title":"Days"},"features":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Features"}},"type":"object","required":["plan"],"title":"LicenseIssueIn"},"LicenseIssueOut":{"properties":{"license_key":{"type":"string","title":"License Key"},"license_token":{"type":"string","title":"License Token"},"payload":{"type":"object","title":"Payload"},"plan":{"$ref":"#/components/schemas/LicensePlan"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"max_devices":{"type":"integer","title":"Max Devices"},"features":{"items":{"type":"string"},"type":"array","title":"Features"}},"type":"object","required":["license_key","license_token","payload","plan","expires_at","max_devices","features"],"title":"LicenseIssueOut"},"LicenseListOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LicenseOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"LicenseListOut"},"LicenseMeOut":{"properties":{"license_id":{"type":"string","format":"uuid","title":"License Id"},"tenant":{"type":"string","title":"Tenant"},"plan":{"$ref":"#/components/schemas/LicensePlan"},"status":{"$ref":"#/components/schemas/LicenseStatus"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"features":{"items":{"type":"string"},"type":"array","title":"Features"},"max_devices":{"type":"integer","title":"Max Devices"},"activations":{"items":{"$ref":"#/components/schemas/ActivationOut"},"type":"array","title":"Activations"},"server_time":{"type":"string","format":"date-time","title":"Server Time"}},"type":"object","required":["license_id","tenant","plan","status","expires_at","features","max_devices","activations","server_time"],"title":"LicenseMeOut"},"LicenseOnboardIn":{"properties":{"license_key":{"type":"string","maxLength":4096,"minLength":8,"title":"License Key"},"company":{"type":"string","maxLength":64,"minLength":2,"title":"Company"},"owner_login":{"type":"string","maxLength":64,"minLength":3,"title":"Owner Login"},"owner_password":{"type":"string","maxLength":72,"minLength":8,"title":"Owner Password"},"owner_full_name":{"type":"string","maxLength":200,"minLength":3,"title":"Owner Full Name"},"fingerprint":{"type":"string","maxLength":128,"minLength":16,"title":"Fingerprint"},"platform":{"$ref":"#/components/schemas/Platform"}},"type":"object","required":["license_key","company","owner_login","owner_password","owner_full_name","fingerprint","platform"],"title":"LicenseOnboardIn","description":"Первичная настройка компании владельцем по ключу."},"LicenseOnboardOut":{"properties":{"lease":{"type":"string","title":"Lease"},"lease_expires_at":{"type":"string","format":"date-time","title":"Lease Expires At"},"license_id":{"type":"string","format":"uuid","title":"License Id"},"tenant":{"type":"string","title":"Tenant"},"plan":{"$ref":"#/components/schemas/LicensePlan"},"status":{"$ref":"#/components/schemas/LicenseStatus"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"features":{"items":{"type":"string"},"type":"array","title":"Features"},"offline_grace_days":{"type":"integer","title":"Offline Grace Days"},"owner":{"$ref":"#/components/schemas/UserOut"}},"type":"object","required":["lease","lease_expires_at","license_id","tenant","plan","status","expires_at","features","offline_grace_days","owner"],"title":"LicenseOnboardOut"},"LicenseOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"license_key":{"type":"string","title":"License Key"},"license_id":{"type":"string","format":"uuid","title":"License Id"},"tenant":{"type":"string","title":"Tenant"},"plan":{"$ref":"#/components/schemas/LicensePlan"},"issued_at":{"type":"string","format":"date-time","title":"Issued At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"max_devices":{"type":"integer","title":"Max Devices"},"features":{"items":{"type":"string"},"type":"array","title":"Features"},"status":{"$ref":"#/components/schemas/LicenseStatus"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"activations_count":{"type":"integer","title":"Activations Count","default":0}},"type":"object","required":["id","license_key","license_id","tenant","plan","issued_at","expires_at","max_devices","features","status","created_at"],"title":"LicenseOut"},"LicensePlan":{"type":"string","enum":["TRIAL","MONTH","HALF_YEAR","YEAR","ENTERPRISE"],"title":"LicensePlan"},"LicenseRevokeIn":{"properties":{"license_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"License Id"},"license_key":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}],"title":"License Key"},"reason":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Reason"}},"type":"object","title":"LicenseRevokeIn"},"LicenseStatus":{"type":"string","enum":["active","revoked","expired"],"title":"LicenseStatus"},"LoginByQRIn":{"properties":{"user_qr":{"type":"string","maxLength":4096,"minLength":8,"title":"User Qr"}},"type":"object","required":["user_qr"],"title":"LoginByQRIn"},"LoginIn":{"properties":{"login":{"type":"string","maxLength":64,"minLength":1,"title":"Login"},"password":{"type":"string","maxLength":72,"minLength":1,"title":"Password"},"user_qr":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}],"title":"User Qr"}},"type":"object","required":["login","password"],"title":"LoginIn"},"LogoutIn":{"properties":{"refresh_token":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}],"title":"Refresh Token"},"all_devices":{"type":"boolean","title":"All Devices","default":false}},"type":"object","title":"LogoutIn"},"MachineCreate":{"properties":{"name":{"type":"string","maxLength":120,"minLength":2,"title":"Name"},"model":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Model"},"type":{"$ref":"#/components/schemas/MachineType"},"active":{"type":"boolean","title":"Active","default":true}},"type":"object","required":["name","type"],"title":"MachineCreate"},"MachineOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"type":{"$ref":"#/components/schemas/MachineType"},"qr_uuid":{"type":"string","format":"uuid","title":"Qr Uuid"},"active":{"type":"boolean","title":"Active"}},"type":"object","required":["id","name","model","type","qr_uuid","active"],"title":"MachineOut"},"MachineSummaryRow":{"properties":{"machine_id":{"type":"string","format":"uuid","title":"Machine Id"},"machine_name":{"type":"string","title":"Machine Name"},"machine_type":{"$ref":"#/components/schemas/MachineType"},"shifts_count":{"type":"integer","title":"Shifts Count"},"total_active_sec":{"type":"integer","title":"Total Active Sec"},"total_active_human":{"type":"string","title":"Total Active Human"},"total_qty":{"type":"integer","title":"Total Qty"},"total_norm_sec":{"type":"integer","title":"Total Norm Sec"},"deviation_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Deviation Pct"},"plates_qty":{"type":"integer","title":"Plates Qty"},"plates_cost":{"type":"number","title":"Plates Cost"}},"type":"object","required":["machine_id","machine_name","machine_type","shifts_count","total_active_sec","total_active_human","total_qty","total_norm_sec","deviation_pct","plates_qty","plates_cost"],"title":"MachineSummaryRow"},"MachineType":{"type":"string","enum":["turn","mill"],"title":"MachineType"},"MachineUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":120,"minLength":2},{"type":"null"}],"title":"Name"},"model":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Model"},"type":{"anyOf":[{"$ref":"#/components/schemas/MachineType"},{"type":"null"}]},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}},"type":"object","title":"MachineUpdate"},"MessageOut":{"properties":{"detail":{"type":"string","title":"Detail"}},"type":"object","required":["detail"],"title":"MessageOut"},"OperationCreate":{"properties":{"part_id":{"type":"string","format":"uuid","title":"Part Id"},"name":{"type":"string","maxLength":200,"minLength":2,"title":"Name"},"norm_minutes":{"type":"number","maximum":100000.0,"exclusiveMinimum":0.0,"title":"Norm Minutes"}},"type":"object","required":["part_id","name","norm_minutes"],"title":"OperationCreate"},"OperationOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"part_id":{"type":"string","format":"uuid","title":"Part Id"},"name":{"type":"string","title":"Name"},"norm_minutes":{"type":"number","title":"Norm Minutes"},"qr_uuid":{"type":"string","format":"uuid","title":"Qr Uuid"},"part_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Part Code"}},"type":"object","required":["id","part_id","name","norm_minutes","qr_uuid"],"title":"OperationOut"},"OperationReportLine":{"properties":{"operator_session_id":{"type":"string","format":"uuid","title":"Operator Session Id"},"operation_id":{"type":"string","format":"uuid","title":"Operation Id"},"operation_name":{"type":"string","title":"Operation Name"},"part_code":{"type":"string","title":"Part Code"},"qty_made":{"type":"integer","title":"Qty Made"},"duration_sec":{"type":"integer","title":"Duration Sec"},"norm_sec":{"type":"integer","title":"Norm Sec"},"avg_sec_per_part":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Sec Per Part"},"norm_minutes_snapshot":{"type":"number","title":"Norm Minutes Snapshot"},"deviation_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Deviation Pct"}},"type":"object","required":["operator_session_id","operation_id","operation_name","part_code","qty_made","duration_sec","norm_sec","avg_sec_per_part","norm_minutes_snapshot","deviation_pct"],"title":"OperationReportLine"},"OperationSwitchIn":{"properties":{"operation_qr":{"type":"string","maxLength":4096,"minLength":8,"title":"Operation Qr"}},"type":"object","required":["operation_qr"],"title":"OperationSwitchIn"},"OperationUpdate":{"properties":{"part_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Part Id"},"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":2},{"type":"null"}],"title":"Name"},"norm_minutes":{"anyOf":[{"type":"number","maximum":100000.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Norm Minutes"}},"type":"object","title":"OperationUpdate"},"OperatorSessionOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"operation_id":{"type":"string","format":"uuid","title":"Operation Id"},"operation_name":{"type":"string","title":"Operation Name"},"part_code":{"type":"string","title":"Part Code"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"duration_sec":{"type":"integer","title":"Duration Sec"},"qty_made":{"type":"integer","title":"Qty Made"},"norm_minutes_snapshot":{"type":"number","title":"Norm Minutes Snapshot"},"deviation_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Deviation Pct"},"is_current":{"type":"boolean","title":"Is Current","default":false}},"type":"object","required":["id","operation_id","operation_name","part_code","started_at","finished_at","duration_sec","qty_made","norm_minutes_snapshot","deviation_pct"],"title":"OperatorSessionOut"},"PartCompleteIn":{"properties":{"qty_made":{"type":"integer","maximum":1000000.0,"minimum":1.0,"title":"Qty Made"},"operation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Operation Id"}},"type":"object","required":["qty_made"],"title":"PartCompleteIn"},"PartCreate":{"properties":{"code":{"type":"string","maxLength":64,"minLength":1,"title":"Code"},"name":{"type":"string","maxLength":200,"minLength":2,"title":"Name"}},"type":"object","required":["code","name"],"title":"PartCreate"},"PartOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"qr_uuid":{"type":"string","format":"uuid","title":"Qr Uuid"}},"type":"object","required":["id","code","name","qr_uuid"],"title":"PartOut"},"PartUpdate":{"properties":{"code":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Code"},"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":2},{"type":"null"}],"title":"Name"}},"type":"object","title":"PartUpdate"},"PauseReportLine":{"properties":{"event_id":{"type":"string","format":"uuid","title":"Event Id"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"duration_sec":{"type":"integer","title":"Duration Sec"}},"type":"object","required":["event_id","reason","started_at","ended_at","duration_sec"],"title":"PauseReportLine"},"PauseResumeIn":{"properties":{"reason":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Reason"}},"type":"object","title":"PauseResumeIn"},"PlateConsumeIn":{"properties":{"plate_qr":{"type":"string","maxLength":4096,"minLength":8,"title":"Plate Qr"},"qty":{"type":"integer","maximum":1000000.0,"minimum":1.0,"title":"Qty"},"reason":{"$ref":"#/components/schemas/PlateConsumeReason"}},"type":"object","required":["plate_qr","qty","reason"],"title":"PlateConsumeIn"},"PlateConsumeOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"plate_id":{"type":"string","format":"uuid","title":"Plate Id"},"plate_name":{"type":"string","title":"Plate Name"},"article":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Article"},"lot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lot"},"mode":{"$ref":"#/components/schemas/PlateMode"},"qty_consumed":{"type":"integer","title":"Qty Consumed"},"reason":{"$ref":"#/components/schemas/PlateConsumeReason"},"recorded_at":{"type":"string","format":"date-time","title":"Recorded At"},"price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price"},"cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost"}},"type":"object","required":["id","plate_id","plate_name","article","lot","mode","qty_consumed","reason","recorded_at"],"title":"PlateConsumeOut"},"PlateConsumeReason":{"type":"string","enum":["wear","chip","breakage","workpiece_defect","other"],"title":"PlateConsumeReason"},"PlateConsumptionLine":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"plate_id":{"type":"string","format":"uuid","title":"Plate Id"},"plate_name":{"type":"string","title":"Plate Name"},"article":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Article"},"lot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lot"},"mode":{"$ref":"#/components/schemas/PlateMode"},"qty_consumed":{"type":"integer","title":"Qty Consumed"},"reason":{"$ref":"#/components/schemas/PlateConsumeReason"},"recorded_at":{"type":"string","format":"date-time","title":"Recorded At"},"price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price"},"cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost"}},"type":"object","required":["id","plate_id","plate_name","article","lot","mode","qty_consumed","reason","recorded_at","price","cost"],"title":"PlateConsumptionLine"},"PlateCreate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":2,"title":"Name"},"article":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Article"},"lot":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Lot"},"qty_in_pack":{"type":"integer","maximum":10000.0,"minimum":1.0,"title":"Qty In Pack","default":1},"mode":{"$ref":"#/components/schemas/PlateMode","default":"piece"},"price":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Price"},"active":{"type":"boolean","title":"Active","default":true}},"type":"object","required":["name"],"title":"PlateCreate"},"PlateMode":{"type":"string","enum":["piece","batch"],"title":"PlateMode"},"PlateOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"article":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Article"},"lot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lot"},"qty_in_pack":{"type":"integer","title":"Qty In Pack"},"mode":{"$ref":"#/components/schemas/PlateMode"},"price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price"},"qr_uuid":{"type":"string","format":"uuid","title":"Qr Uuid"},"active":{"type":"boolean","title":"Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"qr_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qr Code"}},"type":"object","required":["id","name","article","lot","qty_in_pack","mode","price","qr_uuid","active","created_at"],"title":"PlateOut"},"PlateUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":2},{"type":"null"}],"title":"Name"},"article":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Article"},"lot":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Lot"},"qty_in_pack":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":1.0},{"type":"null"}],"title":"Qty In Pack"},"mode":{"anyOf":[{"$ref":"#/components/schemas/PlateMode"},{"type":"null"}]},"price":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Price"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}},"type":"object","title":"PlateUpdate"},"PlateUsageRow":{"properties":{"plate_id":{"type":"string","format":"uuid","title":"Plate Id"},"plate_name":{"type":"string","title":"Plate Name"},"article":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Article"},"lot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lot"},"mode":{"$ref":"#/components/schemas/PlateMode"},"qty_consumed":{"type":"integer","title":"Qty Consumed"},"records":{"type":"integer","title":"Records"},"cost":{"type":"number","title":"Cost"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"}},"type":"object","required":["plate_id","plate_name","article","lot","mode","qty_consumed","records","cost","last_used_at"],"title":"PlateUsageRow"},"Platform":{"type":"string","enum":["android","windows"],"title":"Platform"},"QRKind":{"type":"string","enum":["USER","MACHINE","PART","OPERATION","PLATE","LICENSE"],"title":"QRKind"},"QrCard":{"properties":{"kind":{"$ref":"#/components/schemas/QRKind"},"ref_id":{"type":"string","format":"uuid","title":"Ref Id"},"label":{"type":"string","title":"Label"},"code":{"type":"string","title":"Code"},"payload":{"type":"string","title":"Payload"},"role":{"anyOf":[{"$ref":"#/components/schemas/Role"},{"type":"null"}]},"sublabel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sublabel"},"png_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Png Base64"}},"type":"object","required":["kind","ref_id","label","code","payload"],"title":"QrCard"},"QrGenerateIn":{"properties":{"type":{"$ref":"#/components/schemas/QRKind"},"target_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":200,"minItems":1,"title":"Target Ids"},"include_png":{"type":"boolean","title":"Include Png","default":false},"format":{"type":"string","enum":["qr","barcode"],"title":"Format","default":"qr"}},"type":"object","required":["type","target_ids"],"title":"QrGenerateIn"},"QrGenerateOut":{"properties":{"kind":{"$ref":"#/components/schemas/QRKind"},"count":{"type":"integer","title":"Count"},"items":{"items":{"$ref":"#/components/schemas/QrCard"},"type":"array","title":"Items"}},"type":"object","required":["kind","count","items"],"title":"QrGenerateOut"},"RefreshIn":{"properties":{"refresh_token":{"type":"string","maxLength":4096,"minLength":10,"title":"Refresh Token"}},"type":"object","required":["refresh_token"],"title":"RefreshIn"},"Role":{"type":"string","enum":["chief","adjuster","operator"],"title":"Role"},"SetupInfoOut":{"properties":{"product":{"type":"string","title":"Product"},"version":{"type":"string","title":"Version"},"urls":{"items":{"type":"string"},"type":"array","title":"Urls"},"primary_url":{"type":"string","title":"Primary Url"},"android_url":{"type":"string","title":"Android Url"},"app_url":{"type":"string","title":"App Url"},"qr_url":{"type":"string","title":"Qr Url"}},"type":"object","required":["product","version","urls","primary_url","android_url","app_url","qr_url"],"title":"SetupInfoOut"},"ShiftCloseOut":{"properties":{"shift_session_id":{"type":"string","format":"uuid","title":"Shift Session Id"},"status":{"$ref":"#/components/schemas/ShiftStatus"},"finished_at":{"type":"string","format":"date-time","title":"Finished At"},"total_time_sec":{"type":"integer","title":"Total Time Sec"},"total_active_sec":{"type":"integer","title":"Total Active Sec"},"total_qty":{"type":"integer","title":"Total Qty"},"total_norm_sec":{"type":"integer","title":"Total Norm Sec"},"deviation_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Deviation Pct"},"report":{"$ref":"#/components/schemas/ShiftReportOut"}},"type":"object","required":["shift_session_id","status","finished_at","total_time_sec","total_active_sec","total_qty","total_norm_sec","deviation_pct","report"],"title":"ShiftCloseOut"},"ShiftEventOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"event_type":{"$ref":"#/components/schemas/ShiftEventType"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"duration_sec":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Sec"}},"type":"object","required":["id","event_type","started_at","ended_at","reason"],"title":"ShiftEventOut"},"ShiftEventType":{"type":"string","enum":["pause_start","pause_end","operation_switch"],"title":"ShiftEventType"},"ShiftOpenIn":{"properties":{"user_qr":{"type":"string","maxLength":4096,"minLength":8,"title":"User Qr"},"machine_qr":{"type":"string","maxLength":4096,"minLength":8,"title":"Machine Qr"},"shift_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Shift Id"}},"type":"object","required":["user_qr","machine_qr"],"title":"ShiftOpenIn"},"ShiftReportOut":{"properties":{"shift_session_id":{"type":"string","format":"uuid","title":"Shift Session Id"},"operator_id":{"type":"string","format":"uuid","title":"Operator Id"},"operator_name":{"type":"string","title":"Operator Name"},"machine_id":{"type":"string","format":"uuid","title":"Machine Id"},"machine_name":{"type":"string","title":"Machine Name"},"shift_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Shift Id"},"shift_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shift Name"},"work_date":{"type":"string","format":"date","title":"Work Date"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"status":{"$ref":"#/components/schemas/ShiftStatus"},"total_time_sec":{"type":"integer","title":"Total Time Sec"},"total_active_sec":{"type":"integer","title":"Total Active Sec"},"total_qty":{"type":"integer","title":"Total Qty"},"total_norm_sec":{"type":"integer","title":"Total Norm Sec"},"deviation_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Deviation Pct"},"avg_sec_per_part":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Sec Per Part"},"total_active_human":{"type":"string","title":"Total Active Human"},"total_time_human":{"type":"string","title":"Total Time Human"},"total_norm_human":{"type":"string","title":"Total Norm Human"},"operations":{"items":{"$ref":"#/components/schemas/OperationReportLine"},"type":"array","title":"Operations"},"pauses":{"items":{"$ref":"#/components/schemas/PauseReportLine"},"type":"array","title":"Pauses"},"plates":{"items":{"$ref":"#/components/schemas/PlateConsumptionLine"},"type":"array","title":"Plates"},"total_plate_qty":{"type":"integer","title":"Total Plate Qty"},"total_plate_cost":{"type":"number","title":"Total Plate Cost"}},"type":"object","required":["shift_session_id","operator_id","operator_name","machine_id","machine_name","shift_id","shift_name","work_date","started_at","finished_at","status","total_time_sec","total_active_sec","total_qty","total_norm_sec","deviation_pct","avg_sec_per_part","total_active_human","total_time_human","total_norm_human","operations","pauses","plates","total_plate_qty","total_plate_cost"],"title":"ShiftReportOut"},"ShiftReportPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ShiftReportRow"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"totals":{"type":"object","title":"Totals"}},"type":"object","required":["items","total","totals"],"title":"ShiftReportPage"},"ShiftReportRow":{"properties":{"shift_session_id":{"type":"string","format":"uuid","title":"Shift Session Id"},"work_date":{"type":"string","format":"date","title":"Work Date"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"shift_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shift Name"},"operator_id":{"type":"string","format":"uuid","title":"Operator Id"},"operator_name":{"type":"string","title":"Operator Name"},"machine_id":{"type":"string","format":"uuid","title":"Machine Id"},"machine_name":{"type":"string","title":"Machine Name"},"total_active_sec":{"type":"integer","title":"Total Active Sec"},"total_active_human":{"type":"string","title":"Total Active Human"},"total_qty":{"type":"integer","title":"Total Qty"},"total_norm_sec":{"type":"integer","title":"Total Norm Sec"},"deviation_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Deviation Pct"},"plates_qty":{"type":"integer","title":"Plates Qty"},"plates_cost":{"type":"number","title":"Plates Cost"},"status":{"$ref":"#/components/schemas/ShiftStatus"}},"type":"object","required":["shift_session_id","work_date","started_at","finished_at","shift_name","operator_id","operator_name","machine_id","machine_name","total_active_sec","total_active_human","total_qty","total_norm_sec","deviation_pct","plates_qty","plates_cost","status"],"title":"ShiftReportRow"},"ShiftStateOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"$ref":"#/components/schemas/ShiftStatus"},"operator_id":{"type":"string","format":"uuid","title":"Operator Id"},"operator_name":{"type":"string","title":"Operator Name"},"machine_id":{"type":"string","format":"uuid","title":"Machine Id"},"machine_name":{"type":"string","title":"Machine Name"},"machine_type":{"$ref":"#/components/schemas/MachineType"},"shift_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Shift Id"},"shift_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shift Name"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"current_operation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Current Operation Id"},"current_operation_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Operation Name"},"current_part_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Part Code"},"current_operator_session_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Current Operator Session Id"},"total_time_sec":{"type":"integer","title":"Total Time Sec"},"total_active_sec":{"type":"integer","title":"Total Active Sec"},"total_qty":{"type":"integer","title":"Total Qty"},"total_norm_sec":{"type":"integer","title":"Total Norm Sec"},"deviation_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Deviation Pct"},"live_active_sec":{"type":"integer","title":"Live Active Sec"},"live_shift_sec":{"type":"integer","title":"Live Shift Sec"},"paused":{"type":"boolean","title":"Paused"},"pause_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pause Reason"},"plates_confirmed":{"type":"boolean","title":"Plates Confirmed"},"plates_none":{"type":"boolean","title":"Plates None"},"operator_sessions":{"items":{"$ref":"#/components/schemas/OperatorSessionOut"},"type":"array","title":"Operator Sessions","default":[]},"events":{"items":{"$ref":"#/components/schemas/ShiftEventOut"},"type":"array","title":"Events","default":[]}},"type":"object","required":["id","status","operator_id","operator_name","machine_id","machine_name","machine_type","shift_id","shift_name","started_at","finished_at","current_operation_id","current_operation_name","current_part_code","current_operator_session_id","total_time_sec","total_active_sec","total_qty","total_norm_sec","deviation_pct","live_active_sec","live_shift_sec","paused","pause_reason","plates_confirmed","plates_none"],"title":"ShiftStateOut"},"ShiftStatus":{"type":"string","enum":["open","closed"],"title":"ShiftStatus"},"ShiftTemplateCreate":{"properties":{"name":{"type":"string","maxLength":64,"minLength":1,"title":"Name"},"start_time":{"type":"string","format":"time","title":"Start Time"},"end_time":{"type":"string","format":"time","title":"End Time"}},"type":"object","required":["name","start_time","end_time"],"title":"ShiftTemplateCreate"},"ShiftTemplateOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"start_time":{"type":"string","format":"time","title":"Start Time"},"end_time":{"type":"string","format":"time","title":"End Time"}},"type":"object","required":["id","name","start_time","end_time"],"title":"ShiftTemplateOut"},"ShiftTemplateUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Name"},"start_time":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"End Time"}},"type":"object","title":"ShiftTemplateUpdate"},"SnapshotIn":{"properties":{"base_revision":{"type":"integer","title":"Base Revision","default":0},"snapshot":{"type":"object","title":"Snapshot"}},"type":"object","title":"SnapshotIn"},"StatusOut":{"properties":{"product":{"type":"string","title":"Product"},"version":{"type":"string","title":"Version"},"commit":{"type":"string","title":"Commit"},"build_date":{"type":"string","title":"Build Date"},"uptime_sec":{"type":"integer","title":"Uptime Sec"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"database":{"type":"string","title":"Database"},"active_shifts":{"type":"integer","title":"Active Shifts"},"licenses_active":{"type":"integer","title":"Licenses Active"},"devices_active":{"type":"integer","title":"Devices Active"},"server_time":{"type":"string","format":"date-time","title":"Server Time"}},"type":"object","required":["product","version","commit","build_date","uptime_sec","started_at","database","active_shifts","licenses_active","devices_active","server_time"],"title":"StatusOut"},"TokenPair":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"expires_in":{"type":"integer","title":"Expires In"},"user":{"$ref":"#/components/schemas/UserOut"}},"type":"object","required":["access_token","refresh_token","expires_in","user"],"title":"TokenPair"},"UpdateCheckOut":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"current_version":{"type":"string","title":"Current Version"},"latest_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Version"},"update_available":{"type":"boolean","title":"Update Available","default":false},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Checked At"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["enabled","current_version"],"title":"UpdateCheckOut"},"UserCreate":{"properties":{"full_name":{"type":"string","maxLength":200,"minLength":3,"title":"Full Name"},"role":{"$ref":"#/components/schemas/Role"},"login":{"anyOf":[{"type":"string","maxLength":64,"minLength":3},{"type":"null"}],"title":"Login"},"password":{"anyOf":[{"type":"string","maxLength":72,"minLength":6},{"type":"null"}],"title":"Password"},"active":{"type":"boolean","title":"Active","default":true}},"type":"object","required":["full_name","role"],"title":"UserCreate"},"UserOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"full_name":{"type":"string","title":"Full Name"},"role":{"$ref":"#/components/schemas/Role"},"login":{"type":"string","title":"Login"},"qr_uuid":{"type":"string","format":"uuid","title":"Qr Uuid"},"active":{"type":"boolean","title":"Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","full_name","role","login","qr_uuid","active","created_at"],"title":"UserOut"},"UserUpdate":{"properties":{"full_name":{"anyOf":[{"type":"string","maxLength":200,"minLength":3},{"type":"null"}],"title":"Full Name"},"login":{"anyOf":[{"type":"string","maxLength":64,"minLength":3},{"type":"null"}],"title":"Login"},"password":{"anyOf":[{"type":"string","maxLength":72,"minLength":6},{"type":"null"}],"title":"Password"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}},"type":"object","title":"UserUpdate"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"HTTPBearer":{"type":"http","description":"JWT access token","scheme":"bearer"}}}}