{"openapi":"3.0.0","paths":{"/api/system/health":{"get":{"operationId":"getPlatformHealth","parameters":[],"responses":{"200":{"description":"Basic health overview","content":{"application/json":{"schema":{"title":"BasicHealthResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/BasicHealthDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"Bearer":[]}],"summary":"Get platform application health","tags":["System Health"]}},"/api/system/health/live":{"get":{"operationId":"getPlatformLiveness","parameters":[],"responses":{"200":{"description":"Process is alive","content":{"application/json":{"schema":{"title":"LivenessResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/LivenessDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"Bearer":[]}],"summary":"Liveness probe","tags":["System Health"]}},"/api/system/health/ready":{"get":{"operationId":"getPlatformReadiness","parameters":[],"responses":{"200":{"description":"Service ready for traffic","content":{"application/json":{"schema":{"title":"ReadinessResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/ReadinessDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"Bearer":[]}],"summary":"Readiness probe","tags":["System Health"]}},"/api/system/health/system":{"get":{"operationId":"getPlatformSystemHealth","parameters":[],"responses":{"200":{"description":"Full system health (admin)","content":{"application/json":{"schema":{"title":"SystemHealthResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/SystemHealthDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Requires Platform Scope"},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"Bearer":[]},{"bearer":[]}],"summary":"Get platform system health","tags":["System Health"]}},"/api/platform/jobs/stream":{"get":{"operationId":"streamPlatformJobs","parameters":[],"responses":{"401":{"description":"Unauthorized"},"403":{"description":"Requires Platform Scope"}},"security":[{"bearer":[]},{"Bearer":[]},{"bearer":[]}],"summary":"Stream platform job status updates","tags":["Platform Jobs"]}},"/api/platform/jobs":{"get":{"operationId":"getAllPlatformJobs","parameters":[],"responses":{"200":{"description":"Platform jobs listed successfully","content":{"application/json":{"schema":{"title":"JobResponseListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/JobResponseDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get all registered platform jobs","tags":["Platform Jobs"]}},"/api/platform/jobs/logs":{"get":{"operationId":"listPlatformJobLogs","parameters":[{"name":"pageNumber","required":true,"in":"query","description":"Sayfa numarası","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"pageSize","required":true,"in":"query","description":"Sayfa başına gösterilecek kayıt sayısı","schema":{"minimum":1,"example":10,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Arama metni","schema":{"example":"john","type":"string"}}],"responses":{"200":{"description":"Job execution logs listed successfully","content":{"application/json":{"schema":{"title":"PaginatedJobExecutionLog","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/JobExecutionLogDto"}},"pageNumber":{"type":"number","example":1,"minimum":1},"pageSize":{"type":"number","example":10,"minimum":1},"totalPages":{"type":"number","example":5,"minimum":0},"totalCount":{"type":"number","example":50,"minimum":0},"hasPreviousPage":{"type":"boolean","example":false},"hasNextPage":{"type":"boolean","example":true}},"required":["items","pageNumber","totalPages","totalCount","hasPreviousPage","hasNextPage"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"List platform job execution logs","tags":["Platform Jobs"]}},"/api/platform/jobs/execution/{executionLogId}/backup-download":{"get":{"operationId":"downloadDatabaseBackupFile","parameters":[{"name":"executionLogId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""},"401":{"description":"Unauthorized"},"403":{"description":"Requires Platform Scope"}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Download successful database backup artifact","tags":["Platform Jobs"]}},"/api/platform/jobs/trigger":{"post":{"operationId":"triggerPlatformJob","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerJobDto"}}}},"responses":{"201":{"description":"Job triggered successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/JobTriggerResultDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Manually trigger a platform job","tags":["Platform Jobs"]}},"/api/customers/lookup":{"get":{"operationId":"customerLookup","parameters":[{"name":"search","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Customer lookup retrieved successfully","content":{"application/json":{"schema":{"title":"LookupListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/LookupDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Customer lookup","tags":["Customers"]}},"/api/customers":{"post":{"operationId":"createCustomer","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomerDto"}}}},"responses":{"201":{"description":"Customer created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create a customer","tags":["Customers"]},"get":{"operationId":"getCustomers","parameters":[{"name":"pageNumber","required":true,"in":"query","description":"Sayfa numarası","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"pageSize","required":true,"in":"query","description":"Sayfa başına gösterilecek kayıt sayısı","schema":{"minimum":1,"example":10,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Arama metni","schema":{"example":"john","type":"string"}},{"name":"status","required":false,"in":"query","description":"Filter by status using SSOT model (ACTIVE, PASSIVE, ALL)","schema":{"default":"ACTIVE","type":"string","enum":["ACTIVE","PASSIVE","ALL"]}},{"name":"isDefault","required":false,"in":"query","description":"Varsayılan hesapları filtrele","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Customers retrieved successfully","content":{"application/json":{"schema":{"title":"PaginatedCustomer","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CustomerDto"}},"pageNumber":{"type":"number","example":1,"minimum":1},"pageSize":{"type":"number","example":10,"minimum":1},"totalPages":{"type":"number","example":5,"minimum":0},"totalCount":{"type":"number","example":50,"minimum":0},"hasPreviousPage":{"type":"boolean","example":false},"hasNextPage":{"type":"boolean","example":true}},"required":["items","pageNumber","totalPages","totalCount","hasPreviousPage","hasNextPage"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get customers","tags":["Customers"]}},"/api/customers/{id}":{"get":{"operationId":"getCustomer","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Customer retrieved successfully","content":{"application/json":{"schema":{"title":"CustomerResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/CustomerDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get customer by ID","tags":["Customers"]},"patch":{"operationId":"updateCustomer","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomerDto"}}}},"responses":{"201":{"description":"Customer updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Update a customer","tags":["Customers"]},"delete":{"operationId":"deleteCustomer","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"Customer deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Delete a customer","tags":["Customers"]}},"/api/customers/{id}/transactions":{"get":{"operationId":"getCustomerTransactions","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"pageNumber","required":true,"in":"query","description":"Sayfa numarası","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"pageSize","required":true,"in":"query","description":"Sayfa başına gösterilecek kayıt sayısı","schema":{"minimum":1,"example":10,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Arama metni","schema":{"example":"john","type":"string"}},{"name":"accountId","required":false,"in":"query","description":"Hesap ID'si ile filtrele","schema":{"type":"string"}},{"name":"expenseItemId","required":false,"in":"query","description":"Gider kalemi ID'si ile filtrele","schema":{"type":"string"}},{"name":"beginDate","required":false,"in":"query","description":"Başlangıç tarihi (ISO formatında)","schema":{"example":"2024-01-01","type":"string"}},{"name":"endDate","required":false,"in":"query","description":"Bitiş tarihi (ISO formatında)","schema":{"example":"2024-12-31","type":"string"}},{"name":"type","required":false,"in":"query","description":"İşlem tipi ile filtrele. INVOICE / RETURN / CANCELLATION belge etkisine göre filtreler (TransactionType dışı).","schema":{"type":"string","enum":["COLLECTION","PAYMENT","TRANSFER","ADJUSTMENT","OPENING_BALANCE","INVOICE","RETURN","CANCELLATION"]}},{"name":"direction","required":false,"in":"query","description":"İşlem yönü ile filtrele","schema":{"type":"string","enum":["IN","OUT"]}},{"name":"showSystemGenerated","required":false,"in":"query","description":"Sistem tarafından oluşturulan işlemleri göster (varsayılan: true)","schema":{"default":true,"type":"boolean"}}],"responses":{"200":{"description":"Customer transactions retrieved successfully","content":{"application/json":{"schema":{"title":"PaginatedTransaction","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TransactionDto"}},"pageNumber":{"type":"number","example":1,"minimum":1},"pageSize":{"type":"number","example":10,"minimum":1},"totalPages":{"type":"number","example":5,"minimum":0},"totalCount":{"type":"number","example":50,"minimum":0},"hasPreviousPage":{"type":"boolean","example":false},"hasNextPage":{"type":"boolean","example":true}},"required":["items","pageNumber","totalPages","totalCount","hasPreviousPage","hasNextPage"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get customer transactions","tags":["Customers"]}},"/api/accounts":{"post":{"operationId":"createAccount","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAccountDto"},"examples":{"default":{"summary":"Create account","description":"Create a new financial account (Customer, Supplier, etc.)","value":{"type":"CUSTOMER","name":"Acme Corp","isActive":true}}}}}},"responses":{"201":{"description":"Account created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create an account","tags":["Accounts"]},"get":{"operationId":"getAccounts","parameters":[{"name":"pageNumber","required":true,"in":"query","description":"Sayfa numarası","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"pageSize","required":true,"in":"query","description":"Sayfa başına gösterilecek kayıt sayısı","schema":{"minimum":1,"example":10,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Arama metni","schema":{"example":"john","type":"string"}}],"responses":{"200":{"description":"Accounts retrieved successfully","content":{"application/json":{"schema":{"title":"PaginatedAccount","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AccountDto"}},"pageNumber":{"type":"number","example":1,"minimum":1},"pageSize":{"type":"number","example":10,"minimum":1},"totalPages":{"type":"number","example":5,"minimum":0},"totalCount":{"type":"number","example":50,"minimum":0},"hasPreviousPage":{"type":"boolean","example":false},"hasNextPage":{"type":"boolean","example":true}},"required":["items","pageNumber","totalPages","totalCount","hasPreviousPage","hasNextPage"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get accounts","tags":["Accounts"]}},"/api/accounts/lookup":{"get":{"operationId":"accountLookup","parameters":[{"name":"search","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Account lookup retrieved successfully","content":{"application/json":{"schema":{"title":"LookupListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/LookupDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Account lookup","tags":["Accounts"]}},"/api/accounts/{id}":{"get":{"operationId":"getAccountById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Account retrieved successfully","content":{"application/json":{"schema":{"title":"AccountResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/AccountDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get account by ID","tags":["Accounts"]},"patch":{"operationId":"updateAccount","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAccountDto"},"examples":{"default":{"summary":"Update account","description":"Update account details","value":{"name":"Acme Corporation"}}}}}},"responses":{"201":{"description":"Account updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Update an account","tags":["Accounts"]},"delete":{"operationId":"deleteAccount","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"Account deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Delete an account","tags":["Accounts"]}},"/api/notifications":{"get":{"operationId":"listNotifications","parameters":[{"name":"pageNumber","required":false,"in":"query","description":"Sayfa numarası","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"Sayfa başına gösterilecek kayıt sayısı","schema":{"minimum":1,"example":20,"type":"number"}},{"name":"isRead","required":false,"in":"query","description":"Yalnızca okunmuş / okunmamış bildirimleri filtrele","schema":{"example":false,"type":"boolean"}}],"responses":{"200":{"description":"Notifications page","content":{"application/json":{"schema":{"title":"PaginatedNotification","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/NotificationDto"}},"pageNumber":{"type":"number","example":1,"minimum":1},"pageSize":{"type":"number","example":10,"minimum":1},"totalPages":{"type":"number","example":5,"minimum":0},"totalCount":{"type":"number","example":50,"minimum":0},"hasPreviousPage":{"type":"boolean","example":false},"hasNextPage":{"type":"boolean","example":true}},"required":["items","pageNumber","totalPages","totalCount","hasPreviousPage","hasNextPage"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"List notifications","tags":["Notifications"]}},"/api/notifications/unread-count":{"get":{"operationId":"unreadNotificationCount","parameters":[],"responses":{"200":{"description":"Unread notification count","content":{"application/json":{"schema":{"title":"UnreadCountResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/UnreadCountDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get unread notification count","tags":["Notifications"]}},"/api/notifications/read-all":{"patch":{"operationId":"markAllNotificationsRead","parameters":[],"responses":{"200":{"description":"All notifications marked as read","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/MarkAllReadResultDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Mark all notifications as read","tags":["Notifications"]}},"/api/notifications/{id}/read":{"patch":{"operationId":"markNotificationRead","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Notification marked as read","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Mark notification as read","tags":["Notifications"]}},"/api/notifications/admin/send":{"post":{"operationId":"sendAdminNotification","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendAdminNotificationDto"}}}},"responses":{"201":{"description":"Admin notification dispatched","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/SendAdminNotificationResultDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Requires Tenant Admin Scope"},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]},{"bearer":[]}],"summary":"Send admin notification (targeted or broadcast)","tags":["Notifications"]}},"/api/notifications/push-subscriptions/public-key":{"get":{"operationId":"getWebPushPublicKey","parameters":[],"responses":{"200":{"description":"VAPID public key","content":{"application/json":{"schema":{"title":"WebPushPublicKeyResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/WebPushPublicKeyDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get VAPID public key","tags":["Notifications"]}},"/api/notifications/push-subscriptions/me":{"get":{"operationId":"listMyWebPushSubscriptions","parameters":[],"responses":{"200":{"description":"My push subscriptions","content":{"application/json":{"schema":{"title":"WebPushSubscriptionListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/WebPushSubscriptionDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"List my push subscriptions","tags":["Notifications"]}},"/api/notifications/push-subscriptions":{"post":{"operationId":"registerWebPushSubscription","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebPushSubscriptionDto"}}}},"responses":{"201":{"description":"Push subscription registered","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Register push subscription","tags":["Notifications"]},"delete":{"operationId":"unregisterWebPushSubscription","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteWebPushSubscriptionDto"}}}},"responses":{"200":{"description":"Push subscription removed","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Unregister push subscription","tags":["Notifications"]}},"/api/transaction-categories":{"get":{"operationId":"transactionCategoriesList","parameters":[{"name":"includeArchived","required":false,"in":"query","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"description":"List of categories","content":{"application/json":{"schema":{"title":"TransactionCategoryListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/TransactionCategoryDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"List transaction categories","tags":["Transaction Categories"]},"post":{"operationId":"transactionCategoryCreate","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTransactionCategoryDto"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create transaction category","tags":["Transaction Categories"]}},"/api/transaction-categories/{id}":{"patch":{"operationId":"transactionCategoryUpdate","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTransactionCategoryDto"}}}},"responses":{"200":{"description":"Transaction category updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Update transaction category","tags":["Transaction Categories"]},"delete":{"operationId":"transactionCategoryDelete","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Transaction category archived successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Archive transaction category","tags":["Transaction Categories"]}},"/api/transaction-categories/{id}/restore":{"patch":{"operationId":"transactionCategoryRestore","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Transaction category restored successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Restore transaction category","tags":["Transaction Categories"]}},"/api/transaction-categories/rules":{"get":{"operationId":"categoryRulesList","parameters":[{"name":"page","required":false,"in":"query","schema":{"default":1,"type":"number"}},{"name":"limit","required":false,"in":"query","schema":{"default":20,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Arama metni (merchant/keyword/notes)","schema":{"type":"string"}},{"name":"categoryId","required":false,"in":"query","schema":{"type":"string"}},{"name":"source","required":false,"in":"query","schema":{"type":"string","enum":["SEED","LEARNED","MANUAL"]}},{"name":"isEnabled","required":false,"in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Paginated rules","content":{"application/json":{"schema":{"title":"CategoryRuleListResponseResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/CategoryRuleListResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"List category rules","tags":["Transaction Categories"]},"post":{"operationId":"categoryRuleCreate","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCategoryRuleDto"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create category rule","tags":["Transaction Categories"]}},"/api/transaction-categories/rules/{id}":{"get":{"operationId":"categoryRuleGet","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Rule detail","content":{"application/json":{"schema":{"title":"CategoryRuleResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/CategoryRuleDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get category rule","tags":["Transaction Categories"]},"patch":{"operationId":"categoryRuleUpdate","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCategoryRuleDto"}}}},"responses":{"200":{"description":"Category rule updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Update category rule","tags":["Transaction Categories"]},"delete":{"operationId":"categoryRuleDelete","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Category rule deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Delete category rule","tags":["Transaction Categories"]}},"/api/transaction-categories/rules/{id}/disable":{"patch":{"operationId":"categoryRuleToggleEnabled","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToggleRuleEnabledDto"}}}},"responses":{"200":{"description":"Category rule enabled flag updated","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Toggle category rule enabled","tags":["Transaction Categories"]}},"/api/transaction-categories/rules/{id}/priority":{"patch":{"operationId":"categoryRuleSetPriority","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRulePriorityDto"}}}},"responses":{"200":{"description":"Category rule priority updated","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Update category rule priority","tags":["Transaction Categories"]}},"/api/transaction-categories/rules/test":{"post":{"operationId":"categoryRuleTest","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestCategoryRuleDto"}}}},"responses":{"200":{"description":"Test result","content":{"application/json":{"schema":{"title":"CategoryRuleTestResultResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/CategoryRuleTestResultDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Test category rule resolution","tags":["Transaction Categories"]}},"/api/platform/audit-logs":{"get":{"operationId":"getAllPlatformAuditLogs","parameters":[{"name":"pageNumber","required":false,"in":"query","description":"Current page number","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"Items per page (max 100)","schema":{"minimum":1,"maximum":100,"example":20,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Arama metni","schema":{"example":"john","type":"string"}},{"name":"dateFrom","required":false,"in":"query","description":"Başlangıç tarihi (ISO 8601 formatında)","schema":{"format":"date","example":"2024-01-01","type":"string"}},{"name":"dateTo","required":false,"in":"query","description":"Bitiş tarihi (ISO 8601 formatında)","schema":{"format":"date","example":"2024-12-31","type":"string"}},{"name":"tenantId","required":false,"in":"query","description":"Tenant ID (for super-admin tenant-scoped requests)","schema":{"example":"550e8400-e29b-41d4-a716-446655440000","type":"string"}},{"name":"entity","required":false,"in":"query","description":"Filter by entity type","schema":{"example":"TASK","type":"string"}},{"name":"entityId","required":false,"in":"query","description":"Filter by entity ID","schema":{"example":"550e8400-e29b-41d4-a716-446655440000","type":"string"}},{"name":"action","required":false,"in":"query","description":"Filter by action type","schema":{"example":"CREATE","type":"string","enum":["CREATE","UPDATE","DELETE","LOGIN","LOGOUT","OTHER"]}},{"name":"branchId","required":false,"in":"query","description":"Filter by branch ID","schema":{"example":"550e8400-e29b-41d4-a716-446655440000","type":"string"}},{"name":"userId","required":false,"in":"query","description":"Filter by user ID","schema":{"example":"550e8400-e29b-41d4-a716-446655440000","type":"string"}}],"responses":{"200":{"description":"Platform audit logs retrieved successfully","content":{"application/json":{"schema":{"title":"PaginatedAuditLog","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AuditLogDto"}},"pageNumber":{"type":"number","example":1,"minimum":1},"pageSize":{"type":"number","example":10,"minimum":1},"totalPages":{"type":"number","example":5,"minimum":0},"totalCount":{"type":"number","example":50,"minimum":0},"hasPreviousPage":{"type":"boolean","example":false},"hasNextPage":{"type":"boolean","example":true}},"required":["items","pageNumber","totalPages","totalCount","hasPreviousPage","hasNextPage"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get all platform audit logs","tags":["Platform Audit Logs"]}},"/api/platform/audit-logs/{id}":{"get":{"operationId":"getPlatformAuditLogById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Platform audit log found successfully","content":{"application/json":{"schema":{"title":"AuditLogResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/AuditLogDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get platform audit log by ID","tags":["Platform Audit Logs"]}},"/api/platform/error-logs":{"get":{"operationId":"getAllPlatformErrorLogs","parameters":[{"name":"pageNumber","required":false,"in":"query","description":"Sayfa numarası","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"Sayfa başına gösterilecek kayıt sayısı","schema":{"minimum":1,"example":10,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Arama metni","schema":{"example":"john","type":"string"}},{"name":"dateFrom","required":false,"in":"query","description":"Başlangıç tarihi (ISO 8601 formatında)","schema":{"format":"date","example":"2024-01-01","type":"string"}},{"name":"dateTo","required":false,"in":"query","description":"Bitiş tarihi (ISO 8601 formatında)","schema":{"format":"date","example":"2024-12-31","type":"string"}},{"name":"level","required":false,"in":"query","description":"Filter by error level","schema":{"example":"ERROR","type":"string","enum":["ERROR","WARN","INFO"]}},{"name":"branchId","required":false,"in":"query","description":"Filter by branch ID","schema":{"example":"550e8400-e29b-41d4-a716-446655440000","type":"string"}},{"name":"userId","required":false,"in":"query","description":"Filter by user ID","schema":{"example":"550e8400-e29b-41d4-a716-446655440000","type":"string"}},{"name":"tenantId","required":false,"in":"query","description":"Tenant ID (for super-admin tenant-scoped requests)","schema":{"example":"550e8400-e29b-41d4-a716-446655440000","type":"string"}},{"name":"resolved","required":false,"in":"query","description":"Filter by resolution status","schema":{"example":false,"type":"boolean"}},{"name":"statusCode","required":false,"in":"query","description":"Filter by HTTP status code","schema":{"example":500,"type":"number"}}],"responses":{"200":{"description":"Platform error logs listed successfully","content":{"application/json":{"schema":{"title":"PaginatedErrorLog","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ErrorLogDto"}},"pageNumber":{"type":"number","example":1,"minimum":1},"pageSize":{"type":"number","example":10,"minimum":1},"totalPages":{"type":"number","example":5,"minimum":0},"totalCount":{"type":"number","example":50,"minimum":0},"hasPreviousPage":{"type":"boolean","example":false},"hasNextPage":{"type":"boolean","example":true}},"required":["items","pageNumber","totalPages","totalCount","hasPreviousPage","hasNextPage"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get all platform error logs","tags":["Platform Error Logs"]}},"/api/platform/error-logs/{id}/resolve":{"patch":{"operationId":"resolvePlatformErrorLog","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Platform error log resolved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Resolve platform error log","tags":["Platform Error Logs"]}},"/api/platform/error-logs/{id}":{"get":{"operationId":"getPlatformErrorLogById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Platform error log found successfully","content":{"application/json":{"schema":{"title":"ErrorLogResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/ErrorLogDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get platform error log by ID","tags":["Platform Error Logs"]}},"/api/platform/redis/status":{"get":{"operationId":"getPlatformRedisStatus","parameters":[],"responses":{"200":{"description":"Redis status retrieved successfully","content":{"application/json":{"schema":{"title":"RedisStatsResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/RedisStatsDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get platform redis connection status","tags":["Platform Redis Management"]}},"/api/platform/redis/queues":{"get":{"operationId":"getPlatformRedisQueues","parameters":[],"responses":{"200":{"description":"Redis queue metrics retrieved successfully","content":{"application/json":{"schema":{"title":"RedisQueueStatsResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/RedisQueueStatsDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get platform redis queue metrics","tags":["Platform Redis Management"]}},"/api/platform/redis/health":{"get":{"operationId":"getPlatformRedisHealth","parameters":[],"responses":{"200":{"description":"Redis health status retrieved successfully","content":{"application/json":{"schema":{"title":"RedisHealthResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/RedisHealthDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get platform redis health status","tags":["Platform Redis Management"]}},"/api/platform/redis/cache/{pattern}":{"delete":{"operationId":"clearPlatformRedisCache","parameters":[{"name":"pattern","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Cache cleared successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Clear platform redis cache by pattern","tags":["Platform Redis Management"]}},"/api/users":{"post":{"operationId":"createUser","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserDto"},"examples":{"default":{"summary":"Create user","description":"Create a new user account","value":{"fullName":"John Doe","email":"newuser@example.com","password":"SecurePass123!","role":"USER","phone":"+90534567890","isActive":true,"branchId":"550e8400-e29b-41d4-a716-446655440001","branchIds":["550e8400-e29b-41d4-a716-446655440001","550e8400-e29b-41d4-a716-446655440002"]}}}}}},"responses":{"201":{"description":"User created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create user","tags":["Users"]},"get":{"operationId":"getAllUsers","parameters":[{"name":"pageNumber","required":true,"in":"query","description":"Sayfa numarası","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"pageSize","required":true,"in":"query","description":"Sayfa başına gösterilecek kayıt sayısı","schema":{"minimum":1,"example":10,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Arama metni","schema":{"example":"john","type":"string"}},{"name":"role","required":false,"in":"query","description":"Filter by user role","schema":{"type":"string","enum":["OWNER","ADMIN","USER"]}}],"responses":{"200":{"description":"Users listed successfully","content":{"application/json":{"schema":{"title":"PaginatedUser","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/UserDto"}},"pageNumber":{"type":"number","example":1,"minimum":1},"pageSize":{"type":"number","example":10,"minimum":1},"totalPages":{"type":"number","example":5,"minimum":0},"totalCount":{"type":"number","example":50,"minimum":0},"hasPreviousPage":{"type":"boolean","example":false},"hasNextPage":{"type":"boolean","example":true}},"required":["items","pageNumber","totalPages","totalCount","hasPreviousPage","hasNextPage"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get all users","tags":["Users"]}},"/api/users/lookup":{"get":{"operationId":"userLookup","parameters":[{"name":"search","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Users lookup found successfully","content":{"application/json":{"schema":{"title":"LookupListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/LookupDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get user lookup","tags":["Users"]}},"/api/users/{id}":{"get":{"operationId":"getUserById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"User found successfully","content":{"application/json":{"schema":{"title":"UserResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/UserDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get user by ID","tags":["Users"]},"patch":{"operationId":"updateUserById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserDto"},"examples":{"default":{"summary":"Update user","description":"Update user information","value":{"fullName":"John Doe Updated","email":"updated@example.com","phone":"+90534567891","role":"ADMIN","isActive":true}}}}}},"responses":{"200":{"description":"User updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Update user","tags":["Users"]},"delete":{"operationId":"deleteUserById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"User deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Delete user","tags":["Users"]}},"/api/users/me/profile":{"patch":{"operationId":"updateOwnProfile","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProfileDto"},"examples":{"default":{"summary":"Profile update example","description":"Example data for updating own profile","value":{"fullName":"John Doe Updated","phone":"+905345678901"}}}}}},"responses":{"200":{"description":"Profile updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Update own profile","tags":["Users"]}},"/api/roles":{"get":{"operationId":"getAllRoles","parameters":[],"responses":{"200":{"description":"Roles listed successfully","content":{"application/json":{"schema":{"title":"RoleListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/RoleDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"List roles","tags":["Roles"]},"post":{"operationId":"createRole","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRoleDto"}}}},"responses":{"201":{"description":"Role created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/RoleDetailDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create role","tags":["Roles"]}},"/api/roles/{id}":{"get":{"operationId":"getRoleById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Role found successfully","content":{"application/json":{"schema":{"title":"RoleDetailResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/RoleDetailDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get role detail","tags":["Roles"]},"patch":{"operationId":"updateRoleById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRoleDto"}}}},"responses":{"200":{"description":"Role updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Update role","tags":["Roles"]},"delete":{"operationId":"deleteRoleById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Role deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Delete role","tags":["Roles"]}},"/api/roles/{id}/permissions":{"patch":{"operationId":"updateRolePermissions","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRolePermissionsDto"}}}},"responses":{"200":{"description":"Role permissions updated","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Update role permissions","tags":["Roles"]}},"/api/permissions":{"get":{"operationId":"getAllPermissions","parameters":[],"responses":{"200":{"description":"Permissions listed successfully","content":{"application/json":{"schema":{"title":"PermissionListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/PermissionDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"List permissions","tags":["Permissions"]}},"/api/branches/lookup":{"get":{"operationId":"branchLookup","parameters":[{"name":"search","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Branch lookup retrieved successfully","content":{"application/json":{"schema":{"title":"LookupListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/LookupDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Branch lookup","tags":["Branches"]}},"/api/branches":{"post":{"operationId":"createBranch","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBranchDto"},"examples":{"default":{"summary":"Create branch","description":"Create a new branch for the tenant","value":{"code":"BR001","name":"Ana Şube","description":"Ana şube açıklaması","address":"İstanbul, Türkiye","phone":"+90 212 555 0123","email":"ana@company.com","isActive":true}}}}}},"responses":{"201":{"description":"Branch created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create branch","tags":["Branches"]},"get":{"operationId":"getAllBranches","parameters":[{"name":"pageNumber","required":true,"in":"query","description":"Sayfa numarası","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"pageSize","required":true,"in":"query","description":"Sayfa başına gösterilecek kayıt sayısı","schema":{"minimum":1,"example":10,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Arama metni","schema":{"example":"john","type":"string"}}],"responses":{"200":{"description":"Branches listed successfully","content":{"application/json":{"schema":{"title":"PaginatedBranch","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/BranchDto"}},"pageNumber":{"type":"number","example":1,"minimum":1},"pageSize":{"type":"number","example":10,"minimum":1},"totalPages":{"type":"number","example":5,"minimum":0},"totalCount":{"type":"number","example":50,"minimum":0},"hasPreviousPage":{"type":"boolean","example":false},"hasNextPage":{"type":"boolean","example":true}},"required":["items","pageNumber","totalPages","totalCount","hasPreviousPage","hasNextPage"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get all branches","tags":["Branches"]}},"/api/branches/{id}":{"get":{"operationId":"getBranchById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Branch found successfully","content":{"application/json":{"schema":{"title":"BranchResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/BranchDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get branch by ID","tags":["Branches"]},"patch":{"operationId":"updateBranchById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBranchDto"},"examples":{"default":{"summary":"Update branch","description":"Update branch information","value":{"name":"Güncellenmiş Şube Adı","description":"Güncellenmiş açıklama","address":"Ankara, Türkiye","phone":"+90 312 555 0123","email":"updated@company.com","isActive":true}}}}}},"responses":{"200":{"description":"Branch updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Update branch","tags":["Branches"]},"delete":{"operationId":"deleteBranchById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Branch deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Delete branch","tags":["Branches"]}},"/api/calendar-events":{"post":{"operationId":"createCalendarEvent","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCalendarEventDto"}}}},"responses":{"201":{"description":"Calendar event created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create a calendar event","tags":["CalendarEvents"]},"get":{"operationId":"getCalendarEvents","parameters":[{"name":"start","required":true,"in":"query","description":"Start date (ISO-8601)","schema":{"type":"string"}},{"name":"end","required":true,"in":"query","description":"End date (ISO-8601)","schema":{"type":"string"}}],"responses":{"200":{"description":"Calendar events retrieved successfully","content":{"application/json":{"schema":{"title":"CalendarEventListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/CalendarEventDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get calendar events by date range","tags":["CalendarEvents"]}},"/api/calendar-events/{id}":{"patch":{"operationId":"updateCalendarEvent","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCalendarEventDto"}}}},"responses":{"201":{"description":"Calendar event updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Update a calendar event","tags":["CalendarEvents"]},"delete":{"operationId":"deleteCalendarEvent","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"Calendar event deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Delete a calendar event","tags":["CalendarEvents"]}},"/api/task-manager/tasks":{"post":{"operationId":"createTask","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTaskDto"},"examples":{"default":{"summary":"Create task","description":"Create a new task","value":{"branchId":"550e8400-e29b-41d4-a716-446655440000","title":"Yeni ürün sayfası taslağı","description":"DS kartları ile UX prototipi oluştur.","priority":"MEDIUM","status":"TODO","tags":["frontend","design"],"deadline":"2025-02-05T10:00:00.000Z","order":0,"assignedTo":"550e8400-e29b-41d4-a716-446655440000"}}}}}},"responses":{"201":{"description":"Task created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create task","tags":["Tasks"]},"get":{"operationId":"getAllTasks","parameters":[{"name":"pageNumber","required":false,"in":"query","description":"Page number","schema":{"default":1,"example":1,"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"Page size","schema":{"default":50,"example":50,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Search by title","schema":{"example":"dashboard","type":"string"}},{"name":"status","required":false,"in":"query","description":"Filter by status(es)","schema":{"type":"array","items":{"type":"string","enum":["TODO","IN_PROGRESS","DONE"]}}},{"name":"priority","required":false,"in":"query","description":"Filter by priority","schema":{"type":"string","enum":["LOW","MEDIUM","HIGH"]}},{"name":"assignedTo","required":false,"in":"query","description":"Filter by assigned user ID","schema":{"example":"550e8400-e29b-41d4-a716-446655440000","type":"string"}},{"name":"branchId","required":false,"in":"query","description":"Filter by branch ID","schema":{"example":"550e8400-e29b-41d4-a716-446655440000","type":"string"}},{"name":"dateFrom","required":false,"in":"query","description":"Filter tasks created after this date","schema":{"example":"2025-01-01T00:00:00.000Z","type":"string"}},{"name":"dateTo","required":false,"in":"query","description":"Filter tasks created before this date","schema":{"example":"2025-12-31T23:59:59.000Z","type":"string"}},{"name":"includeCompleted","required":false,"in":"query","description":"Include completed tasks (DONE status). Default: false","schema":{"default":false,"example":false,"type":"boolean"}},{"name":"sortBy","required":false,"in":"query","schema":{"type":"string","enum":["createdAt","title","priority","status","deadline","position"]}},{"name":"sortOrder","required":false,"in":"query","description":"Sort order","schema":{"example":"desc","type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"Tasks listed successfully","content":{"application/json":{"schema":{"title":"PaginatedTask","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TaskDto"}},"pageNumber":{"type":"number","example":1,"minimum":1},"pageSize":{"type":"number","example":10,"minimum":1},"totalPages":{"type":"number","example":5,"minimum":0},"totalCount":{"type":"number","example":50,"minimum":0},"hasPreviousPage":{"type":"boolean","example":false},"hasNextPage":{"type":"boolean","example":true}},"required":["items","pageNumber","totalPages","totalCount","hasPreviousPage","hasNextPage"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"List tasks","tags":["Tasks"]}},"/api/task-manager/tasks/{id}":{"get":{"operationId":"getTaskById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Task found successfully","content":{"application/json":{"schema":{"title":"TaskResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/TaskDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get task by ID","tags":["Tasks"]},"patch":{"operationId":"updateTaskById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTaskDto"},"examples":{"default":{"summary":"Update task","description":"Update an existing task (id is in route param, not in body)","value":{"title":"Yeni ürün sayfası taslağı (Güncellendi)","description":"DS kartları ile UX prototipi oluştur ve test et.","priority":"HIGH","status":"IN_PROGRESS","tags":["frontend","design","testing"],"deadline":"2025-02-10T10:00:00.000Z","order":1,"assignedTo":"550e8400-e29b-41d4-a716-446655440000"}}}}}},"responses":{"200":{"description":"Task updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Update task","tags":["Tasks"]},"delete":{"operationId":"deleteTaskById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Task deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Delete task","tags":["Tasks"]}},"/api/task-manager/tasks/{id}/move":{"patch":{"operationId":"moveTask","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveTaskDto"}}}},"responses":{"200":{"description":"Task moved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/TaskDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Move task","tags":["Tasks"]}},"/api/task-manager/tasks/batch/reorder":{"patch":{"operationId":"reorderTasks","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderTasksDto"}}}},"responses":{"200":{"description":"Tasks reordered successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/ReorderTasksResultDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Reorder tasks","tags":["Tasks"]}},"/api/bank-accounts/lookup":{"get":{"operationId":"bankLookup","parameters":[{"name":"search","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Bank account lookup retrieved successfully","content":{"application/json":{"schema":{"title":"LookupListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/LookupDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Bank account lookup","tags":["Bank Accounts"]}},"/api/bank-accounts":{"post":{"operationId":"createBankAccount","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBankAccountDto"},"examples":{"default":{"summary":"Banka hesabı oluştur","description":"Yeni bir banka hesabı tanımlar","value":{"name":"Garanti BBVA - TR76...0001","currency":"TRY","openingBalance":5000,"openingDate":"2024-01-01T00:00:00.000Z"}}}}}},"responses":{"201":{"description":"Bank account created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create a bank account","tags":["Bank Accounts"]},"get":{"operationId":"getBankAccounts","parameters":[{"name":"pageNumber","required":true,"in":"query","description":"Sayfa numarası","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"pageSize","required":true,"in":"query","description":"Sayfa başına gösterilecek kayıt sayısı","schema":{"minimum":1,"example":10,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Arama metni","schema":{"example":"john","type":"string"}},{"name":"status","required":false,"in":"query","description":"Filter by status using SSOT model (ACTIVE, PASSIVE, ALL)","schema":{"default":"ACTIVE","type":"string","enum":["ACTIVE","PASSIVE","ALL"]}},{"name":"isDefault","required":false,"in":"query","description":"Varsayılan hesapları filtrele","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Bank accounts retrieved successfully","content":{"application/json":{"schema":{"title":"PaginatedBankAccount","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/BankAccountDto"}},"pageNumber":{"type":"number","example":1,"minimum":1},"pageSize":{"type":"number","example":10,"minimum":1},"totalPages":{"type":"number","example":5,"minimum":0},"totalCount":{"type":"number","example":50,"minimum":0},"hasPreviousPage":{"type":"boolean","example":false},"hasNextPage":{"type":"boolean","example":true}},"required":["items","pageNumber","totalPages","totalCount","hasPreviousPage","hasNextPage"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get bank accounts","tags":["Bank Accounts"]}},"/api/bank-accounts/{id}":{"get":{"operationId":"getBankAccount","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Bank account retrieved successfully","content":{"application/json":{"schema":{"title":"BankAccountResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/BankAccountDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get bank account by ID","tags":["Bank Accounts"]},"patch":{"operationId":"updateBankAccount","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBankAccountDto"},"examples":{"default":{"summary":"Banka hesabı güncelle","description":"Banka hesabı bilgilerini günceller","value":{"name":"Garanti BBVA - TR76...0001 - Güncel","isActive":true}}}}}},"responses":{"201":{"description":"Bank account updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Update a bank account","tags":["Bank Accounts"]},"delete":{"operationId":"deleteBankAccount","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"Bank account deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Delete a bank account","tags":["Bank Accounts"]}},"/api/bank-accounts/{id}/set-default":{"post":{"operationId":"setDefaultBankAccount","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"Bank account set as default successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Set a bank account as default","tags":["Bank Accounts"]}},"/api/bank-accounts/{id}/archive":{"post":{"operationId":"archiveBankAccount","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"Bank account archiving is forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Archive a bank account","tags":["Bank Accounts"]}},"/api/bank-accounts/{id}/transactions":{"get":{"operationId":"getBankAccountTransactions","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"pageNumber","required":true,"in":"query","description":"Sayfa numarası","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"pageSize","required":true,"in":"query","description":"Sayfa başına gösterilecek kayıt sayısı","schema":{"minimum":1,"example":10,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Arama metni","schema":{"example":"john","type":"string"}},{"name":"accountId","required":false,"in":"query","description":"Hesap ID'si ile filtrele","schema":{"type":"string"}},{"name":"expenseItemId","required":false,"in":"query","description":"Gider kalemi ID'si ile filtrele","schema":{"type":"string"}},{"name":"beginDate","required":false,"in":"query","description":"Başlangıç tarihi (ISO formatında)","schema":{"example":"2024-01-01","type":"string"}},{"name":"endDate","required":false,"in":"query","description":"Bitiş tarihi (ISO formatında)","schema":{"example":"2024-12-31","type":"string"}},{"name":"type","required":false,"in":"query","description":"İşlem tipi ile filtrele. INVOICE / RETURN / CANCELLATION belge etkisine göre filtreler (TransactionType dışı).","schema":{"type":"string","enum":["COLLECTION","PAYMENT","TRANSFER","ADJUSTMENT","OPENING_BALANCE","INVOICE","RETURN","CANCELLATION"]}},{"name":"direction","required":false,"in":"query","description":"İşlem yönü ile filtrele","schema":{"type":"string","enum":["IN","OUT"]}},{"name":"showSystemGenerated","required":false,"in":"query","description":"Sistem tarafından oluşturulan işlemleri göster (varsayılan: true)","schema":{"default":true,"type":"boolean"}}],"responses":{"200":{"description":"Bank account transactions retrieved successfully","content":{"application/json":{"schema":{"title":"PaginatedTransaction","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TransactionDto"}},"pageNumber":{"type":"number","example":1,"minimum":1},"pageSize":{"type":"number","example":10,"minimum":1},"totalPages":{"type":"number","example":5,"minimum":0},"totalCount":{"type":"number","example":50,"minimum":0},"hasPreviousPage":{"type":"boolean","example":false},"hasNextPage":{"type":"boolean","example":true}},"required":["items","pageNumber","totalPages","totalCount","hasPreviousPage","hasNextPage"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get bank account transactions","tags":["Bank Accounts"]}},"/api/bank-institutions":{"get":{"operationId":"bankInstitutionsList","parameters":[],"responses":{"200":{"description":"Bank institution list","content":{"application/json":{"schema":{"title":"BankInstitutionListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/BankInstitutionDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"List bank institutions","tags":["Bank Institutions"]}},"/api/cash-accounts/lookup":{"get":{"operationId":"cashLookup","parameters":[{"name":"search","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Cash account lookup retrieved successfully","content":{"application/json":{"schema":{"title":"LookupListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/LookupDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Cash account lookup","tags":["Cash Accounts"]}},"/api/cash-accounts":{"post":{"operationId":"createCashAccount","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCashAccountDto"},"examples":{"default":{"summary":"Kasa oluştur","description":"Yeni bir kasa hesabı tanımlar","value":{"name":"Merkez Kasa","currency":"TRY","openingBalance":1000}}}}}},"responses":{"201":{"description":"Cash created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create a cash account","tags":["Cash Accounts"]},"get":{"operationId":"getCashAccounts","parameters":[{"name":"pageNumber","required":true,"in":"query","description":"Sayfa numarası","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"pageSize","required":true,"in":"query","description":"Sayfa başına gösterilecek kayıt sayısı","schema":{"minimum":1,"example":10,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Arama metni","schema":{"example":"john","type":"string"}},{"name":"status","required":false,"in":"query","description":"Filter by status using SSOT model (ACTIVE, PASSIVE, ALL)","schema":{"default":"ACTIVE","type":"string","enum":["ACTIVE","PASSIVE","ALL"]}},{"name":"isDefault","required":false,"in":"query","description":"Varsayılan hesapları filtrele","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Cashes retrieved successfully","content":{"application/json":{"schema":{"title":"PaginatedCashAccount","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CashAccountDto"}},"pageNumber":{"type":"number","example":1,"minimum":1},"pageSize":{"type":"number","example":10,"minimum":1},"totalPages":{"type":"number","example":5,"minimum":0},"totalCount":{"type":"number","example":50,"minimum":0},"hasPreviousPage":{"type":"boolean","example":false},"hasNextPage":{"type":"boolean","example":true}},"required":["items","pageNumber","totalPages","totalCount","hasPreviousPage","hasNextPage"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get cash accounts","tags":["Cash Accounts"]}},"/api/cash-accounts/{id}":{"get":{"operationId":"getCashAccountById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Cash retrieved successfully","content":{"application/json":{"schema":{"title":"CashAccountResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/CashAccountDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get cash account by ID","tags":["Cash Accounts"]},"patch":{"operationId":"updateCashAccount","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCashAccountDto"},"examples":{"default":{"summary":"Kasa güncelle","description":"Kasa bilgilerini günceller","value":{"name":"Merkez Kasa - Güncel","isActive":true}}}}}},"responses":{"201":{"description":"Cash updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Update a cash account","tags":["Cash Accounts"]},"delete":{"operationId":"deleteCashAccount","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"Cash account deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Delete a cash account","tags":["Cash Accounts"]}},"/api/cash-accounts/{id}/set-default":{"post":{"operationId":"setDefaultCashAccount","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"Cash account set as default successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Set a cash account as default","tags":["Cash Accounts"]}},"/api/cash-accounts/{id}/transactions":{"get":{"operationId":"getCashAccountTransactions","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"pageNumber","required":true,"in":"query","description":"Sayfa numarası","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"pageSize","required":true,"in":"query","description":"Sayfa başına gösterilecek kayıt sayısı","schema":{"minimum":1,"example":10,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Arama metni","schema":{"example":"john","type":"string"}},{"name":"accountId","required":false,"in":"query","description":"Hesap ID'si ile filtrele","schema":{"type":"string"}},{"name":"expenseItemId","required":false,"in":"query","description":"Gider kalemi ID'si ile filtrele","schema":{"type":"string"}},{"name":"beginDate","required":false,"in":"query","description":"Başlangıç tarihi (ISO formatında)","schema":{"example":"2024-01-01","type":"string"}},{"name":"endDate","required":false,"in":"query","description":"Bitiş tarihi (ISO formatında)","schema":{"example":"2024-12-31","type":"string"}},{"name":"type","required":false,"in":"query","description":"İşlem tipi ile filtrele. INVOICE / RETURN / CANCELLATION belge etkisine göre filtreler (TransactionType dışı).","schema":{"type":"string","enum":["COLLECTION","PAYMENT","TRANSFER","ADJUSTMENT","OPENING_BALANCE","INVOICE","RETURN","CANCELLATION"]}},{"name":"direction","required":false,"in":"query","description":"İşlem yönü ile filtrele","schema":{"type":"string","enum":["IN","OUT"]}},{"name":"showSystemGenerated","required":false,"in":"query","description":"Sistem tarafından oluşturulan işlemleri göster (varsayılan: true)","schema":{"default":true,"type":"boolean"}}],"responses":{"200":{"description":"Cash account transactions retrieved successfully","content":{"application/json":{"schema":{"title":"PaginatedTransaction","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TransactionDto"}},"pageNumber":{"type":"number","example":1,"minimum":1},"pageSize":{"type":"number","example":10,"minimum":1},"totalPages":{"type":"number","example":5,"minimum":0},"totalCount":{"type":"number","example":50,"minimum":0},"hasPreviousPage":{"type":"boolean","example":false},"hasNextPage":{"type":"boolean","example":true}},"required":["items","pageNumber","totalPages","totalCount","hasPreviousPage","hasNextPage"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get cash account transactions","tags":["Cash Accounts"]}},"/api/credit-cards":{"get":{"operationId":"creditCardsList","parameters":[],"responses":{"200":{"description":"Credit cards listed successfully","content":{"application/json":{"schema":{"title":"CreditCardAccountListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/CreditCardAccountDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"List credit card accounts","tags":["Credit Cards"]},"post":{"operationId":"creditCardCreate","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCreditCardDto"},"examples":{"default":{"summary":"Kredi kartı hesabı oluştur","description":"Account (CREDIT_CARD) + CreditCard uzantısı","value":{"name":"Kredi Kartı","currency":"TRY","creditLimit":50000,"statementDay":15,"dueDay":25,"currentDebt":0}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create credit card account","tags":["Credit Cards"]}},"/api/credit-cards/{id}":{"patch":{"operationId":"creditCardUpdate","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCreditCardDto"}}}},"responses":{"200":{"description":"Credit card updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Update credit card account","tags":["Credit Cards"]},"delete":{"operationId":"creditCardDelete","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"Credit card deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Delete credit card account","tags":["Credit Cards"]},"get":{"operationId":"creditCardDetail","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Credit card retrieved successfully","content":{"application/json":{"schema":{"title":"CreditCardAccountResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/CreditCardAccountDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get credit card detail","tags":["Credit Cards"]}},"/api/credit-cards/import/preview":{"post":{"operationId":"creditCardImportPreview","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportPreviewDto"}}}},"responses":{"201":{"description":"Preview generated","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CreditCardImportPreviewResultDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Preview credit card statement import","tags":["Credit Cards"]}},"/api/credit-cards/import/confirm":{"post":{"operationId":"creditCardImportConfirm","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportConfirmDto"}}}},"responses":{"201":{"description":"Import completed","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CreditCardImportConfirmResultDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Confirm credit card statement import","tags":["Credit Cards"]}},"/api/credit-cards/import/templates":{"get":{"operationId":"importTemplatesList","parameters":[],"responses":{"200":{"description":"Import templates retrieved successfully","content":{"application/json":{"schema":{"title":"ImportTemplateListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ImportTemplateDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"List import templates","tags":["Credit Cards"]}},"/api/credit-cards/spending-summary":{"get":{"operationId":"creditCardsSpendingSummary","parameters":[{"name":"beginDate","required":false,"in":"query","description":"Başlangıç tarihi (ISO)","schema":{"example":"2026-04-01","type":"string"}},{"name":"endDate","required":false,"in":"query","description":"Bitiş tarihi (ISO)","schema":{"example":"2026-04-30","type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"title":"CreditCardSpendingSummaryResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/CreditCardSpendingSummaryDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get credit card spending summary","tags":["Credit Cards"]}},"/api/credit-cards/reports/detailed":{"get":{"operationId":"creditCardsDetailedReport","parameters":[{"name":"beginDate","required":false,"in":"query","description":"Başlangıç tarihi (ISO)","schema":{"example":"2026-04-01","type":"string"}},{"name":"endDate","required":false,"in":"query","description":"Bitiş tarihi (ISO)","schema":{"example":"2026-04-30","type":"string"}},{"name":"cardId","required":false,"in":"query","description":"Belirli bir kredi kartı için filtreleme (Account ID)","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"title":"CreditCardDetailedReportResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/CreditCardDetailedReportDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get credit card detailed report","tags":["Credit Cards"]}},"/api/credit-cards/reports/statement-cycles":{"get":{"operationId":"creditCardsStatementCycles","parameters":[{"name":"cardId","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"title":"StatementCyclesResponseResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/StatementCyclesResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get credit card statement cycles","tags":["Credit Cards"]}},"/api/credit-cards/reports/recurring":{"get":{"operationId":"creditCardsRecurring","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"title":"RecurringResponseResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/RecurringResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get credit card recurring subscriptions","tags":["Credit Cards"]}},"/api/credit-cards/reports/weekly-heatmap":{"get":{"operationId":"creditCardsWeeklyHeatmap","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"title":"WeeklyHeatmapResponseResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/WeeklyHeatmapResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get weekly spending heatmap","tags":["Credit Cards"]}},"/api/credit-cards/{id}/transactions":{"get":{"operationId":"creditCardTransactions","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"pageNumber","required":true,"in":"query","description":"Sayfa numarası","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"pageSize","required":true,"in":"query","description":"Sayfa başına gösterilecek kayıt sayısı","schema":{"minimum":1,"example":10,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Arama metni","schema":{"example":"john","type":"string"}},{"name":"accountId","required":false,"in":"query","description":"Hesap ID'si ile filtrele","schema":{"type":"string"}},{"name":"expenseItemId","required":false,"in":"query","description":"Gider kalemi ID'si ile filtrele","schema":{"type":"string"}},{"name":"beginDate","required":false,"in":"query","description":"Başlangıç tarihi (ISO formatında)","schema":{"example":"2024-01-01","type":"string"}},{"name":"endDate","required":false,"in":"query","description":"Bitiş tarihi (ISO formatında)","schema":{"example":"2024-12-31","type":"string"}},{"name":"type","required":false,"in":"query","description":"İşlem tipi ile filtrele. INVOICE / RETURN / CANCELLATION belge etkisine göre filtreler (TransactionType dışı).","schema":{"type":"string","enum":["COLLECTION","PAYMENT","TRANSFER","ADJUSTMENT","OPENING_BALANCE","INVOICE","RETURN","CANCELLATION"]}},{"name":"direction","required":false,"in":"query","description":"İşlem yönü ile filtrele","schema":{"type":"string","enum":["IN","OUT"]}},{"name":"showSystemGenerated","required":false,"in":"query","description":"Sistem tarafından oluşturulan işlemleri göster (varsayılan: true)","schema":{"default":true,"type":"boolean"}}],"responses":{"200":{"description":"Credit card transactions retrieved successfully","content":{"application/json":{"schema":{"title":"PaginatedTransaction","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TransactionDto"}},"pageNumber":{"type":"number","example":1,"minimum":1},"pageSize":{"type":"number","example":10,"minimum":1},"totalPages":{"type":"number","example":5,"minimum":0},"totalCount":{"type":"number","example":50,"minimum":0},"hasPreviousPage":{"type":"boolean","example":false},"hasNextPage":{"type":"boolean","example":true}},"required":["items","pageNumber","totalPages","totalCount","hasPreviousPage","hasNextPage"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get credit card transactions","tags":["Credit Cards"]}},"/api/credit-cards/{id}/pay":{"post":{"operationId":"creditCardPay","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditCardPaymentDto"}}}},"responses":{"201":{"description":"Payment created","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Pay credit card from bank/cash","tags":["Credit Cards"]}},"/api/credit-cards/{id}/transactions/manual":{"post":{"operationId":"creditCardManualTx","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualCreditCardTransactionDto"}}}},"responses":{"201":{"description":"Transaction created","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create manual credit card transaction","tags":["Credit Cards"]}},"/api/bank-reconciliation/import/preview":{"post":{"operationId":"bankReconciliationPreview","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconciliationImportPreviewDto"}}}},"responses":{"201":{"description":"Preview generated","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/ReconciliationPreviewResultDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Preview bank statement import","tags":["Bank Reconciliation"]}},"/api/bank-reconciliation":{"post":{"operationId":"bankReconciliationCreate","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReconciliationDto"}}}},"responses":{"201":{"description":"Reconciliation created","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create bank reconciliation","tags":["Bank Reconciliation"]},"get":{"operationId":"bankReconciliationList","parameters":[{"name":"pageNumber","required":false,"in":"query","description":"Sayfa numarası","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"Sayfa boyutu","schema":{"minimum":1,"default":10,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Arama","schema":{"type":"string"}},{"name":"bankAccountId","required":false,"in":"query","description":"Banka hesabı ID","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","description":"Mutabakat durumu","schema":{"type":"string","enum":["DRAFT","IN_REVIEW","COMPLETED","CANCELLED"]}}],"responses":{"200":{"description":"Reconciliations retrieved","content":{"application/json":{"schema":{"title":"PaginatedBankReconciliation","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/BankReconciliationDto"}},"pageNumber":{"type":"number","example":1,"minimum":1},"pageSize":{"type":"number","example":10,"minimum":1},"totalPages":{"type":"number","example":5,"minimum":0},"totalCount":{"type":"number","example":50,"minimum":0},"hasPreviousPage":{"type":"boolean","example":false},"hasNextPage":{"type":"boolean","example":true}},"required":["items","pageNumber","totalPages","totalCount","hasPreviousPage","hasNextPage"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"List reconciliations","tags":["Bank Reconciliation"]}},"/api/bank-reconciliation/{id}":{"get":{"operationId":"bankReconciliationDetail","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Reconciliation retrieved","content":{"application/json":{"schema":{"title":"BankReconciliationResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/BankReconciliationDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get reconciliation detail","tags":["Bank Reconciliation"]},"delete":{"operationId":"bankReconciliationDelete","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Reconciliation deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Delete reconciliation","tags":["Bank Reconciliation"]}},"/api/bank-reconciliation/{id}/lines":{"get":{"operationId":"bankReconciliationLines","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Reconciliation lines retrieved successfully","content":{"application/json":{"schema":{"title":"ReconciliationLineListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ReconciliationLineDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get reconciliation lines","tags":["Bank Reconciliation"]}},"/api/bank-reconciliation/{id}/unmatched-transactions":{"get":{"operationId":"bankReconciliationUnmatched","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"search","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Unmatched transactions retrieved successfully","content":{"application/json":{"schema":{"title":"UnmatchedTransactionListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/UnmatchedTransactionDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get unmatched transactions","tags":["Bank Reconciliation"]}},"/api/bank-reconciliation/{id}/resolve":{"post":{"operationId":"bankReconciliationResolve","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveReconciliationDto"}}}},"responses":{"201":{"description":"Lines resolved","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Resolve reconciliation lines","tags":["Bank Reconciliation"]}},"/api/bank-reconciliation/{id}/complete":{"post":{"operationId":"bankReconciliationComplete","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"Reconciliation completed","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Complete reconciliation","tags":["Bank Reconciliation"]}},"/api/bank-reconciliation/{id}/cancel":{"post":{"operationId":"bankReconciliationCancel","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"Reconciliation cancelled","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Cancel reconciliation","tags":["Bank Reconciliation"]}},"/api/loans":{"get":{"operationId":"loansList","parameters":[],"responses":{"200":{"description":"Loan accounts retrieved successfully","content":{"application/json":{"schema":{"title":"LoanAccountListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/LoanAccountDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"List loan accounts","tags":["Loans"]},"post":{"operationId":"loanCreate","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLoanDto"},"examples":{"default":{"summary":"Kredi hesabı oluştur","description":"Account (LOAN) + Loan uzantısı","value":{"name":"İşletme Kredisi","principal":100000,"currency":"TRY","isOpeningBalance":false}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create loan account","tags":["Loans"]}},"/api/loans/{id}":{"get":{"operationId":"loanDetail","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Loan account retrieved successfully","content":{"application/json":{"schema":{"title":"LoanAccountResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/LoanAccountDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get loan account by ID","tags":["Loans"]},"patch":{"operationId":"loanUpdate","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLoanDto"},"examples":{"default":{"summary":"Kredi hesabı güncelle","description":"Hesap + Loan uzantısı alanlarını günceller","value":{"name":"İşletme Kredisi (Revize)","interestRate":"2.4900","termMonths":48}}}}}},"responses":{"200":{"description":"Loan account updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Update loan account","tags":["Loans"]},"delete":{"operationId":"loanDelete","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Loan account deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Delete loan account","tags":["Loans"]}},"/api/invoices":{"post":{"operationId":"createInvoice","parameters":[{"name":"x-idempotency-key","in":"header","description":"Idempotency key to prevent duplicate requests","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvoiceDto"}}}},"responses":{"201":{"description":"Invoice created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create an invoice","tags":["Invoices"]},"get":{"operationId":"getInvoices","parameters":[{"name":"pageNumber","required":true,"in":"query","description":"Sayfa numarası","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"pageSize","required":true,"in":"query","description":"Sayfa başına gösterilecek kayıt sayısı","schema":{"minimum":1,"example":10,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Arama metni","schema":{"example":"john","type":"string"}},{"name":"type","required":false,"in":"query","description":"Invoice type(s)","schema":{"type":"array","items":{"type":"string","enum":["SALES","PURCHASE","EXPENSE","SALES_RETURN","PURCHASE_RETURN"]}}},{"name":"showCancelled","required":false,"in":"query","description":"Filter cancelled invoices","schema":{"default":false,"type":"boolean"}},{"name":"beginDate","required":false,"in":"query","description":"Begin date (ISO 8601)","schema":{"example":"2024-01-01","type":"string"}},{"name":"endDate","required":false,"in":"query","description":"End date (ISO 8601)","schema":{"example":"2024-12-31","type":"string"}}],"responses":{"200":{"description":"Invoices retrieved successfully","content":{"application/json":{"schema":{"title":"PaginatedInvoice","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceDto"}},"pageNumber":{"type":"number","example":1,"minimum":1},"pageSize":{"type":"number","example":10,"minimum":1},"totalPages":{"type":"number","example":5,"minimum":0},"totalCount":{"type":"number","example":50,"minimum":0},"hasPreviousPage":{"type":"boolean","example":false},"hasNextPage":{"type":"boolean","example":true}},"required":["items","pageNumber","totalPages","totalCount","hasPreviousPage","hasNextPage"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get invoices","tags":["Invoices"]}},"/api/invoices/tevkifat-codes":{"get":{"operationId":"getTevkifatCodes","parameters":[],"responses":{"200":{"description":"Tevkifat codes retrieved successfully","content":{"application/json":{"schema":{"title":"TevkifatCodeListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/TevkifatCodeDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"List all valid tevkifat (withholding) codes","tags":["Invoices"]}},"/api/invoices/preview":{"post":{"operationId":"previewInvoice","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewInvoiceDto"}}}},"responses":{"201":{"description":"Preview calculated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/InvoicePreviewResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Preview invoice totals (InvoiceMath)","tags":["Invoices"]}},"/api/invoices/export":{"get":{"operationId":"exportInvoices","parameters":[{"name":"pageNumber","required":true,"in":"query","description":"Sayfa numarası","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"pageSize","required":true,"in":"query","description":"Sayfa başına gösterilecek kayıt sayısı","schema":{"minimum":1,"example":10,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Arama metni","schema":{"example":"john","type":"string"}},{"name":"type","required":false,"in":"query","description":"Invoice type(s)","schema":{"type":"array","items":{"type":"string","enum":["SALES","PURCHASE","EXPENSE","SALES_RETURN","PURCHASE_RETURN"]}}},{"name":"showCancelled","required":false,"in":"query","description":"Filter cancelled invoices","schema":{"default":false,"type":"boolean"}},{"name":"beginDate","required":false,"in":"query","description":"Begin date (ISO 8601)","schema":{"example":"2024-01-01","type":"string"}},{"name":"endDate","required":false,"in":"query","description":"End date (ISO 8601)","schema":{"example":"2024-12-31","type":"string"}}],"responses":{"200":{"description":""},"401":{"description":"Unauthorized"},"403":{"description":"Requires Branch Scope & Membership"}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Export invoices as Excel","tags":["Invoices"]}},"/api/invoices/{id}":{"get":{"operationId":"getInvoice","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Invoice retrieved successfully","content":{"application/json":{"schema":{"title":"InvoiceResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/InvoiceDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get invoice by ID","tags":["Invoices"]},"patch":{"operationId":"updateInvoice","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInvoiceDto"}}}},"responses":{"201":{"description":"Invoice updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Update an invoice","tags":["Invoices"]},"delete":{"operationId":"deleteInvoice","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Invoice deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Delete an invoice","tags":["Invoices"]}},"/api/invoices/{id}/balance":{"get":{"operationId":"getInvoiceBalance","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Invoice balance retrieved successfully","content":{"application/json":{"schema":{"title":"InvoiceBalanceResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/InvoiceBalanceDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get invoice payment balance","tags":["Invoices"]}},"/api/invoices/{id}/pdf":{"get":{"operationId":"getInvoicePdf","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""},"401":{"description":"Unauthorized"},"403":{"description":"Requires Branch Scope & Membership"}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Download invoice as PDF","tags":["Invoices"]}},"/api/invoices/{id}/cancel":{"post":{"operationId":"cancelInvoice","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"Invoice cancelled successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Cancel an invoice (with reversal if paid)","tags":["Invoices"]}},"/api/invoices/{id}/payments":{"post":{"operationId":"addInvoicePayment","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-idempotency-key","in":"header","description":"Idempotency key to prevent duplicate payments","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddInvoicePaymentDto"}}}},"responses":{"201":{"description":"Payment(s) added successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/InvoicePaymentResultDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Add payment(s) to an invoice","tags":["Invoices"]}},"/api/inventory/warehouses":{"get":{"operationId":"listWarehouses","parameters":[],"responses":{"200":{"description":"Warehouses retrieved successfully","content":{"application/json":{"schema":{"title":"WarehouseListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/WarehouseDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"List warehouses for current branch","tags":["Inventory — Warehouses"]},"post":{"operationId":"createWarehouse","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWarehouseDto"}}}},"responses":{"201":{"description":"Warehouse created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create warehouse","tags":["Inventory — Warehouses"]}},"/api/inventory/warehouses/{id}":{"get":{"operationId":"getWarehouseById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Warehouse retrieved successfully","content":{"application/json":{"schema":{"title":"WarehouseResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/WarehouseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get warehouse by id","tags":["Inventory — Warehouses"]},"patch":{"operationId":"updateWarehouse","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWarehouseDto"}}}},"responses":{"200":{"description":"Warehouse updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Update warehouse","tags":["Inventory — Warehouses"]}},"/api/inventory/movements":{"get":{"operationId":"listBranchStockMovements","parameters":[{"name":"productId","required":false,"in":"query","description":"Filter by product id","schema":{"type":"string"}},{"name":"warehouseId","required":false,"in":"query","description":"Filter by warehouse id","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","description":"Movement type","schema":{"type":"string","enum":["OPENING","SALE","PURCHASE","RETURN","ADJUSTMENT","TRANSFER"]}},{"name":"startDate","required":false,"in":"query","description":"Start date (ISO-8601)","schema":{"type":"string"}},{"name":"endDate","required":false,"in":"query","description":"End date (ISO-8601)","schema":{"type":"string"}},{"name":"pageNumber","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"Page size","schema":{"minimum":1,"example":20,"type":"number"}}],"responses":{"200":{"description":"Stock movements for current branch retrieved successfully","content":{"application/json":{"schema":{"title":"PaginatedStockMovement","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/StockMovementDto"}},"pageNumber":{"type":"number","example":1,"minimum":1},"pageSize":{"type":"number","example":10,"minimum":1},"totalPages":{"type":"number","example":5,"minimum":0},"totalCount":{"type":"number","example":50,"minimum":0},"hasPreviousPage":{"type":"boolean","example":false},"hasNextPage":{"type":"boolean","example":true}},"required":["items","pageNumber","totalPages","totalCount","hasPreviousPage","hasNextPage"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Stock movements for current branch (all products unless filtered)","tags":["Inventory — Stock"]}},"/api/inventory/product/{id}/stock":{"get":{"operationId":"getProductStock","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"warehouseId","required":false,"in":"query","description":"Filter by warehouse id","schema":{"type":"string"}}],"responses":{"200":{"description":"Product stock retrieved successfully","content":{"application/json":{"schema":{"title":"ProductStockSnapshotResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/ProductStockSnapshotDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Current stock for a product (branch-wide or one warehouse)","tags":["Inventory — Stock"]}},"/api/inventory/product/{id}/movements":{"get":{"operationId":"getProductStockMovements","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"startDate","required":false,"in":"query","description":"Start date (ISO-8601)","schema":{"type":"string"}},{"name":"endDate","required":false,"in":"query","description":"End date (ISO-8601)","schema":{"type":"string"}},{"name":"warehouseId","required":false,"in":"query","description":"Filter by warehouse id","schema":{"type":"string"}},{"name":"pageNumber","required":false,"in":"query","description":"Page number","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"Page size","schema":{"minimum":1,"example":20,"type":"number"}}],"responses":{"200":{"description":"Stock movements for product retrieved successfully","content":{"application/json":{"schema":{"title":"PaginatedStockMovement","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/StockMovementDto"}},"pageNumber":{"type":"number","example":1,"minimum":1},"pageSize":{"type":"number","example":10,"minimum":1},"totalPages":{"type":"number","example":5,"minimum":0},"totalCount":{"type":"number","example":50,"minimum":0},"hasPreviousPage":{"type":"boolean","example":false},"hasNextPage":{"type":"boolean","example":true}},"required":["items","pageNumber","totalPages","totalCount","hasPreviousPage","hasNextPage"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Stock movements for a product","tags":["Inventory — Stock"]}},"/api/inventory/movements/manual":{"post":{"operationId":"createManualStockMovement","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateManualStockMovementDto"}}}},"responses":{"201":{"description":"Manual stock movement created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create a manual stock movement (adjustment/opening)","tags":["Inventory — Stock Movements"]}},"/api/inventory/transfers":{"get":{"operationId":"listStockTransfers","parameters":[],"responses":{"200":{"description":"Stock transfers retrieved successfully","content":{"application/json":{"schema":{"title":"StockTransferListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/StockTransferDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"List recent stock transfers","tags":["Inventory — Transfers"]},"post":{"operationId":"createStockTransfer","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStockTransferDto"}}}},"responses":{"201":{"description":"Stock transfer created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create draft transfer","tags":["Inventory — Transfers"]}},"/api/inventory/transfers/{id}/complete":{"post":{"operationId":"completeStockTransfer","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"Stock transfer completed","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Complete transfer (posts paired stock movements)","tags":["Inventory — Transfers"]}},"/api/inventory/transfers/{id}/cancel":{"patch":{"operationId":"cancelStockTransfer","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Stock transfer cancelled","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Cancel draft transfer","tags":["Inventory — Transfers"]}},"/api/inventory/transfers/{id}":{"get":{"operationId":"getStockTransferById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Stock transfer retrieved successfully","content":{"application/json":{"schema":{"title":"StockTransferResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/StockTransferDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get transfer by id","tags":["Inventory — Transfers"]}},"/api/products/lookup":{"get":{"operationId":"productLookup","parameters":[{"name":"searchKey","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Lookup items retrieved successfully","content":{"application/json":{"schema":{"title":"LookupListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/LookupDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Product lookup","tags":["Products"]}},"/api/products":{"post":{"operationId":"createProduct","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProductDto"}}}},"responses":{"201":{"description":"Product created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create a product","tags":["Products"]},"get":{"operationId":"getProducts","parameters":[{"name":"pageNumber","required":true,"in":"query","description":"Sayfa numarası","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"pageSize","required":true,"in":"query","description":"Sayfa başına gösterilecek kayıt sayısı","schema":{"minimum":1,"example":10,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Arama metni","schema":{"example":"john","type":"string"}},{"name":"status","required":false,"in":"query","description":"Filter by status using SSOT model (ACTIVE, PASSIVE, ALL)","schema":{"default":"ACTIVE","type":"string","enum":["ACTIVE","PASSIVE","ALL"]}},{"name":"isDefault","required":false,"in":"query","description":"Varsayılan hesapları filtrele","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Products retrieved successfully","content":{"application/json":{"schema":{"title":"PaginatedProduct","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ProductDto"}},"pageNumber":{"type":"number","example":1,"minimum":1},"pageSize":{"type":"number","example":10,"minimum":1},"totalPages":{"type":"number","example":5,"minimum":0},"totalCount":{"type":"number","example":50,"minimum":0},"hasPreviousPage":{"type":"boolean","example":false},"hasNextPage":{"type":"boolean","example":true}},"required":["items","pageNumber","totalPages","totalCount","hasPreviousPage","hasNextPage"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get products","tags":["Products"]}},"/api/products/{id}":{"get":{"operationId":"getProduct","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Product retrieved successfully","content":{"application/json":{"schema":{"title":"ProductResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/ProductDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get product by ID","tags":["Products"]},"patch":{"operationId":"updateProduct","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductDto"}}}},"responses":{"201":{"description":"Product updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Update a product","tags":["Products"]},"delete":{"operationId":"deleteProduct","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Product deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Delete a product (soft delete)","tags":["Products"]}},"/api/expense-items/lookup":{"get":{"operationId":"expenseItemLookup","parameters":[{"name":"searchKey","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Lookup items retrieved successfully","content":{"application/json":{"schema":{"title":"LookupListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/LookupDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Expense item lookup","tags":["Expense Items"]}},"/api/expense-items":{"post":{"operationId":"createExpenseItem","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateExpenseItemDto"}}}},"responses":{"201":{"description":"Expense item created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create an expense item","tags":["Expense Items"]},"get":{"operationId":"getExpenseItems","parameters":[{"name":"pageNumber","required":true,"in":"query","description":"Sayfa numarası","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"pageSize","required":true,"in":"query","description":"Sayfa başına gösterilecek kayıt sayısı","schema":{"minimum":1,"example":10,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Arama metni","schema":{"example":"john","type":"string"}},{"name":"status","required":false,"in":"query","description":"Filter by status using SSOT model (ACTIVE, PASSIVE, ALL)","schema":{"default":"ACTIVE","type":"string","enum":["ACTIVE","PASSIVE","ALL"]}},{"name":"isDefault","required":false,"in":"query","description":"Varsayılan hesapları filtrele","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Expense items retrieved successfully","content":{"application/json":{"schema":{"title":"PaginatedExpenseItem","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ExpenseItemDto"}},"pageNumber":{"type":"number","example":1,"minimum":1},"pageSize":{"type":"number","example":10,"minimum":1},"totalPages":{"type":"number","example":5,"minimum":0},"totalCount":{"type":"number","example":50,"minimum":0},"hasPreviousPage":{"type":"boolean","example":false},"hasNextPage":{"type":"boolean","example":true}},"required":["items","pageNumber","totalPages","totalCount","hasPreviousPage","hasNextPage"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get expense items","tags":["Expense Items"]}},"/api/expense-items/{id}":{"get":{"operationId":"getExpenseItem","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Expense item retrieved successfully","content":{"application/json":{"schema":{"title":"ExpenseItemResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/ExpenseItemDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get expense item by ID","tags":["Expense Items"]},"patch":{"operationId":"updateExpenseItem","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateExpenseItemDto"}}}},"responses":{"201":{"description":"Expense item updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Update an expense item","tags":["Expense Items"]},"delete":{"operationId":"deleteExpenseItem","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Expense item deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Delete an expense item (soft delete)","tags":["Expense Items"]}},"/api/transactions":{"post":{"operationId":"createTransaction","parameters":[{"name":"x-idempotency-key","in":"header","description":"Idempotency key to prevent duplicate transactions","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTransactionDto"},"examples":{"default":{"summary":"Create transaction","description":"Create a new financial transaction","value":{"accountId":"550e8400-e29b-41d4-a716-446655440000","counterAccountId":"660e8400-e29b-41d4-a716-446655440001","direction":"IN","amount":1500,"currency":"TRY","type":"COLLECTION","description":"Service payment","date":"2023-10-27T10:00:00.000Z"}}}}}},"responses":{"201":{"description":"Transaction created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create a transaction","tags":["Transactions"]},"get":{"operationId":"getTransactions","parameters":[{"name":"pageNumber","required":true,"in":"query","description":"Sayfa numarası","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"pageSize","required":true,"in":"query","description":"Sayfa başına gösterilecek kayıt sayısı","schema":{"minimum":1,"example":10,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Arama metni","schema":{"example":"john","type":"string"}},{"name":"accountId","required":false,"in":"query","description":"Hesap ID'si ile filtrele","schema":{"type":"string"}},{"name":"expenseItemId","required":false,"in":"query","description":"Gider kalemi ID'si ile filtrele","schema":{"type":"string"}},{"name":"beginDate","required":false,"in":"query","description":"Başlangıç tarihi (ISO formatında)","schema":{"example":"2024-01-01","type":"string"}},{"name":"endDate","required":false,"in":"query","description":"Bitiş tarihi (ISO formatında)","schema":{"example":"2024-12-31","type":"string"}},{"name":"type","required":false,"in":"query","description":"İşlem tipi ile filtrele. INVOICE / RETURN / CANCELLATION belge etkisine göre filtreler (TransactionType dışı).","schema":{"type":"string","enum":["COLLECTION","PAYMENT","TRANSFER","ADJUSTMENT","OPENING_BALANCE","INVOICE","RETURN","CANCELLATION"]}},{"name":"direction","required":false,"in":"query","description":"İşlem yönü ile filtrele","schema":{"type":"string","enum":["IN","OUT"]}},{"name":"showSystemGenerated","required":false,"in":"query","description":"Sistem tarafından oluşturulan işlemleri göster (varsayılan: true)","schema":{"default":true,"type":"boolean"}}],"responses":{"200":{"description":"Transactions retrieved successfully","content":{"application/json":{"schema":{"title":"PaginatedTransaction","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TransactionDto"}},"pageNumber":{"type":"number","example":1,"minimum":1},"pageSize":{"type":"number","example":10,"minimum":1},"totalPages":{"type":"number","example":5,"minimum":0},"totalCount":{"type":"number","example":50,"minimum":0},"hasPreviousPage":{"type":"boolean","example":false},"hasNextPage":{"type":"boolean","example":true}},"required":["items","pageNumber","totalPages","totalCount","hasPreviousPage","hasNextPage"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get transactions","tags":["Transactions"]}},"/api/transactions/export":{"get":{"operationId":"exportTransactions","parameters":[{"name":"pageNumber","required":true,"in":"query","description":"Sayfa numarası","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"pageSize","required":true,"in":"query","description":"Sayfa başına gösterilecek kayıt sayısı","schema":{"minimum":1,"example":10,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Arama metni","schema":{"example":"john","type":"string"}},{"name":"accountId","required":false,"in":"query","description":"Hesap ID'si ile filtrele","schema":{"type":"string"}},{"name":"expenseItemId","required":false,"in":"query","description":"Gider kalemi ID'si ile filtrele","schema":{"type":"string"}},{"name":"beginDate","required":false,"in":"query","description":"Başlangıç tarihi (ISO formatında)","schema":{"example":"2024-01-01","type":"string"}},{"name":"endDate","required":false,"in":"query","description":"Bitiş tarihi (ISO formatında)","schema":{"example":"2024-12-31","type":"string"}},{"name":"type","required":false,"in":"query","description":"İşlem tipi ile filtrele. INVOICE / RETURN / CANCELLATION belge etkisine göre filtreler (TransactionType dışı).","schema":{"type":"string","enum":["COLLECTION","PAYMENT","TRANSFER","ADJUSTMENT","OPENING_BALANCE","INVOICE","RETURN","CANCELLATION"]}},{"name":"direction","required":false,"in":"query","description":"İşlem yönü ile filtrele","schema":{"type":"string","enum":["IN","OUT"]}},{"name":"showSystemGenerated","required":false,"in":"query","description":"Sistem tarafından oluşturulan işlemleri göster (varsayılan: true)","schema":{"default":true,"type":"boolean"}}],"responses":{"200":{"description":""},"401":{"description":"Unauthorized"},"403":{"description":"Requires Tenant Scope"}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Export transactions","tags":["Transactions"]}},"/api/transactions/{id}":{"get":{"operationId":"getTransactionById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Transaction retrieved successfully","content":{"application/json":{"schema":{"title":"TransactionResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/TransactionDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get transaction by ID","tags":["Transactions"]},"patch":{"operationId":"updateTransaction","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTransactionDto"},"examples":{"default":{"summary":"Update transaction","description":"Update transaction details","value":{"description":"Updated payment description"}}}}}},"responses":{"201":{"description":"Transaction updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Update a transaction","tags":["Transactions"]},"delete":{"operationId":"deleteTransaction","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"Transaction deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Delete a transaction","tags":["Transactions"]}},"/api/transactions/bulk-delete":{"post":{"operationId":"bulkDeleteTransactions","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteTransactionsDto"},"examples":{"default":{"summary":"Bulk delete example","description":"Silinecek işlem ID listesi","value":{"ids":["550e8400-e29b-41d4-a716-446655440000"]}}}}}},"responses":{"201":{"description":"Transactions deleted in bulk","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/BulkDeleteResultDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Delete transactions in bulk","tags":["Transactions"]}},"/api/period-summary/live":{"get":{"operationId":"getLivePeriodSummary","parameters":[{"name":"beginDate","required":true,"in":"query","schema":{"type":"string"}},{"name":"endDate","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Live period summary retrieved successfully","content":{"application/json":{"schema":{"title":"PeriodSummaryResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/PeriodSummaryDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get live period summary for date range","tags":["Period Summary"]}},"/api/period-summary/snapshots":{"post":{"operationId":"createPeriodSummarySnapshot","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSummarySnapshotDto"}}}},"responses":{"201":{"description":"Snapshot created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create period summary snapshot","tags":["Period Summary"]},"get":{"operationId":"getPeriodSummarySnapshots","parameters":[],"responses":{"200":{"description":"Snapshot list retrieved successfully","content":{"application/json":{"schema":{"title":"SummarySnapshotListItemListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/SummarySnapshotListItemDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"List period summary snapshots for branch","tags":["Period Summary"]}},"/api/period-summary/snapshots/{id}":{"get":{"operationId":"getPeriodSummarySnapshot","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Snapshot detail retrieved successfully","content":{"application/json":{"schema":{"title":"SummarySnapshotResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/SummarySnapshotDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get period summary snapshot by ID","tags":["Period Summary"]}},"/api/period-summary/snapshots/{id}/pdf":{"get":{"operationId":"getPeriodSummarySnapshotPdf","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""},"401":{"description":"Unauthorized"},"403":{"description":"Requires Tenant Scope"}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Download period summary snapshot as PDF","tags":["Period Summary"]}},"/api/suppliers/lookup":{"get":{"operationId":"supplierLookup","parameters":[{"name":"searchKey","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Supplier lookup retrieved successfully","content":{"application/json":{"schema":{"title":"LookupListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/LookupDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Supplier lookup","tags":["Suppliers"]}},"/api/suppliers":{"post":{"operationId":"createSupplier","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSupplierDto"}}}},"responses":{"201":{"description":"Supplier created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create a supplier","tags":["Suppliers"]},"get":{"operationId":"getSuppliers","parameters":[{"name":"pageNumber","required":true,"in":"query","description":"Sayfa numarası","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"pageSize","required":true,"in":"query","description":"Sayfa başına gösterilecek kayıt sayısı","schema":{"minimum":1,"example":10,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Arama metni","schema":{"example":"john","type":"string"}},{"name":"status","required":false,"in":"query","description":"Filter by status using SSOT model (ACTIVE, PASSIVE, ALL)","schema":{"default":"ACTIVE","type":"string","enum":["ACTIVE","PASSIVE","ALL"]}},{"name":"isDefault","required":false,"in":"query","description":"Varsayılan hesapları filtrele","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Suppliers retrieved successfully","content":{"application/json":{"schema":{"title":"PaginatedSupplier","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SupplierDto"}},"pageNumber":{"type":"number","example":1,"minimum":1},"pageSize":{"type":"number","example":10,"minimum":1},"totalPages":{"type":"number","example":5,"minimum":0},"totalCount":{"type":"number","example":50,"minimum":0},"hasPreviousPage":{"type":"boolean","example":false},"hasNextPage":{"type":"boolean","example":true}},"required":["items","pageNumber","totalPages","totalCount","hasPreviousPage","hasNextPage"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get suppliers","tags":["Suppliers"]}},"/api/suppliers/{id}":{"get":{"operationId":"getSupplier","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Supplier retrieved successfully","content":{"application/json":{"schema":{"title":"SupplierResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/SupplierDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get supplier by ID","tags":["Suppliers"]},"patch":{"operationId":"updateSupplier","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSupplierDto"}}}},"responses":{"201":{"description":"Supplier updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Update a supplier","tags":["Suppliers"]},"delete":{"operationId":"deleteSupplier","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"Supplier deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Delete a supplier","tags":["Suppliers"]}},"/api/suppliers/{id}/transactions":{"get":{"operationId":"getSupplierTransactions","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"pageNumber","required":true,"in":"query","description":"Sayfa numarası","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"pageSize","required":true,"in":"query","description":"Sayfa başına gösterilecek kayıt sayısı","schema":{"minimum":1,"example":10,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Arama metni","schema":{"example":"john","type":"string"}},{"name":"accountId","required":false,"in":"query","description":"Hesap ID'si ile filtrele","schema":{"type":"string"}},{"name":"expenseItemId","required":false,"in":"query","description":"Gider kalemi ID'si ile filtrele","schema":{"type":"string"}},{"name":"beginDate","required":false,"in":"query","description":"Başlangıç tarihi (ISO formatında)","schema":{"example":"2024-01-01","type":"string"}},{"name":"endDate","required":false,"in":"query","description":"Bitiş tarihi (ISO formatında)","schema":{"example":"2024-12-31","type":"string"}},{"name":"type","required":false,"in":"query","description":"İşlem tipi ile filtrele. INVOICE / RETURN / CANCELLATION belge etkisine göre filtreler (TransactionType dışı).","schema":{"type":"string","enum":["COLLECTION","PAYMENT","TRANSFER","ADJUSTMENT","OPENING_BALANCE","INVOICE","RETURN","CANCELLATION"]}},{"name":"direction","required":false,"in":"query","description":"İşlem yönü ile filtrele","schema":{"type":"string","enum":["IN","OUT"]}},{"name":"showSystemGenerated","required":false,"in":"query","description":"Sistem tarafından oluşturulan işlemleri göster (varsayılan: true)","schema":{"default":true,"type":"boolean"}}],"responses":{"200":{"description":"Supplier transactions retrieved successfully","content":{"application/json":{"schema":{"title":"PaginatedTransaction","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TransactionDto"}},"pageNumber":{"type":"number","example":1,"minimum":1},"pageSize":{"type":"number","example":10,"minimum":1},"totalPages":{"type":"number","example":5,"minimum":0},"totalCount":{"type":"number","example":50,"minimum":0},"hasPreviousPage":{"type":"boolean","example":false},"hasNextPage":{"type":"boolean","example":true}},"required":["items","pageNumber","totalPages","totalCount","hasPreviousPage","hasNextPage"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get supplier transactions","tags":["Suppliers"]}},"/api/payment-plans":{"post":{"operationId":"paymentPlanCreate","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentPlanDto"}}}},"responses":{"201":{"description":"Payment plan created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create manual payment plan","tags":["PaymentPlans"]},"get":{"operationId":"paymentPlansList","parameters":[],"responses":{"200":{"description":"Payment plans retrieved successfully","content":{"application/json":{"schema":{"title":"PaymentPlanListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/PaymentPlanDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get all payment plans","tags":["PaymentPlans"]}},"/api/payment-plans/template/excel":{"get":{"operationId":"paymentPlanTemplateDownload","parameters":[],"responses":{"200":{"description":""},"401":{"description":"Unauthorized"},"403":{"description":"Requires Tenant Scope"}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Download Excel template","tags":["PaymentPlans"]}},"/api/payment-plans/import/preview":{"post":{"operationId":"paymentPlanImportPreview","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentPlanImportPreviewDto"}}}},"responses":{"201":{"description":"Preview generated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/PaymentPlanImportPreviewResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Preview payment plan import (Excel header mapping)","tags":["PaymentPlans"]}},"/api/payment-plans/import/confirm":{"post":{"operationId":"paymentPlanImportConfirm","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentPlanImportConfirmDto"}}}},"responses":{"201":{"description":"Import confirmed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/PaymentPlanImportConfirmResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Confirm payment plan import (Excel header mapping)","tags":["PaymentPlans"]}},"/api/payment-plans/import/templates":{"get":{"operationId":"paymentPlanImportTemplates","parameters":[],"responses":{"200":{"description":"Import templates retrieved successfully","content":{"application/json":{"schema":{"title":"ImportTemplateListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ImportTemplateDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"List payment plan import templates","tags":["PaymentPlans"]}},"/api/payment-plans/{id}":{"get":{"operationId":"paymentPlanDetail","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Payment plan retrieved successfully","content":{"application/json":{"schema":{"title":"PaymentPlanResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/PaymentPlanDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get payment plan by id","tags":["PaymentPlans"]},"patch":{"operationId":"paymentPlanUpdate","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePaymentPlanDto"}}}},"responses":{"201":{"description":"Payment plan updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Update payment plan","tags":["PaymentPlans"]},"delete":{"operationId":"paymentPlanDelete","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Payment plan deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Delete entire plan","tags":["PaymentPlans"]}},"/api/payment-plans/import":{"post":{"operationId":"paymentPlanBulkImport","parameters":[],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file","name"],"properties":{"file":{"type":"string","format":"binary"},"name":{"type":"string","description":"Name of the plan"}}}}}},"responses":{"201":{"description":"Import completed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/ImportResultDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Import payment plan via Excel (legacy bulk upload)","tags":["PaymentPlans"]}},"/api/payment-plans/items/{id}/pay":{"patch":{"operationId":"paymentPlanItemMarkAsPaid","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"Installment marked as paid","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Mark installment as PAID (UI intent only — does not post to ledger; use /confirm-payment for that)","tags":["PaymentPlans"]}},"/api/payment-plans/items/{id}/unpay":{"patch":{"operationId":"paymentPlanItemMarkAsUnpaid","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"Installment marked as pending","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Mark installment as PENDING (UI intent only — does not remove ledger entries)","tags":["PaymentPlans"]}},"/api/payment-plans/items/{id}/confirm-payment":{"post":{"operationId":"paymentPlanItemConfirmPayment","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmPaymentDto"}}}},"responses":{"201":{"description":"Payment confirmed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/ConfirmPaymentResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Confirm installment payment — idempotent ledger write from the given source account","tags":["PaymentPlans"]}},"/api/payment-plans/items/{id}/revert-payment":{"post":{"operationId":"paymentPlanItemRevertPayment","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"Payment reverted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/RevertPaymentResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Revert installment payment — writes a reverse ledger entry (original row preserved)","tags":["PaymentPlans"]}},"/api/payment-plans/{id}/items":{"post":{"operationId":"paymentPlanItemCreate","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentPlanItemDto"}}}},"responses":{"201":{"description":"Installment created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Add a single installment to a plan","tags":["PaymentPlans"]}},"/api/payment-plans/items/{id}":{"patch":{"operationId":"paymentPlanItemUpdate","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePaymentPlanItemDto"}}}},"responses":{"201":{"description":"Installment updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Update a single installment (due date, amount, description)","tags":["PaymentPlans"]},"delete":{"operationId":"paymentPlanItemDelete","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Installment deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Delete a single installment","tags":["PaymentPlans"]}},"/api/employees/lookup":{"get":{"operationId":"employeeLookup","parameters":[{"name":"search","required":false,"in":"query","description":"Arama metni","schema":{"type":"string"}}],"responses":{"200":{"description":"Employee lookup retrieved successfully","content":{"application/json":{"schema":{"title":"LookupListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/LookupDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Employee lookup","tags":["Employees"]}},"/api/employees":{"post":{"operationId":"createEmployee","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmployeeDto"}}}},"responses":{"201":{"description":"Employee created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create an employee","tags":["Employees"]},"get":{"operationId":"getEmployees","parameters":[{"name":"pageNumber","required":true,"in":"query","description":"Sayfa numarası","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"pageSize","required":true,"in":"query","description":"Sayfa başına gösterilecek kayıt sayısı","schema":{"minimum":1,"example":10,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Arama metni","schema":{"example":"john","type":"string"}},{"name":"status","required":false,"in":"query","description":"Filter by status using SSOT model (ACTIVE, PASSIVE, ALL)","schema":{"default":"ACTIVE","type":"string","enum":["ACTIVE","PASSIVE","ALL"]}},{"name":"isDefault","required":false,"in":"query","description":"Varsayılan hesapları filtrele","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Employees retrieved successfully","content":{"application/json":{"schema":{"title":"PaginatedEmployee","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeDto"}},"pageNumber":{"type":"number","example":1,"minimum":1},"pageSize":{"type":"number","example":10,"minimum":1},"totalPages":{"type":"number","example":5,"minimum":0},"totalCount":{"type":"number","example":50,"minimum":0},"hasPreviousPage":{"type":"boolean","example":false},"hasNextPage":{"type":"boolean","example":true}},"required":["items","pageNumber","totalPages","totalCount","hasPreviousPage","hasNextPage"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get employees","tags":["Employees"]}},"/api/employees/{id}":{"get":{"operationId":"getEmployee","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Employee retrieved successfully","content":{"application/json":{"schema":{"title":"EmployeeResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/EmployeeDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get employee by ID","tags":["Employees"]},"patch":{"operationId":"updateEmployee","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEmployeeDto"}}}},"responses":{"201":{"description":"Employee updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Update an employee","tags":["Employees"]},"delete":{"operationId":"deleteEmployee","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"Employee deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Delete an employee","tags":["Employees"]}},"/api/employees/{id}/transactions":{"get":{"operationId":"getEmployeeTransactionsLegacy","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"pageNumber","required":true,"in":"query","description":"Sayfa numarası","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"pageSize","required":true,"in":"query","description":"Sayfa başına gösterilecek kayıt sayısı","schema":{"minimum":1,"example":10,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Arama metni","schema":{"example":"john","type":"string"}},{"name":"accountId","required":false,"in":"query","description":"Hesap ID'si ile filtrele","schema":{"type":"string"}},{"name":"expenseItemId","required":false,"in":"query","description":"Gider kalemi ID'si ile filtrele","schema":{"type":"string"}},{"name":"beginDate","required":false,"in":"query","description":"Başlangıç tarihi (ISO formatında)","schema":{"example":"2024-01-01","type":"string"}},{"name":"endDate","required":false,"in":"query","description":"Bitiş tarihi (ISO formatında)","schema":{"example":"2024-12-31","type":"string"}},{"name":"type","required":false,"in":"query","description":"İşlem tipi ile filtrele. INVOICE / RETURN / CANCELLATION belge etkisine göre filtreler (TransactionType dışı).","schema":{"type":"string","enum":["COLLECTION","PAYMENT","TRANSFER","ADJUSTMENT","OPENING_BALANCE","INVOICE","RETURN","CANCELLATION"]}},{"name":"direction","required":false,"in":"query","description":"İşlem yönü ile filtrele","schema":{"type":"string","enum":["IN","OUT"]}},{"name":"showSystemGenerated","required":false,"in":"query","description":"Sistem tarafından oluşturulan işlemleri göster (varsayılan: true)","schema":{"default":true,"type":"boolean"}}],"responses":{"200":{"description":"Employee transactions retrieved successfully","content":{"application/json":{"schema":{"title":"PaginatedTransaction","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TransactionDto"}},"pageNumber":{"type":"number","example":1,"minimum":1},"pageSize":{"type":"number","example":10,"minimum":1},"totalPages":{"type":"number","example":5,"minimum":0},"totalCount":{"type":"number","example":50,"minimum":0},"hasPreviousPage":{"type":"boolean","example":false},"hasNextPage":{"type":"boolean","example":true}},"required":["items","pageNumber","totalPages","totalCount","hasPreviousPage","hasNextPage"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get employee transactions (legacy)","tags":["Employees"]}},"/api/employees/{id}/ledger":{"post":{"operationId":"createEmployeeLedgerTransactionLegacy","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmployeeTransactionDto"}}}},"responses":{"201":{"description":"Transaction created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create employee ledger transaction (legacy)","tags":["Employees"]},"get":{"operationId":"getEmployeeLedgerLegacy","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"pageNumber","required":true,"in":"query","description":"Sayfa numarası","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"pageSize","required":true,"in":"query","description":"Sayfa başına gösterilecek kayıt sayısı","schema":{"minimum":1,"example":10,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Arama metni","schema":{"example":"john","type":"string"}},{"name":"accountId","required":false,"in":"query","description":"Hesap ID'si ile filtrele","schema":{"type":"string"}},{"name":"expenseItemId","required":false,"in":"query","description":"Gider kalemi ID'si ile filtrele","schema":{"type":"string"}},{"name":"beginDate","required":false,"in":"query","description":"Başlangıç tarihi (ISO formatında)","schema":{"example":"2024-01-01","type":"string"}},{"name":"endDate","required":false,"in":"query","description":"Bitiş tarihi (ISO formatında)","schema":{"example":"2024-12-31","type":"string"}},{"name":"type","required":false,"in":"query","description":"İşlem tipi ile filtrele. INVOICE / RETURN / CANCELLATION belge etkisine göre filtreler (TransactionType dışı).","schema":{"type":"string","enum":["COLLECTION","PAYMENT","TRANSFER","ADJUSTMENT","OPENING_BALANCE","INVOICE","RETURN","CANCELLATION"]}},{"name":"direction","required":false,"in":"query","description":"İşlem yönü ile filtrele","schema":{"type":"string","enum":["IN","OUT"]}},{"name":"showSystemGenerated","required":false,"in":"query","description":"Sistem tarafından oluşturulan işlemleri göster (varsayılan: true)","schema":{"default":true,"type":"boolean"}}],"responses":{"200":{"description":"Employee ledger retrieved successfully","content":{"application/json":{"schema":{"title":"PaginatedEmployeeLedgerItem","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeLedgerItemDto"}},"pageNumber":{"type":"number","example":1,"minimum":1},"pageSize":{"type":"number","example":10,"minimum":1},"totalPages":{"type":"number","example":5,"minimum":0},"totalCount":{"type":"number","example":50,"minimum":0},"hasPreviousPage":{"type":"boolean","example":false},"hasNextPage":{"type":"boolean","example":true}},"required":["items","pageNumber","totalPages","totalCount","hasPreviousPage","hasNextPage"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get employee ledger (legacy)","tags":["Employees"]}},"/api/employees/{id}/transactions/{transactionId}":{"patch":{"operationId":"updateEmployeeTransactionLegacy","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEmployeeTransactionDto"}}}},"responses":{"201":{"description":"Transaction updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Update employee transaction (legacy)","tags":["Employees"]},"delete":{"operationId":"deleteEmployeeTransactionLegacy","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"Transaction deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Delete employee transaction (legacy)","tags":["Employees"]}},"/api/employees/{id}/ledger-summary":{"get":{"operationId":"getEmployeeLedgerSummaryLegacy","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Employee ledger summary retrieved successfully","content":{"application/json":{"schema":{"title":"EmployeeLedgerSummaryResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/EmployeeLedgerSummaryDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get employee ledger summary (legacy)","tags":["Employees"]}},"/api/departments":{"post":{"operationId":"createDepartment","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDepartmentDto"}}}},"responses":{"201":{"description":"Department created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create a department","tags":["Departments"]},"get":{"operationId":"getDepartments","parameters":[],"responses":{"200":{"description":"Departments retrieved successfully","content":{"application/json":{"schema":{"title":"DepartmentListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get all departments","tags":["Departments"]}},"/api/departments/{id}":{"get":{"operationId":"getDepartmentById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Department retrieved successfully","content":{"application/json":{"schema":{"title":"DepartmentResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/DepartmentDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get department by ID","tags":["Departments"]},"patch":{"operationId":"updateDepartment","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDepartmentDto"}}}},"responses":{"201":{"description":"Department updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Update a department","tags":["Departments"]},"delete":{"operationId":"deleteDepartment","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"Department deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Delete a department","tags":["Departments"]}},"/api/leaves":{"post":{"operationId":"createLeave","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLeaveDto"}}}},"responses":{"201":{"description":"Leave record created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create a leave record","tags":["Leaves"]}},"/api/leaves/employee/{employeeId}":{"get":{"operationId":"getLeaves","parameters":[{"name":"employeeId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Leaves retrieved successfully","content":{"application/json":{"schema":{"title":"LeaveListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/LeaveDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get leaves for an employee","tags":["Leaves"]}},"/api/leaves/{id}":{"patch":{"operationId":"updateLeave","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLeaveDto"}}}},"responses":{"201":{"description":"Leave record updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Update a leave record","tags":["Leaves"]},"delete":{"operationId":"deleteLeave","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"Leave record deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Delete a leave record","tags":["Leaves"]}},"/api/leaves/{id}/approve":{"patch":{"operationId":"approveLeave","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveLeaveDto"}}}},"responses":{"201":{"description":"Leave request approved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Approve a leave request","tags":["Leaves"]}},"/api/leaves/{id}/reject":{"patch":{"operationId":"rejectLeave","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RejectLeaveDto"}}}},"responses":{"201":{"description":"Leave request rejected successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Reject a leave request","tags":["Leaves"]}},"/api/work-days":{"post":{"operationId":"createWorkDay","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkDayDto"}}}},"responses":{"201":{"description":"Work day entry created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create a work day entry","tags":["WorkDays"]}},"/api/work-days/employee/{employeeId}":{"get":{"operationId":"getWorkDays","parameters":[{"name":"employeeId","required":true,"in":"path","schema":{"type":"string"}},{"name":"startDate","required":false,"in":"query","description":"Başlangıç tarihi (ISO-8601)","schema":{"type":"string"}},{"name":"endDate","required":false,"in":"query","description":"Bitiş tarihi (ISO-8601)","schema":{"type":"string"}}],"responses":{"200":{"description":"Work days retrieved successfully","content":{"application/json":{"schema":{"title":"WorkDayListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/WorkDayDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get work days for an employee","tags":["WorkDays"]}},"/api/work-days/{id}":{"patch":{"operationId":"updateWorkDay","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkDayDto"}}}},"responses":{"201":{"description":"Work day entry updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Update a work day entry","tags":["WorkDays"]},"delete":{"operationId":"deleteWorkDay","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"Work day entry deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Delete a work day entry","tags":["WorkDays"]}},"/api/employee-documents/upload":{"post":{"operationId":"uploadEmployeeDocument","parameters":[],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["employeeId","file"],"properties":{"employeeId":{"type":"string","format":"uuid"},"category":{"type":"string","enum":["CONTRACT","ID_DOCUMENT","CERTIFICATE","HEALTH_REPORT","PAYSLIP","OTHER"]},"file":{"type":"string","format":"binary","description":"Belge dosyası"}}}}}},"responses":{"201":{"description":"Document uploaded successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Upload an employee document","tags":["Employee Documents"]}},"/api/employee-documents/employee/{employeeId}":{"get":{"operationId":"getEmployeeDocuments","parameters":[{"name":"employeeId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Documents retrieved successfully","content":{"application/json":{"schema":{"title":"EmployeeDocumentListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeDocumentDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get documents for an employee","tags":["Employee Documents"]}},"/api/employee-documents/{id}":{"delete":{"operationId":"deleteEmployeeDocument","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Document deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Delete an employee document","tags":["Employee Documents"]}},"/api/employee-notes":{"post":{"operationId":"createEmployeeNote","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmployeeNoteDto"}}}},"responses":{"201":{"description":"Note created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create an employee note","tags":["Employee Notes"]}},"/api/employee-notes/employee/{employeeId}":{"get":{"operationId":"getEmployeeNotes","parameters":[{"name":"employeeId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Notes retrieved successfully","content":{"application/json":{"schema":{"title":"EmployeeNoteListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeNoteDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get notes for an employee","tags":["Employee Notes"]}},"/api/employee-notes/{id}":{"patch":{"operationId":"updateEmployeeNote","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEmployeeNoteDto"}}}},"responses":{"201":{"description":"Note updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Update an employee note","tags":["Employee Notes"]},"delete":{"operationId":"deleteEmployeeNote","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"Note deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Delete an employee note","tags":["Employee Notes"]}},"/api/employee-transactions/{employeeId}":{"post":{"operationId":"createEmployeeTransaction","parameters":[{"name":"employeeId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmployeeTransactionDto"}}}},"responses":{"201":{"description":"Transaction created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create employee transaction","tags":["Employee Transactions"]},"get":{"operationId":"getEmployeeTransactions","parameters":[{"name":"employeeId","required":true,"in":"path","schema":{"type":"string"}},{"name":"pageNumber","required":true,"in":"query","description":"Sayfa numarası","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"pageSize","required":true,"in":"query","description":"Sayfa başına gösterilecek kayıt sayısı","schema":{"minimum":1,"example":10,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Arama metni","schema":{"example":"john","type":"string"}},{"name":"accountId","required":false,"in":"query","description":"Hesap ID'si ile filtrele","schema":{"type":"string"}},{"name":"expenseItemId","required":false,"in":"query","description":"Gider kalemi ID'si ile filtrele","schema":{"type":"string"}},{"name":"beginDate","required":false,"in":"query","description":"Başlangıç tarihi (ISO formatında)","schema":{"example":"2024-01-01","type":"string"}},{"name":"endDate","required":false,"in":"query","description":"Bitiş tarihi (ISO formatında)","schema":{"example":"2024-12-31","type":"string"}},{"name":"type","required":false,"in":"query","description":"İşlem tipi ile filtrele. INVOICE / RETURN / CANCELLATION belge etkisine göre filtreler (TransactionType dışı).","schema":{"type":"string","enum":["COLLECTION","PAYMENT","TRANSFER","ADJUSTMENT","OPENING_BALANCE","INVOICE","RETURN","CANCELLATION"]}},{"name":"direction","required":false,"in":"query","description":"İşlem yönü ile filtrele","schema":{"type":"string","enum":["IN","OUT"]}},{"name":"showSystemGenerated","required":false,"in":"query","description":"Sistem tarafından oluşturulan işlemleri göster (varsayılan: true)","schema":{"default":true,"type":"boolean"}}],"responses":{"200":{"description":"Employee transactions retrieved successfully","content":{"application/json":{"schema":{"title":"PaginatedTransaction","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TransactionDto"}},"pageNumber":{"type":"number","example":1,"minimum":1},"pageSize":{"type":"number","example":10,"minimum":1},"totalPages":{"type":"number","example":5,"minimum":0},"totalCount":{"type":"number","example":50,"minimum":0},"hasPreviousPage":{"type":"boolean","example":false},"hasNextPage":{"type":"boolean","example":true}},"required":["items","pageNumber","totalPages","totalCount","hasPreviousPage","hasNextPage"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get employee transactions","tags":["Employee Transactions"]}},"/api/employee-transactions/{employeeId}/{transactionId}":{"patch":{"operationId":"updateEmployeeTransaction","parameters":[{"name":"employeeId","required":true,"in":"path","schema":{"type":"string"}},{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEmployeeTransactionDto"}}}},"responses":{"201":{"description":"Transaction updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Update employee transaction","tags":["Employee Transactions"]},"delete":{"operationId":"deleteEmployeeTransaction","parameters":[{"name":"employeeId","required":true,"in":"path","schema":{"type":"string"}},{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"Transaction deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Delete employee transaction","tags":["Employee Transactions"]}},"/api/employee-transactions/{employeeId}/ledger":{"get":{"operationId":"getEmployeeLedger","parameters":[{"name":"employeeId","required":true,"in":"path","schema":{"type":"string"}},{"name":"pageNumber","required":true,"in":"query","description":"Sayfa numarası","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"pageSize","required":true,"in":"query","description":"Sayfa başına gösterilecek kayıt sayısı","schema":{"minimum":1,"example":10,"type":"number"}},{"name":"search","required":false,"in":"query","description":"Arama metni","schema":{"example":"john","type":"string"}},{"name":"accountId","required":false,"in":"query","description":"Hesap ID'si ile filtrele","schema":{"type":"string"}},{"name":"expenseItemId","required":false,"in":"query","description":"Gider kalemi ID'si ile filtrele","schema":{"type":"string"}},{"name":"beginDate","required":false,"in":"query","description":"Başlangıç tarihi (ISO formatında)","schema":{"example":"2024-01-01","type":"string"}},{"name":"endDate","required":false,"in":"query","description":"Bitiş tarihi (ISO formatında)","schema":{"example":"2024-12-31","type":"string"}},{"name":"type","required":false,"in":"query","description":"İşlem tipi ile filtrele. INVOICE / RETURN / CANCELLATION belge etkisine göre filtreler (TransactionType dışı).","schema":{"type":"string","enum":["COLLECTION","PAYMENT","TRANSFER","ADJUSTMENT","OPENING_BALANCE","INVOICE","RETURN","CANCELLATION"]}},{"name":"direction","required":false,"in":"query","description":"İşlem yönü ile filtrele","schema":{"type":"string","enum":["IN","OUT"]}},{"name":"showSystemGenerated","required":false,"in":"query","description":"Sistem tarafından oluşturulan işlemleri göster (varsayılan: true)","schema":{"default":true,"type":"boolean"}}],"responses":{"200":{"description":"Employee ledger retrieved successfully","content":{"application/json":{"schema":{"title":"PaginatedTransaction","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TransactionDto"}},"pageNumber":{"type":"number","example":1,"minimum":1},"pageSize":{"type":"number","example":10,"minimum":1},"totalPages":{"type":"number","example":5,"minimum":0},"totalCount":{"type":"number","example":50,"minimum":0},"hasPreviousPage":{"type":"boolean","example":false},"hasNextPage":{"type":"boolean","example":true}},"required":["items","pageNumber","totalPages","totalCount","hasPreviousPage","hasNextPage"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get employee ledger","tags":["Employee Transactions"]}},"/api/employee-transactions/{employeeId}/summary":{"get":{"operationId":"getEmployeeTransactionSummary","parameters":[{"name":"employeeId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Employee transaction summary retrieved successfully","content":{"application/json":{"schema":{"title":"EmployeeTransactionSummaryResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/EmployeeTransactionSummaryDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get employee transaction summary","tags":["Employee Transactions"]}},"/api/reports/product-sales":{"get":{"operationId":"getProductSalesReport","parameters":[{"name":"productId","required":false,"in":"query","description":"Ürün filtresi (boşsa tüm ürünler)","schema":{"format":"uuid","type":"string"}},{"name":"startDate","required":true,"in":"query","description":"Başlangıç tarihi (ISO 8601)","schema":{"example":"2024-01-01","type":"string"}},{"name":"endDate","required":true,"in":"query","description":"Bitiş tarihi (ISO 8601)","schema":{"example":"2024-01-31","type":"string"}}],"responses":{"200":{"description":"Ürün satış raporu başarıyla oluşturuldu","content":{"application/json":{"schema":{"title":"ProductSalesReportResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/ProductSalesReportDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Ürün satış raporu (tarih aralığı)","tags":["Reports"]}},"/api/reports/financial":{"get":{"operationId":"getUnifiedReport","parameters":[{"name":"beginDate","required":true,"in":"query","schema":{"type":"string"}},{"name":"endDate","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Unified financial report retrieved successfully","content":{"application/json":{"schema":{"title":"UnifiedFinancialReportResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/UnifiedFinancialReportDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get unified financial report (Scale-Safe)","tags":["Reports"]}},"/api/reports/cash-flow":{"get":{"operationId":"getCashFlowReport","parameters":[{"name":"beginDate","required":true,"in":"query","description":"Başlangıç tarihi (ISO 8601)","schema":{"example":"2026-01-01","type":"string"}},{"name":"endDate","required":true,"in":"query","description":"Bitiş tarihi (ISO 8601)","schema":{"example":"2026-04-30","type":"string"}},{"name":"groupBy","required":false,"in":"query","description":"Gruplama birimi","schema":{"default":"month","type":"string","enum":["day","week","month"]}}],"responses":{"200":{"description":"Nakit akış raporu başarıyla oluşturuldu","content":{"application/json":{"schema":{"title":"CashFlowReportResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/CashFlowReportDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Nakit akış raporu","tags":["Reports"]}},"/api/reports/receivables":{"get":{"operationId":"getReceivablesReport","parameters":[{"name":"minBalance","required":false,"in":"query","description":"Minimum bakiye filtresi (DecimalString)","schema":{"example":"100.0000","type":"string"}},{"name":"sortBy","required":false,"in":"query","schema":{"default":"balance","type":"string","enum":["balance","name","oldestInvoice"]}},{"name":"take","required":false,"in":"query","schema":{"minimum":1,"maximum":500,"default":100,"type":"number"}}],"responses":{"200":{"description":"Alacak raporu başarıyla oluşturuldu","content":{"application/json":{"schema":{"title":"ReceivablesReportResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/ReceivablesReportDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Alacak raporu (aging)","tags":["Reports"]}},"/api/reports/payables":{"get":{"operationId":"getPayablesReport","parameters":[{"name":"minBalance","required":false,"in":"query","description":"Minimum borç bakiye filtresi (DecimalString)","schema":{"example":"100.0000","type":"string"}},{"name":"sortBy","required":false,"in":"query","schema":{"default":"balance","type":"string","enum":["balance","name","oldestInvoice"]}},{"name":"take","required":false,"in":"query","schema":{"minimum":1,"maximum":500,"default":100,"type":"number"}}],"responses":{"200":{"description":"Borç raporu başarıyla oluşturuldu","content":{"application/json":{"schema":{"title":"PayablesReportResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/PayablesReportDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Borç raporu (aging)","tags":["Reports"]}},"/api/reports/overdue-invoices":{"get":{"operationId":"getOverdueInvoicesReport","parameters":[{"name":"type","required":false,"in":"query","description":"Fatura tipi filtresi (boşsa tümü)","schema":{"type":"string","enum":["SALES","PURCHASE"]}},{"name":"daysOverdueMin","required":false,"in":"query","description":"Minimum gecikme gün sayısı","schema":{"default":1,"type":"number"}},{"name":"sortBy","required":false,"in":"query","schema":{"default":"daysOverdue","type":"string","enum":["daysOverdue","amount","dueDate"]}},{"name":"take","required":false,"in":"query","schema":{"minimum":1,"maximum":500,"default":100,"type":"number"}}],"responses":{"200":{"description":"Vadesi geçen faturalar raporu başarıyla oluşturuldu","content":{"application/json":{"schema":{"title":"OverdueInvoicesReportResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/OverdueInvoicesReportDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Vadesi geçen faturalar","tags":["Reports"]}},"/api/reports/export":{"post":{"operationId":"exportUnifiedReport","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetConsolidatedReportDto"}}}},"responses":{"201":{"description":""},"401":{"description":"Unauthorized"},"403":{"description":"Requires Tenant Scope"}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Export Transaction Report","tags":["Reports"]}},"/api/reports/customer-ledger/export":{"get":{"operationId":"exportCustomerLedger","parameters":[{"name":"customerId","required":true,"in":"query","description":"Müşteri ID","schema":{"format":"uuid","type":"string"}},{"name":"startDate","required":false,"in":"query","description":"Başlangıç tarihi (ISO 8601)","schema":{"example":"2024-01-01","type":"string"}},{"name":"endDate","required":false,"in":"query","description":"Bitiş tarihi (ISO 8601)","schema":{"example":"2024-01-31","type":"string"}}],"responses":{"200":{"description":"Excel (.xlsx)","content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Requires Tenant Scope"}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Müşteri ekstresi excel export","tags":["Reports"]}},"/api/reports/customer-product-sales/export":{"get":{"operationId":"exportCustomerProductSales","parameters":[{"name":"customerId","required":true,"in":"query","description":"Müşteri ID","schema":{"format":"uuid","type":"string"}},{"name":"startDate","required":false,"in":"query","description":"Başlangıç tarihi (ISO 8601)","schema":{"example":"2024-01-01","type":"string"}},{"name":"endDate","required":false,"in":"query","description":"Bitiş tarihi (ISO 8601)","schema":{"example":"2024-01-31","type":"string"}}],"responses":{"200":{"description":"Excel (.xlsx)","content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Requires Tenant Scope"}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Müşteri ürün raporu excel export","tags":["Reports"]}},"/api/reports/supplier-ledger/export":{"get":{"operationId":"exportSupplierLedger","parameters":[{"name":"supplierId","required":true,"in":"query","description":"Supplier ID","schema":{"type":"string"}},{"name":"startDate","required":false,"in":"query","description":"Start Date","schema":{"type":"string"}},{"name":"endDate","required":false,"in":"query","description":"End Date","schema":{"type":"string"}}],"responses":{"200":{"description":"Excel (.xlsx)","content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Requires Tenant Scope"}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Tedarikçi ekstresi excel export","tags":["Reports"]}},"/api/reports/supplier-product-sales/export":{"get":{"operationId":"exportSupplierProductSales","parameters":[{"name":"supplierId","required":true,"in":"query","description":"Supplier ID","schema":{"type":"string"}},{"name":"startDate","required":false,"in":"query","description":"Start Date","schema":{"type":"string"}},{"name":"endDate","required":false,"in":"query","description":"End Date","schema":{"type":"string"}}],"responses":{"200":{"description":"Excel (.xlsx)","content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Requires Tenant Scope"}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Tedarikçi ürün raporu excel export","tags":["Reports"]}},"/api/attachments/upload":{"post":{"operationId":"uploadAttachment","parameters":[],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UploadAttachmentDto"}}}},"responses":{"201":{"description":"Attachment uploaded successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Upload an attachment","tags":["Attachments"]}},"/api/attachments/{relatedType}/{relatedId}":{"get":{"operationId":"getAttachments","parameters":[{"name":"relatedType","required":true,"in":"path","schema":{"type":"string"}},{"name":"relatedId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Attachments retrieved successfully","content":{"application/json":{"schema":{"title":"AttachmentListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/AttachmentDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get attachments for an entity","tags":["Attachments"]}},"/api/attachments/{id}":{"delete":{"operationId":"deleteAttachment","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Attachment deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Delete an attachment","tags":["Attachments"]}},"/api/notes":{"post":{"operationId":"createNote","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNoteDto"}}}},"responses":{"201":{"description":"Note created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create a note","tags":["Notes"]},"get":{"operationId":"getNotes","parameters":[{"name":"entityType","required":true,"in":"query","description":"Type of the entity to filter notes by","schema":{"example":"INVOICE","type":"string","enum":["CUSTOMER","SUPPLIER","EMPLOYEE","PRODUCT"]}},{"name":"entityId","required":true,"in":"query","description":"UUID of the entity to filter notes by","schema":{"example":"123e4567-e89b-12d3-a456-426614174000","type":"string"}}],"responses":{"200":{"description":"Notes retrieved successfully","content":{"application/json":{"schema":{"title":"NoteListResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"type":"array","items":{"$ref":"#/components/schemas/NoteDto"}}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get notes","tags":["Notes"]}},"/api/notes/{id}":{"patch":{"operationId":"updateNote","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNoteDto"}}}},"responses":{"201":{"description":"Note updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Update a note","tags":["Notes"]},"delete":{"operationId":"deleteNote","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"Note deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Delete a note","tags":["Notes"]}},"/api/storage/upload":{"post":{"operationId":"uploadFile","parameters":[],"responses":{"201":{"description":"File uploaded successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/FileResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Upload a file","tags":["File Access"]}},"/api/storage/{key}":{"get":{"operationId":"getFileByKey","parameters":[{"name":"key","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""},"401":{"description":"Unauthorized"},"403":{"description":"Requires Tenant Scope"}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Download/Stream a file","tags":["File Access"]},"delete":{"operationId":"deleteFileByKey","parameters":[{"name":"key","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"File deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":200},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Delete a file","tags":["File Access"]}},"/api/dashboard/health":{"get":{"operationId":"getDashboardHealth","parameters":[],"responses":{"200":{"description":"Dashboard health retrieved successfully","content":{"application/json":{"schema":{"title":"DashboardHealthResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/DashboardHealthDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get lightweight dashboard health snapshot (FAST)","tags":["Dashboard"]}},"/api/dashboard/stats":{"get":{"operationId":"getDashboardStats","parameters":[],"responses":{"200":{"description":"Dashboard statistics retrieved successfully","content":{"application/json":{"schema":{"title":"TenantDashboardStatsResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/TenantDashboardStatsDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get dashboard statistics","tags":["Dashboard"]}},"/api/dashboard/report":{"get":{"operationId":"getDashboardReport","parameters":[{"name":"beginDate","required":false,"in":"query","description":"Start date for filtering","schema":{"format":"date-time","example":"2024-01-01T00:00:00.000Z","type":"string"}},{"name":"endDate","required":false,"in":"query","description":"End date for filtering","schema":{"format":"date-time","example":"2024-12-31T23:59:59.999Z","type":"string"}}],"responses":{"200":{"description":"Dashboard report retrieved successfully","content":{"application/json":{"schema":{"title":"DashboardReportResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/DashboardReportDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get comprehensive dashboard report","tags":["Dashboard"]}},"/api/dashboard/stock":{"get":{"operationId":"getDashboardStock","parameters":[],"responses":{"200":{"description":"Dashboard stock retrieved successfully","content":{"application/json":{"schema":{"title":"DashboardStockResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/DashboardStockDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get dashboard stock balances (date independent)","tags":["Dashboard"]}},"/api/dashboard/flow":{"get":{"operationId":"getDashboardFlow","parameters":[{"name":"beginDate","required":false,"in":"query","description":"Start date for filtering","schema":{"format":"date-time","example":"2024-01-01T00:00:00.000Z","type":"string"}},{"name":"endDate","required":false,"in":"query","description":"End date for filtering","schema":{"format":"date-time","example":"2024-12-31T23:59:59.999Z","type":"string"}}],"responses":{"200":{"description":"Dashboard flow retrieved successfully","content":{"application/json":{"schema":{"title":"DashboardFlowResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/DashboardFlowDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get dashboard flow summary (date dependent)","tags":["Dashboard"]}},"/api/support-tickets":{"post":{"operationId":"createSupportTicket","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSupportTicketDto"}}}},"responses":{"201":{"description":"Support ticket created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create support ticket","tags":["Support Tickets"]},"get":{"operationId":"getSupportTickets","parameters":[{"name":"pageNumber","required":false,"in":"query","description":"Sayfa numarası","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"pageSize","required":false,"in":"query","description":"Sayfa başına gösterilecek kayıt sayısı","schema":{"minimum":1,"example":10,"type":"number"}},{"name":"status","required":false,"in":"query","schema":{"type":"string","enum":["OPEN","CLOSED","WAITING_FOR_CUSTOMER","WAITING_FOR_ADMIN"]}}],"responses":{"200":{"description":"Support tickets retrieved successfully","content":{"application/json":{"schema":{"title":"PaginatedSupportTicket","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SupportTicketDto"}},"pageNumber":{"type":"number","example":1,"minimum":1},"pageSize":{"type":"number","example":10,"minimum":1},"totalPages":{"type":"number","example":5,"minimum":0},"totalCount":{"type":"number","example":50,"minimum":0},"hasPreviousPage":{"type":"boolean","example":false},"hasNextPage":{"type":"boolean","example":true}},"required":["items","pageNumber","totalPages","totalCount","hasPreviousPage","hasNextPage"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get support tickets","tags":["Support Tickets"]}},"/api/support-tickets/{ticketId}":{"get":{"operationId":"getSupportTicketById","parameters":[{"name":"ticketId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Support ticket detail retrieved successfully","content":{"application/json":{"schema":{"title":"SupportTicketDetailResponse","type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"},"data":{"$ref":"#/components/schemas/SupportTicketDetailDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Get support ticket detail","tags":["Support Tickets"]}},"/api/support-tickets/{ticketId}/messages":{"post":{"operationId":"createSupportTicketMessage","parameters":[{"name":"ticketId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSupportTicketMessageDto"}}}},"responses":{"201":{"description":"Support ticket message created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":201},"data":{"$ref":"#/components/schemas/CommandResponseDto"}},"required":["statusCode","data"]}}}},"400":{"description":"Bad Request - Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Unauthorized - Invalid or missing authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Not Found - Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"bearer":[]},{"Bearer":[]}],"summary":"Create support ticket message","tags":["Support Tickets"]}},"/api/admin/partner-events/dlq/count":{"get":{"description":"Returns the RabbitMQ message count on `bihesap.partner-events.dlq`. Zero means healthy; nonzero means handler failures are accumulating and need operator attention.","operationId":"PartnerEventsAdmin_getDlqCount","parameters":[],"responses":{"200":{"description":""}},"summary":"Current message count on the partner-events DLQ","tags":["Admin · Partner Events"]}},"/api/admin/partner-events/dlq/replay-all":{"post":{"description":"Reads up to `limit` (default 100, max 1000) messages from the DLQ and republishes them onto the main exchange with their original routing key. Returns `{ replayed, remaining }`.","operationId":"PartnerEventsAdmin_replayAllDlq","parameters":[{"name":"limit","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"summary":"Drain the partner-events DLQ back to the main queue","tags":["Admin · Partner Events"]}},"/api/integrations/sources":{"get":{"operationId":"Integrations_listSources","parameters":[{"name":"pageNumber","required":true,"in":"query","schema":{"type":"string"}},{"name":"pageSize","required":true,"in":"query","schema":{"type":"string"}},{"name":"status","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"List integration sources for the current tenant","tags":["Integrations"]},"post":{"operationId":"Integrations_createSource","parameters":[],"responses":{"201":{"description":""}},"summary":"Create a new integration source for the current tenant","tags":["Integrations"]}},"/api/integrations/sources/{id}":{"get":{"operationId":"Integrations_getSource","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Fetch one integration source (scoped to the tenant)","tags":["Integrations"]}},"/api/integrations/sources/{id}/api-keys":{"post":{"description":"Returns the plaintext key exactly ONCE — biHesap-web must display it immediately and never request it again.","operationId":"Integrations_createApiKey","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"summary":"Mint a new API key for the source","tags":["Integrations"]}},"/api/integrations/sources/{id}/api-keys/{keyId}/revoke":{"post":{"operationId":"Integrations_revokeApiKey","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"keyId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"summary":"Revoke an existing API key","tags":["Integrations"]}},"/api/integrations/sources/{id}/product-maps":{"post":{"operationId":"Integrations_upsertProductMaps","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"summary":"Bulk upsert product mappings for the source","tags":["Integrations"]},"get":{"operationId":"Integrations_listProductMaps","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"List product mappings for the source","tags":["Integrations"]}},"/api/integrations/sources/{id}/product-maps/{externalProductCode}":{"delete":{"operationId":"Integrations_deleteProductMap","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"externalProductCode","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Delete a product mapping","tags":["Integrations"]}},"/api/admin/integrations/events":{"get":{"operationId":"IntegrationsAdmin_listEvents","parameters":[{"name":"tenantId","required":true,"in":"query","schema":{"type":"string"}},{"name":"status","required":true,"in":"query","schema":{"type":"string"}},{"name":"eventType","required":true,"in":"query","schema":{"type":"string"}},{"name":"pageNumber","required":true,"in":"query","schema":{"type":"string"}},{"name":"pageSize","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"List integration events (every inbound partner request, 90d retention)","tags":["Admin · Integrations"]}},"/api/admin/integrations/dead-letters":{"get":{"operationId":"IntegrationsAdmin_listDeadLetters","parameters":[{"name":"tenantId","required":true,"in":"query","schema":{"type":"string"}},{"name":"resolved","required":true,"in":"query","schema":{"type":"string"}},{"name":"pageNumber","required":true,"in":"query","schema":{"type":"string"}},{"name":"pageSize","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"List rejected ingest payloads waiting on operator action","tags":["Admin · Integrations"]}},"/api/admin/integrations/dead-letters/{id}/replay":{"post":{"operationId":"IntegrationsAdmin_replayDeadLetter","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"summary":"Replay a dead-lettered ingest payload (after the cause is fixed)","tags":["Admin · Integrations"]}},"/api/admin/integrations/outbox/stats":{"get":{"operationId":"IntegrationsAdmin_getOutboxStats","parameters":[],"responses":{"200":{"description":""}},"summary":"Outbox status counts (PENDING / SENT / FAILED / DEAD)","tags":["Admin · Integrations"]}},"/api/admin/integrations/outbox/{id}/replay":{"post":{"operationId":"IntegrationsAdmin_replayOutboxOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"summary":"Force one outbox row back to PENDING for redelivery","tags":["Admin · Integrations"]}},"/api/admin/integrations/outbox/replay-all-dead":{"post":{"operationId":"IntegrationsAdmin_replayAllDead","parameters":[],"responses":{"201":{"description":""}},"summary":"Reset every DEAD outbox row back to PENDING","tags":["Admin · Integrations"]}}},"info":{"title":"biHesap Backend API","description":"Bütünleşik şema: platform, sistem ve kiracı uçları. Üretimde paylaşım için tercih edilen ayrı şemalar: /api-json/platform ve /api-json/tenant.","version":"1.0.0","contact":{}},"tags":[],"servers":[{"url":"http://localhost:3000","description":"Development"}],"components":{"securitySchemes":{"Bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http","in":"header","name":"Authorization"}},"schemas":{"BasicHealthDto":{"type":"object","properties":{"status":{"type":"string","enum":["ok","error"]},"timestamp":{"type":"string"},"uptimeSeconds":{"type":"number"},"version":{"type":"string"},"environment":{"type":"string"}},"required":["status","timestamp","uptimeSeconds","version","environment"]},"LivenessDto":{"type":"object","properties":{"status":{"type":"string"},"timestamp":{"type":"string"},"uptimeSeconds":{"type":"number"}},"required":["status","timestamp","uptimeSeconds"]},"ReadinessCheckDto":{"type":"object","properties":{"database":{"type":"boolean"},"redis":{"type":"boolean"}},"required":["database","redis"]},"ReadinessDto":{"type":"object","properties":{"status":{"type":"string","enum":["ready","not-ready"]},"timestamp":{"type":"string"},"checks":{"$ref":"#/components/schemas/ReadinessCheckDto"}},"required":["status","timestamp","checks"]},"MemoryStatsDto":{"type":"object","properties":{"rssBytes":{"type":"number"},"heapUsedBytes":{"type":"number"},"heapTotalBytes":{"type":"number"},"externalBytes":{"type":"number"},"heapUsedPct":{"type":"number","description":"heapUsed / heapTotal"}},"required":["rssBytes","heapUsedBytes","heapTotalBytes","externalBytes","heapUsedPct"]},"CpuStatsDto":{"type":"object","properties":{"loadAverage1m":{"type":"number"},"loadAverage5m":{"type":"number"},"loadAverage15m":{"type":"number"},"cpuCount":{"type":"number"}},"required":["loadAverage1m","loadAverage5m","loadAverage15m","cpuCount"]},"DatabaseStatsDto":{"type":"object","properties":{"status":{"type":"string","enum":["up","down"]},"latencyMs":{"type":"number","nullable":true},"sizeBytes":{"type":"number","nullable":true},"activeConnections":{"type":"number","nullable":true},"maxConnections":{"type":"number","nullable":true},"tableCount":{"type":"number","nullable":true},"indexCount":{"type":"number","nullable":true},"version":{"type":"string","nullable":true}},"required":["status","latencyMs","sizeBytes","activeConnections","maxConnections","tableCount","indexCount","version"]},"RedisHealthStatsDto":{"type":"object","properties":{"status":{"type":"string","enum":["up","down"]},"latencyMs":{"type":"number","nullable":true}},"required":["status","latencyMs"]},"ErrorStatsDto":{"type":"object","properties":{"errorsLast1h":{"type":"number"},"errorsLast24h":{"type":"number"},"errorsLast7d":{"type":"number"}},"required":["errorsLast1h","errorsLast24h","errorsLast7d"]},"SystemHealthDto":{"type":"object","properties":{"status":{"type":"string","enum":["ok","degraded","error"]},"timestamp":{"type":"string"},"uptimeSeconds":{"type":"number"},"version":{"type":"string"},"environment":{"type":"string"},"memory":{"$ref":"#/components/schemas/MemoryStatsDto"},"cpu":{"$ref":"#/components/schemas/CpuStatsDto"},"database":{"$ref":"#/components/schemas/DatabaseStatsDto"},"redis":{"$ref":"#/components/schemas/RedisHealthStatsDto"},"errors":{"$ref":"#/components/schemas/ErrorStatsDto"}},"required":["status","timestamp","uptimeSeconds","version","environment","memory","cpu","database","redis","errors"]},"BaseResponseDto":{"type":"object","properties":{"statusCode":{"type":"number","example":200,"description":"HTTP status code"}},"required":["statusCode"]},"ErrorDetailDto":{"type":"object","properties":{"code":{"type":"string","example":"VALIDATION_FAILED","description":"Machine-readable error code for client-side handling"},"message":{"type":"string","example":"Validation failed for the provided input","description":"Human-readable error message"},"details":{"type":"object","example":null,"description":"Additional error details (validation errors, context, etc.)","nullable":true},"traceId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Unique trace ID for debugging and log correlation"}},"required":["code","message","traceId"]},"ErrorResponseDto":{"type":"object","properties":{"timestamp":{"type":"string","example":"2026-01-26T02:43:36.000Z","description":"ISO-8601 timestamp of when the error occurred"},"path":{"type":"string","example":"/api/invoices/123","description":"Request path that caused the error"},"statusCode":{"type":"number","example":400,"description":"HTTP status code"},"error":{"description":"Detailed error information","allOf":[{"$ref":"#/components/schemas/ErrorDetailDto"}]},"success":{"type":"boolean","example":false,"description":"Always false for error responses"}},"required":["timestamp","path","statusCode","error","success"]},"JobResponseDto":{"type":"object","properties":{"jobKey":{"type":"string","example":"cleanup-audit-logs"},"lastRunAt":{"format":"date-time","type":"string"},"lastStatus":{"type":"string","enum":["PENDING","RUNNING","PROGRESS","SUCCESS","FAILED"]},"totalRuns":{"type":"number"},"successCount":{"type":"number"},"failureCount":{"type":"number"},"description":{"type":"string","example":"Cleans up audit logs older than 90 days"},"lastAffectedRowCount":{"type":"number"},"lastDurationMs":{"type":"number","example":1500,"description":"Last execution duration in ms"},"lastTriggerSource":{"type":"string","enum":["CRON","SUPERADMIN","PLATFORM","SYSTEM"],"description":"Last trigger source"},"retentionDays":{"type":"number","example":90,"description":"Retention period in days"},"cronExpression":{"type":"string","example":"0 3 * * *","description":"CRON schedule expression"},"isDestructive":{"type":"boolean","example":false,"description":"Whether this is a destructive (purge) job"}},"required":["jobKey","description"]},"JobExecutionLogDto":{"type":"object","properties":{"id":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000"},"jobKey":{"type":"string","example":"cleanup-audit-logs"},"startedAt":{"format":"date-time","type":"string","example":"2025-12-21T03:00:00.000Z"},"finishedAt":{"format":"date-time","type":"string","example":"2025-12-21T03:00:15.000Z"},"status":{"type":"string","enum":["PENDING","RUNNING","PROGRESS","SUCCESS","FAILED"],"example":"SUCCESS"},"affectedRowCount":{"type":"number","example":42},"errorMessage":{"type":"string","example":"Connection timeout"},"triggeredBy":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000"},"durationMs":{"type":"number","example":1500,"description":"Execution duration in milliseconds"},"triggerSource":{"type":"string","enum":["CRON","SUPERADMIN","PLATFORM","SYSTEM"],"example":"CRON","description":"What triggered the job (CRON, SUPERADMIN, PLATFORM)"},"retentionDays":{"type":"number","example":90,"description":"Retention period in days (if applicable)"},"criteriaDescription":{"type":"string","example":"Deletes audit logs older than 90 days","description":"Human-readable criteria description"},"totalEstimatedRows":{"type":"number","example":1000,"description":"Total estimated rows for progress calculation"},"processedRows":{"type":"number","example":500,"description":"Currently processed rows"},"resultMeta":{"type":"object","description":"Job-specific result metadata (e.g. database backup storage path)","additionalProperties":true}},"required":["id","jobKey","startedAt","status"]},"TriggerJobDto":{"type":"object","properties":{"jobKey":{"type":"string","example":"cleanup-audit-logs","description":"Unique key of the platform job"}},"required":["jobKey"]},"JobTriggerResultDto":{"type":"object","properties":{"executionId":{"type":"string","description":"Execution log ID"},"message":{"type":"string","description":"İşlem sonuç mesajı"}},"required":["executionId","message"]},"CustomerDto":{"type":"object","properties":{"id":{"type":"string","example":"ckx8l2k1s0000abc123xyz456","description":"ID"},"createdAt":{"type":"string","example":"2024-01-01T12:00:00.000Z","description":"Oluşturulma tarihi","format":"date-time"},"updatedAt":{"type":"string","example":"2024-01-01T12:05:00.000Z","description":"Güncellenme tarihi","format":"date-time"},"tenantId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Tenant ID"},"branchId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Branch ID"},"accountId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Linked Financial Account ID"},"name":{"type":"string","example":"Acme Corp","description":"Customer name"},"phone":{"type":"string","example":"+905554443322","description":"Customer phone number"},"email":{"type":"string","example":"contact@acme.com","description":"Customer email address"},"address":{"type":"string","example":"123 Business St, Istanbul","description":"Customer physical address"},"status":{"type":"string","example":"ACTIVE","description":"Account status","enum":["ACTIVE","PASSIVE"]},"taxNumber":{"type":"string","description":"VKN veya TCKN"},"identityNumber":{"type":"string","description":"TCKN (bireysel müşteriler)"},"taxOffice":{"type":"string","description":"Vergi dairesi"},"city":{"type":"string","description":"Şehir"},"country":{"type":"string","description":"Ülke"},"postalCode":{"type":"string","description":"Posta kodu"},"district":{"type":"string","description":"İlçe"},"balance":{"type":"string","format":"decimal","example":"1234.5600","description":"Derived current balance (SUM IN - SUM OUT)"},"isSystemDefault":{"type":"boolean","description":"Sistem varsayılan müşterisi (perakende vb.); silinemez.","default":false}},"required":["id","createdAt","updatedAt","tenantId","branchId","accountId","name","status"]},"CreateCustomerDto":{"type":"object","properties":{"name":{"type":"string","example":"Acme Corp","description":"Customer name"},"phone":{"type":"string","example":"+905554443322","description":"Müşteri telefon numarası"},"email":{"type":"string","example":"contact@acme.com","description":"Müşteri e-posta adresi"},"address":{"type":"string","example":"123 Business St, Istanbul","description":"Müşteri adresi"},"taxNumber":{"type":"string","example":"1234567890","description":"VKN veya TCKN"},"identityNumber":{"type":"string","example":"12345678901","description":"TCKN (bireysel müşteriler)"},"taxOffice":{"type":"string","example":"Büyük Mükellefler","description":"Vergi dairesi"},"city":{"type":"string","example":"İstanbul","description":"Şehir"},"country":{"type":"string","example":"Türkiye","description":"Ülke"},"postalCode":{"type":"string","example":"34000","description":"Posta kodu"},"district":{"type":"string","example":"Kadıköy","description":"İlçe"},"status":{"type":"string","enum":["ACTIVE","PASSIVE"],"example":"ACTIVE","description":"Hesap durumu"},"openingBalance":{"type":"string","format":"decimal","example":"1000.0000","description":"Açılış bakiyesi"},"openingDate":{"type":"string","example":"2024-01-01T00:00:00.000Z","description":"Açılış tarihi","format":"date-time"},"openingBalanceType":{"type":"string","example":"CREDIT","description":"Bakiye yönü (CREDIT = Alacaklı, DEBIT = Borçlu)","enum":["DEBIT","CREDIT"]},"isOpeningBalance":{"type":"boolean","description":"Whether to add an opening balance","default":false},"balanceType":{"type":"string","description":"UI balance type","enum":["debt","credit"]},"isActive":{"type":"boolean","description":"Whether the account is active","default":true}},"required":["name"]},"UpdateCustomerDto":{"type":"object","properties":{"name":{"type":"string","example":"Acme Corp","description":"Customer name"},"phone":{"type":"string","example":"+905554443322","description":"Müşteri telefon numarası"},"email":{"type":"string","example":"contact@acme.com","description":"Müşteri e-posta adresi"},"address":{"type":"string","example":"123 Business St, Istanbul","description":"Müşteri adresi"},"taxNumber":{"type":"string","example":"1234567890","description":"VKN veya TCKN"},"identityNumber":{"type":"string","example":"12345678901","description":"TCKN (bireysel müşteriler)"},"taxOffice":{"type":"string","example":"Büyük Mükellefler","description":"Vergi dairesi"},"city":{"type":"string","example":"İstanbul","description":"Şehir"},"country":{"type":"string","example":"Türkiye","description":"Ülke"},"postalCode":{"type":"string","example":"34000","description":"Posta kodu"},"district":{"type":"string","example":"Kadıköy","description":"İlçe"},"status":{"type":"string","enum":["ACTIVE","PASSIVE"],"example":"ACTIVE","description":"Hesap durumu"},"openingBalance":{"type":"string","format":"decimal","example":"1000.0000","description":"Açılış bakiyesi"},"openingDate":{"type":"string","example":"2024-01-01T00:00:00.000Z","description":"Açılış tarihi","format":"date-time"},"openingBalanceType":{"type":"string","example":"CREDIT","description":"Bakiye yönü (CREDIT = Alacaklı, DEBIT = Borçlu)","enum":["DEBIT","CREDIT"]},"isOpeningBalance":{"type":"boolean","description":"Whether to add an opening balance","default":false},"balanceType":{"type":"string","description":"UI balance type","enum":["debt","credit"]},"isActive":{"type":"boolean","description":"Whether the account is active","default":true}}},"TransactionSearchDto":{"type":"object","properties":{"pageNumber":{"type":"number","description":"Sayfa numarası","example":1,"minimum":1},"pageSize":{"type":"number","description":"Sayfa başına gösterilecek kayıt sayısı","example":10,"minimum":1},"search":{"type":"string","description":"Arama metni","example":"john"},"accountId":{"type":"string","description":"Hesap ID'si ile filtrele"},"expenseItemId":{"type":"string","description":"Gider kalemi ID'si ile filtrele"},"beginDate":{"type":"string","description":"Başlangıç tarihi (ISO formatında)","example":"2024-01-01"},"endDate":{"type":"string","description":"Bitiş tarihi (ISO formatında)","example":"2024-12-31"},"type":{"type":"string","description":"İşlem tipi ile filtrele. INVOICE / RETURN / CANCELLATION belge etkisine göre filtreler (TransactionType dışı).","enum":["COLLECTION","PAYMENT","TRANSFER","ADJUSTMENT","OPENING_BALANCE","INVOICE","RETURN","CANCELLATION"]},"direction":{"type":"string","description":"İşlem yönü ile filtrele","enum":["IN","OUT"]},"showSystemGenerated":{"type":"boolean","description":"Sistem tarafından oluşturulan işlemleri göster (varsayılan: true)","default":true}},"required":["pageNumber","pageSize"]},"LookupDto":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"},"isDefault":{"type":"boolean"}},"required":["key","value"]},"CommandResponseDto":{"type":"object","properties":{"id":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"İşlem yapılan kaynağın ID bilgisi"},"success":{"type":"boolean","example":true,"description":"İşlem başarı durumu"}},"required":["id","success"]},"AccountSummaryDto":{"type":"object","properties":{"id":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Account ID"},"name":{"type":"string","example":"Merkez Kasa","description":"Account name"},"type":{"type":"string","example":"CASH","enum":["CUSTOMER","SUPPLIER","EMPLOYEE","CASH","BANK","OWNER","CREDIT_CARD","LOAN","EXPENSE"],"description":"Account type"}},"required":["id","name","type"]},"TransactionDto":{"type":"object","properties":{"id":{"type":"string","example":"ckx8l2k1s0000abc123xyz456","description":"ID"},"createdAt":{"type":"string","example":"2024-01-01T12:00:00.000Z","description":"Oluşturulma tarihi","format":"date-time"},"updatedAt":{"type":"string","example":"2024-01-01T12:05:00.000Z","description":"Güncellenme tarihi","format":"date-time"},"tenantId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Tenant ID"},"branchId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Branch ID"},"direction":{"type":"string","example":"OUT","enum":["IN","OUT"],"description":"Transaction direction from perspective account"},"accountId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Account ID"},"counterAccountId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Counter Account ID (optional)","nullable":true},"account":{"description":"Account details","allOf":[{"$ref":"#/components/schemas/AccountSummaryDto"}]},"counterAccount":{"description":"Counter account details","nullable":true,"allOf":[{"$ref":"#/components/schemas/AccountSummaryDto"}]},"amount":{"type":"string","format":"decimal","example":"1000.5000","description":"Absolute transaction amount"},"currency":{"type":"string","example":"TRY","description":"Currency code"},"type":{"type":"string","example":"COLLECTION","enum":["COLLECTION","PAYMENT","TRANSFER","ADJUSTMENT","OPENING_BALANCE","CREDIT_CARD_EXPENSE","CREDIT_CARD_REFUND"],"description":"Transaction type"},"description":{"type":"string","example":"Payment for service","description":"Transaction description","nullable":true},"sumDescription":{"type":"string","example":"Kasa → Ahmet Kılıç | Tahsilat","description":"Full transaction summary","nullable":true},"referenceNo":{"type":"string","example":"REF-123456","description":"Reference Number","nullable":true},"date":{"type":"string","example":"2023-10-27T10:00:00.000Z","description":"Transaction date","format":"date-time"},"source":{"type":"string","example":"MANUAL","enum":["MANUAL","INVOICE","SYSTEM"],"description":"Transaction source (how it was created)"},"sourceId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Optional Source ID (linked Document/Invoice ID)","nullable":true},"isSystemGenerated":{"type":"boolean","example":false,"description":"Indicates if this transaction was automatically generated by the system"},"displayType":{"type":"string","example":"COLLECTION","description":"Simplified display type for UI categorization"},"displayLabel":{"type":"string","example":"Tahsilat","description":"Turkish label for the transaction type"},"displayDescription":{"type":"string","example":"Satış faturasından doğan borç girişi","description":"Generated human-readable description for timeline"},"badgeLabel":{"type":"string","example":"Kapatıldı","description":"Badge text for transaction status","nullable":true}},"required":["id","createdAt","updatedAt","tenantId","branchId","direction","accountId","counterAccountId","account","counterAccount","amount","currency","type","description","sumDescription","referenceNo","date","source","sourceId","isSystemGenerated","displayType","displayLabel","displayDescription","badgeLabel"]},"AccountDto":{"type":"object","properties":{"id":{"type":"string","example":"ckx8l2k1s0000abc123xyz456","description":"ID"},"createdAt":{"type":"string","example":"2024-01-01T12:00:00.000Z","description":"Oluşturulma tarihi","format":"date-time"},"updatedAt":{"type":"string","example":"2024-01-01T12:05:00.000Z","description":"Güncellenme tarihi","format":"date-time"},"tenantId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Tenant ID"},"branchId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Branch ID"},"type":{"type":"string","example":"CUSTOMER","enum":["CUSTOMER","SUPPLIER","EMPLOYEE","CASH","BANK","OWNER","CREDIT_CARD","LOAN","EXPENSE"],"description":"Account type"},"name":{"type":"string","example":"John Doe","description":"Account name"},"isActive":{"type":"boolean","example":true,"description":"Active status"},"isDefault":{"type":"boolean","example":false,"description":"Is default account"}},"required":["id","createdAt","updatedAt","tenantId","branchId","type","name","isActive","isDefault"]},"CreateAccountDto":{"type":"object","properties":{"type":{"type":"string","example":"CUSTOMER","enum":["CUSTOMER","SUPPLIER","EMPLOYEE","CASH","BANK","OWNER","CREDIT_CARD","LOAN","EXPENSE"],"description":"Account type (CUSTOMER, SUPPLIER, EMPLOYEE, CASH)"},"name":{"type":"string","example":"John Doe","description":"Account name"},"isActive":{"type":"boolean","example":true,"description":"Active status","default":true},"isDefault":{"type":"boolean","example":false,"description":"Is default account","default":false}},"required":["type","name"]},"UpdateAccountDto":{"type":"object","properties":{"type":{"type":"string","example":"CUSTOMER","enum":["CUSTOMER","SUPPLIER","EMPLOYEE","CASH","BANK","OWNER","CREDIT_CARD","LOAN","EXPENSE"],"description":"Account type (CUSTOMER, SUPPLIER, EMPLOYEE, CASH)"},"name":{"type":"string","example":"John Doe","description":"Account name"},"isActive":{"type":"boolean","example":true,"description":"Active status","default":true},"isDefault":{"type":"boolean","example":false,"description":"Is default account","default":false}}},"NotificationDto":{"type":"object","properties":{"id":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000"},"title":{"type":"string","example":"Ödeme planı yaklaşıyor"},"message":{"type":"string","example":"Yarın vadesi gelen ödeme planı kaleminiz var."},"sourceType":{"type":"string","enum":["PAYMENT_PLAN","CREDIT_CARD","TASK","RECEIVABLE","PAYABLE","ADMIN"],"example":"PAYMENT_PLAN"},"notifyType":{"type":"string","enum":["T_MINUS_1","TODAY","OVERDUE","DUE_MINUS_2","DUE_TODAY","STATEMENT_DAY","TASK_START","TASK_DEADLINE_MINUS_1","TASK_DEADLINE_TODAY","ADMIN_MESSAGE"],"example":"T_MINUS_1"},"isRead":{"type":"boolean","example":false},"createdAt":{"type":"string","example":"2026-04-13T09:00:00.000Z","format":"date-time"}},"required":["id","title","message","sourceType","notifyType","isRead","createdAt"]},"NotificationQueryDto":{"type":"object","properties":{"pageNumber":{"type":"number","description":"Sayfa numarası","example":1,"minimum":1},"pageSize":{"type":"number","description":"Sayfa başına gösterilecek kayıt sayısı","example":20,"minimum":1},"isRead":{"type":"boolean","description":"Yalnızca okunmuş / okunmamış bildirimleri filtrele","example":false}}},"UnreadCountDto":{"type":"object","properties":{"count":{"type":"number","example":5,"description":"Okunmamış bildirim sayısı"}},"required":["count"]},"SendAdminNotificationDto":{"type":"object","properties":{"userId":{"type":"string","description":"Hedef kullanıcı kimliği. broadcast=true ise gönderilmemelidir.","example":"550e8400-e29b-41d4-a716-446655440000"},"broadcast":{"type":"boolean","description":"true gönderilirse bildirim firmanın tüm aktif kullanıcılarına iletilir.","example":false,"default":false},"title":{"type":"string","description":"Bildirim başlığı","example":"Sistem Bakımı","maxLength":150},"message":{"type":"string","description":"Bildirim içeriği","example":"Yarın 02:00–04:00 arası planlı bakım çalışması yapılacaktır.","maxLength":1000},"url":{"type":"string","description":"Bildirime tıklandığında yönlendirilecek relative URL","example":"/notifications","maxLength":500}},"required":["title","message"]},"SendAdminNotificationResultDto":{"type":"object","properties":{"success":{"type":"boolean","example":true},"recipients":{"type":"number","description":"Oluşturulan bildirim sayısı","example":42}},"required":["success","recipients"]},"MarkAllReadResultDto":{"type":"object","properties":{"count":{"type":"number","example":12,"description":"Okundu olarak işaretlenen bildirim sayısı"}},"required":["count"]},"WebPushSubscriptionKeysDto":{"type":"object","properties":{"p256dh":{"type":"string","description":"ECDH public key (p256dh) from PushSubscription.toJSON().keys"},"auth":{"type":"string","description":"Authentication secret from PushSubscription.toJSON().keys"}},"required":["p256dh","auth"]},"CreateWebPushSubscriptionDto":{"type":"object","properties":{"endpoint":{"type":"string","description":"Push service endpoint URL returned by PushSubscription"},"keys":{"description":"Encryption keys from PushSubscription.toJSON().keys","allOf":[{"$ref":"#/components/schemas/WebPushSubscriptionKeysDto"}]},"userAgent":{"type":"string","description":"navigator.userAgent, for device display"},"deviceName":{"type":"string","description":"Optional human-readable device label"}},"required":["endpoint","keys"]},"DeleteWebPushSubscriptionDto":{"type":"object","properties":{"endpoint":{"type":"string","description":"Push service endpoint URL to unsubscribe"}},"required":["endpoint"]},"WebPushSubscriptionDto":{"type":"object","properties":{"id":{"type":"string"},"endpoint":{"type":"string"},"userAgent":{"type":"object","nullable":true},"deviceName":{"type":"object","nullable":true},"isActive":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","endpoint","isActive","createdAt"]},"WebPushPublicKeyDto":{"type":"object","properties":{"publicKey":{"type":"string","description":"VAPID public key, base64url. Empty when push is not configured on this server."}},"required":["publicKey"]},"CreateTransactionCategoryDto":{"type":"object","properties":{"name":{"type":"string","description":"Kategori adı"},"color":{"type":"string","description":"Renk kodu (hex, örn: #FF5733)"},"isArchived":{"type":"boolean","description":"Arşivlenmiş mi?","default":false}},"required":["name"]},"TransactionCategoryDto":{"type":"object","properties":{"id":{"type":"string","example":"ckx8l2k1s0000abc123xyz456","description":"ID"},"createdAt":{"type":"string","example":"2024-01-01T12:00:00.000Z","description":"Oluşturulma tarihi","format":"date-time"},"updatedAt":{"type":"string","example":"2024-01-01T12:05:00.000Z","description":"Güncellenme tarihi","format":"date-time"},"name":{"type":"string"},"color":{"type":"string","nullable":true},"ruleCount":{"type":"number"},"isArchived":{"type":"boolean"}},"required":["id","createdAt","updatedAt","name","ruleCount","isArchived"]},"CategoryRuleDto":{"type":"object","properties":{"id":{"type":"string","example":"ckx8l2k1s0000abc123xyz456","description":"ID"},"createdAt":{"type":"string","example":"2024-01-01T12:00:00.000Z","description":"Oluşturulma tarihi","format":"date-time"},"updatedAt":{"type":"string","example":"2024-01-01T12:05:00.000Z","description":"Güncellenme tarihi","format":"date-time"},"merchant":{"type":"string","nullable":true},"keyword":{"type":"string","nullable":true},"minAmount":{"type":"string","nullable":true},"maxAmount":{"type":"string","nullable":true},"direction":{"type":"string","enum":["IN","OUT"],"nullable":true},"confidence":{"type":"number"},"priority":{"type":"number"},"hitCount":{"type":"number"},"source":{"type":"string","enum":["SEED","LEARNED","MANUAL"]},"isEnabled":{"type":"boolean"},"isLocked":{"type":"boolean"},"notes":{"type":"string","nullable":true},"lastHitAt":{"type":"string","format":"date-time","nullable":true},"categoryId":{"type":"string"},"categoryName":{"type":"string","nullable":true}},"required":["id","createdAt","updatedAt","confidence","priority","hitCount","source","isEnabled","isLocked","categoryId"]},"CategoryRuleListResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CategoryRuleDto"}},"total":{"type":"number"},"page":{"type":"number"},"limit":{"type":"number"}},"required":["items","total","page","limit"]},"CategoryRuleTestBreakdownDto":{"type":"object","properties":{"merchant":{"type":"number"},"keyword":{"type":"number"},"amount":{"type":"number"},"direction":{"type":"number"},"confidence":{"type":"number"},"priority":{"type":"number"}}},"CategoryRuleTestResultDto":{"type":"object","properties":{"ruleId":{"type":"string","nullable":true},"categoryId":{"type":"string","nullable":true},"categoryName":{"type":"string","nullable":true},"score":{"type":"number"},"tier":{"type":"string","enum":["HIGH","MEDIUM","LOW"]},"breakdown":{"$ref":"#/components/schemas/CategoryRuleTestBreakdownDto"},"extractedMerchant":{"type":"string"},"canonical":{"type":"string"}},"required":["score","tier","breakdown","extractedMerchant","canonical"]},"UpdateTransactionCategoryDto":{"type":"object","properties":{"name":{"type":"string","description":"Kategori adı"},"color":{"type":"string","description":"Renk kodu (hex)"},"isArchived":{"type":"boolean","description":"Arşivlenmiş mi?"}}},"CreateCategoryRuleDto":{"type":"object","properties":{"categoryId":{"type":"string","description":"Hedef kategori ID"},"merchant":{"type":"string","description":"Satıcı (merchant) eşleşmesi."},"keyword":{"type":"string","description":"Eşleşme anahtar kelimesi"},"minAmount":{"type":"string","description":"Minimum tutar (Decimal string)"},"maxAmount":{"type":"string","description":"Maksimum tutar (Decimal string)"},"direction":{"type":"string","enum":["IN","OUT"]},"priority":{"type":"number","description":"Öncelik (0-100)","default":0},"confidence":{"type":"number","description":"Güven skoru (0-100)","default":60},"notes":{"type":"string","description":"Not (max 500)"},"isEnabled":{"type":"boolean","description":"Aktif mi?","default":true},"isLocked":{"type":"boolean","description":"Kilitli mi?","default":false}},"required":["categoryId"]},"UpdateCategoryRuleDto":{"type":"object","properties":{"categoryId":{"type":"string"},"merchant":{"type":"string"},"keyword":{"type":"string"},"minAmount":{"type":"string"},"maxAmount":{"type":"string"},"direction":{"type":"string","enum":["IN","OUT"]},"priority":{"type":"number"},"confidence":{"type":"number"},"isEnabled":{"type":"boolean"},"isLocked":{"type":"boolean"},"notes":{"type":"string"}}},"ToggleRuleEnabledDto":{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Aktif mi?"}},"required":["isEnabled"]},"UpdateRulePriorityDto":{"type":"object","properties":{"priority":{"type":"number","description":"Yeni öncelik (0-100)"}},"required":["priority"]},"TestCategoryRuleDto":{"type":"object","properties":{"description":{"type":"string","description":"Test edilecek açıklama"},"amount":{"type":"string","description":"Tutar (Decimal string)"},"direction":{"type":"string","enum":["IN","OUT"]}},"required":["description"]},"AuditLogDto":{"type":"object","properties":{"id":{"type":"string","example":"ckx8l2k1s0000abc123xyz456","description":"ID"},"createdAt":{"type":"string","example":"2024-01-01T12:00:00.000Z","description":"Oluşturulma tarihi","format":"date-time"},"updatedAt":{"type":"string","example":"2024-01-01T12:05:00.000Z","description":"Güncellenme tarihi","format":"date-time"},"tenantId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Tenant ID (NULL for platform-level actions)","nullable":true},"branchId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Branch ID","nullable":true},"userId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Tenant User ID","nullable":true},"platformUserId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Platform User ID (for platform-level actions)","nullable":true},"action":{"type":"string","enum":["CREATE","UPDATE","DELETE","LOGIN","LOGOUT","OTHER"],"example":"CREATE","description":"Action performed"},"entity":{"type":"string","example":"TASK","description":"Entity affected"},"entityId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"ID of the affected entity","nullable":true},"ip":{"type":"string","example":"192.168.1.1","description":"Client IP","nullable":true},"userAgent":{"type":"string","example":"Mozilla/5.0...","description":"User agent","nullable":true},"path":{"type":"string","example":"/api/v1/auth/login","description":"Request path","nullable":true},"method":{"type":"string","example":"POST","description":"HTTP method","nullable":true},"statusCode":{"type":"number","example":200,"description":"HTTP status code","nullable":true},"latencyMs":{"type":"number","example":120,"description":"Latency in ms","nullable":true},"meta":{"type":"object","example":{"changedFields":["name","status"]},"description":"Small metadata (diffs summary or identifiers)","nullable":true},"tenantName":{"type":"string","example":"My Tenant","description":"Tenant name snapshot","nullable":true},"userName":{"type":"string","example":"John Doe","description":"User name snapshot (API list/detail always includes a resolved display value)","nullable":true},"actorLabel":{"type":"string","example":"User","description":"Actor class: User | Platform | System","nullable":true},"entityLabel":{"type":"string","example":"FTR-2024-0001","description":"Human-readable entity label when available (e.g. invoice number)","nullable":true}},"required":["id","createdAt","updatedAt","action","entity"]},"ErrorLogDto":{"type":"object","properties":{"id":{"type":"string","example":"ckx8l2k1s0000abc123xyz456","description":"ID"},"createdAt":{"type":"string","example":"2024-01-01T12:00:00.000Z","description":"Oluşturulma tarihi","format":"date-time"},"updatedAt":{"type":"string","example":"2024-01-01T12:05:00.000Z","description":"Güncellenme tarihi","format":"date-time"},"tenantId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Tenant ID (NULL for platform-level logs)","nullable":true},"branchId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Branch ID","nullable":true},"userId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"User ID","nullable":true},"platformUserId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Platform User ID","nullable":true},"level":{"type":"string","enum":["ERROR","WARN","INFO"],"example":"ERROR","description":"Error log level"},"message":{"type":"string","example":"Internal server error occurred","description":"Error message (lean)"},"errorCode":{"type":"string","example":"INTERNAL_SERVER_ERROR","description":"Error code","nullable":true},"context":{"type":"object","description":"Structured context (path, method, statusCode, traceId, jobKey)","nullable":true},"resolved":{"type":"boolean","example":false,"description":"Whether the error has been resolved"},"resolvedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z","description":"When the error was resolved","format":"date-time","nullable":true},"resolvedBy":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"User ID (Platform or Tenant) who resolved the error","nullable":true},"tenantName":{"type":"string","example":"My Tenant","description":"Tenant name snapshot","nullable":true},"userName":{"type":"string","example":"John Doe","description":"User name snapshot","nullable":true},"stack":{"type":"string","description":"Error stack trace","nullable":true}},"required":["id","createdAt","updatedAt","level","message","resolved"]},"ErrorLogQueryDto":{"type":"object","properties":{"pageNumber":{"type":"number","description":"Sayfa numarası","example":1,"minimum":1},"pageSize":{"type":"number","description":"Sayfa başına gösterilecek kayıt sayısı","example":10,"minimum":1},"search":{"type":"string","description":"Arama metni","example":"john"},"dateFrom":{"type":"string","example":"2024-01-01","description":"Başlangıç tarihi (ISO 8601 formatında)","format":"date"},"dateTo":{"type":"string","example":"2024-12-31","description":"Bitiş tarihi (ISO 8601 formatında)","format":"date"},"level":{"type":"string","enum":["ERROR","WARN","INFO"],"example":"ERROR","description":"Filter by error level"},"branchId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Filter by branch ID"},"userId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Filter by user ID"},"tenantId":{"type":"string","description":"Tenant ID (for super-admin tenant-scoped requests)","example":"550e8400-e29b-41d4-a716-446655440000"},"resolved":{"type":"boolean","description":"Filter by resolution status","example":false},"statusCode":{"type":"number","description":"Filter by HTTP status code","example":500}}},"RedisStatsDto":{"type":"object","properties":{"version":{"type":"string","example":"7.2.4"},"mode":{"type":"string","example":"standalone"},"os":{"type":"string","example":"Linux 5.15.0-101-generic x86_64"},"uptime_in_days":{"type":"number","example":5},"connected_clients":{"type":"number","example":10},"blocked_clients":{"type":"number","example":0},"used_memory_human":{"type":"string","example":"1.5MB"},"maxmemory_human":{"type":"string","example":"0B"},"maxmemory_policy":{"type":"string","example":"noeviction"},"mem_fragmentation_ratio":{"type":"number","example":1.1},"total_connections_received":{"type":"number","example":1000},"total_commands_processed":{"type":"number","example":50000},"instantaneous_ops_per_sec":{"type":"number","example":15}},"required":["version","mode","os","uptime_in_days","connected_clients","blocked_clients","used_memory_human","maxmemory_human","maxmemory_policy","mem_fragmentation_ratio","total_connections_received","total_commands_processed","instantaneous_ops_per_sec"]},"QueueCountsDto":{"type":"object","properties":{"waiting":{"type":"number","example":0},"active":{"type":"number","example":0},"completed":{"type":"number","example":100},"failed":{"type":"number","example":2},"delayed":{"type":"number","example":0},"paused":{"type":"number","example":0}},"required":["waiting","active","completed","failed","delayed","paused"]},"RedisQueueStatsDto":{"type":"object","properties":{"queueName":{"type":"string","example":"platform-jobs"},"counts":{"$ref":"#/components/schemas/QueueCountsDto"},"activeWorkers":{"type":"number","example":1},"isPaused":{"type":"boolean","example":false}},"required":["queueName","counts","activeWorkers","isPaused"]},"RedisHealthDto":{"type":"object","properties":{"status":{"type":"string","example":"up","enum":["up","down"]},"latency":{"type":"number","example":5,"description":"Latency in milliseconds"},"timestamp":{"type":"string","example":"2024-03-20T10:00:00.000Z"}},"required":["status","latency","timestamp"]},"UserDto":{"type":"object","properties":{"id":{"type":"string","example":"ckx8l2k1s0000abc123xyz456","description":"ID"},"createdAt":{"type":"string","example":"2024-01-01T12:00:00.000Z","description":"Oluşturulma tarihi","format":"date-time"},"updatedAt":{"type":"string","example":"2024-01-01T12:05:00.000Z","description":"Güncellenme tarihi","format":"date-time"},"fullName":{"type":"string","example":"John Doe","description":"Full name"},"email":{"type":"string","example":"user@example.com","description":"User email address"},"role":{"type":"string","example":"USER","description":"User role","enum":["OWNER","ADMIN","USER"]},"tenantId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Tenant ID"},"branchId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Primary/Active Branch ID"},"accessibleBranchIds":{"example":["550e8400-e29b-41d4-a716-446655440000","550e8400-e29b-41d4-a716-446655440001"],"description":"List of all branch IDs this user can access","type":"array","items":{"type":"string"}},"isActive":{"type":"boolean","example":true,"description":"User is active"},"emailVerified":{"type":"boolean","example":false,"description":"Email is verified"},"phone":{"type":"string","example":"+90534567890","description":"Phone number","nullable":true},"passwordChangedAt":{"type":"string","example":"2025-01-09T13:24:16.788Z","description":"Password last changed at","nullable":true,"format":"date-time"}},"required":["id","createdAt","updatedAt","fullName","email","role","tenantId","branchId","isActive","emailVerified"]},"CreateUserDto":{"type":"object","properties":{"fullName":{"type":"string","example":"John Doe","description":"Full name"},"email":{"type":"string","example":"user@example.com","description":"User email address"},"username":{"type":"string","example":"john.doe","description":"Benzersiz kullanıcı adı (4-20 karakter, alfanumerik, nokta ve alt çizgi)"},"password":{"type":"string","example":"SecurePass123!","description":"User password"},"role":{"type":"string","example":"USER","enum":["OWNER","ADMIN","USER"],"description":"User role"},"isActive":{"type":"boolean","example":true,"description":"User is active","default":true},"phone":{"type":"string","example":"+90534567890","description":"Phone number","nullable":true},"branchId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Primary/default branch ID for the user (used as active branch after login)"},"branchIds":{"example":["550e8400-e29b-41d4-a716-446655440000","550e8400-e29b-41d4-a716-446655440001"],"description":"Additional branch IDs the user can access (creates UserBranch relations)","type":"array","items":{"type":"string"}},"roleId":{"type":"string","description":"RBAC: assigned Role UUID. If omitted, the SYSTEM role matching `role` (enum) is used as fallback.","example":"550e8400-e29b-41d4-a716-446655440099"}},"required":["fullName","email","username","password","role","branchId"]},"UpdateUserDto":{"type":"object","properties":{"fullName":{"type":"string","example":"John Doe","description":"Full name"},"email":{"type":"string","example":"user@example.com","description":"User email address"},"username":{"type":"string","example":"john.doe","description":"Benzersiz kullanıcı adı (4-20 karakter, alfanumerik, nokta ve alt çizgi)"},"password":{"type":"string","example":"SecurePass123!","description":"User password"},"role":{"type":"string","example":"USER","enum":["OWNER","ADMIN","USER"],"description":"User role"},"isActive":{"type":"boolean","example":true,"description":"User is active","default":true},"phone":{"type":"string","example":"+90534567890","description":"Phone number","nullable":true},"branchId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Primary/default branch ID for the user (used as active branch after login)"},"branchIds":{"example":["550e8400-e29b-41d4-a716-446655440000","550e8400-e29b-41d4-a716-446655440001"],"description":"Additional branch IDs the user can access (creates UserBranch relations)","type":"array","items":{"type":"string"}},"roleId":{"type":"string","description":"RBAC: assigned Role UUID. If omitted, the SYSTEM role matching `role` (enum) is used as fallback.","example":"550e8400-e29b-41d4-a716-446655440099"}}},"UpdateProfileDto":{"type":"object","properties":{"fullName":{"type":"string","example":"John Doe","description":"Full name","minLength":2,"maxLength":255},"phone":{"type":"string","example":"+905345678901","description":"Phone number","nullable":true}}},"GetUsersQueryDto":{"type":"object","properties":{"pageNumber":{"type":"number","description":"Sayfa numarası","example":1,"minimum":1},"pageSize":{"type":"number","description":"Sayfa başına gösterilecek kayıt sayısı","example":10,"minimum":1},"search":{"type":"string","description":"Arama metni","example":"john"},"role":{"type":"string","enum":["OWNER","ADMIN","USER"],"description":"Filter by user role"}},"required":["pageNumber","pageSize"]},"RoleDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"object","nullable":true},"isSystem":{"type":"boolean"},"systemKey":{"type":"string","enum":["OWNER","ADMIN","USER"],"nullable":true},"userCount":{"type":"number","description":"Kullanıcı sayısı"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","name","isSystem","userCount","createdAt","updatedAt"]},"RoleDetailDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"object","nullable":true},"isSystem":{"type":"boolean"},"systemKey":{"type":"string","enum":["OWNER","ADMIN","USER"],"nullable":true},"userCount":{"type":"number","description":"Kullanıcı sayısı"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"permissions":{"description":"Atanmış permission kodları","type":"array","items":{"type":"string"}}},"required":["id","name","isSystem","userCount","createdAt","updatedAt","permissions"]},"CreateRoleDto":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":100},"description":{"type":"string","nullable":true},"permissions":{"description":"Permission kodları","type":"array","items":{"type":"string"}}},"required":["name","permissions"]},"UpdateRoleDto":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":100},"description":{"type":"string","nullable":true}}},"UpdateRolePermissionsDto":{"type":"object","properties":{"permissions":{"description":"Permission kodları (tam liste)","type":"array","items":{"type":"string"}}},"required":["permissions"]},"PermissionDto":{"type":"object","properties":{"code":{"type":"string","example":"invoice:create"},"subject":{"type":"string","example":"invoice"},"action":{"type":"string","example":"create"},"label":{"type":"string","example":"Fatura oluşturma"},"description":{"type":"object","nullable":true}},"required":["code","subject","action","label"]},"BranchDto":{"type":"object","properties":{"id":{"type":"string","example":"ckx8l2k1s0000abc123xyz456","description":"ID"},"createdAt":{"type":"string","example":"2024-01-01T12:00:00.000Z","description":"Oluşturulma tarihi","format":"date-time"},"updatedAt":{"type":"string","example":"2024-01-01T12:05:00.000Z","description":"Güncellenme tarihi","format":"date-time"},"tenantId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Tenant ID"},"code":{"type":"string","example":"BR001","description":"Branch code"},"name":{"type":"string","example":"Istanbul Branch","description":"Branch name"},"description":{"type":"string","example":"Main branch in Istanbul city center","description":"Branch description","nullable":true},"phone":{"type":"string","example":"+905551234567","description":"Branch phone number","nullable":true},"isActive":{"type":"boolean","example":true,"description":"Active status"},"isDeleted":{"type":"boolean","example":false,"description":"Is deleted (soft delete)"},"deletedAt":{"type":"string","example":"2025-01-09T13:24:16.788Z","description":"Deleted at timestamp","nullable":true,"format":"date-time"}},"required":["id","createdAt","updatedAt","tenantId","code","name","isActive","isDeleted"]},"CreateBranchDto":{"type":"object","properties":{"code":{"type":"string","example":"BR001","description":"Branch code (unique per tenant)"},"name":{"type":"string","example":"Istanbul Branch","description":"Branch name"},"description":{"type":"string","example":"Main branch in Istanbul city center","description":"Branch description"},"phone":{"type":"string","example":"+905551234567","description":"Branch phone number"},"isActive":{"type":"boolean","example":true,"description":"Active status","default":true}},"required":["code","name"]},"UpdateBranchDto":{"type":"object","properties":{"code":{"type":"string","example":"BR001","description":"Branch code (unique per tenant)"},"name":{"type":"string","example":"Istanbul Branch","description":"Branch name"},"description":{"type":"string","example":"Main branch in Istanbul city center","description":"Branch description"},"phone":{"type":"string","example":"+905551234567","description":"Branch phone number"},"isActive":{"type":"boolean","example":true,"description":"Active status","default":true}}},"CalendarEventDto":{"type":"object","properties":{"id":{"type":"string","example":"ckx8l2k1s0000abc123xyz456","description":"ID"},"createdAt":{"type":"string","example":"2024-01-01T12:00:00.000Z","description":"Oluşturulma tarihi","format":"date-time"},"updatedAt":{"type":"string","example":"2024-01-01T12:05:00.000Z","description":"Güncellenme tarihi","format":"date-time"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"startAt":{"type":"string","format":"date-time"},"endAt":{"type":"string","format":"date-time"},"allDay":{"type":"boolean"},"type":{"type":"string","enum":["MANUAL_NOTE","PAYMENT_DUE"]},"createdBy":{"type":"string","nullable":true}},"required":["id","createdAt","updatedAt","title","startAt","endAt","allDay","type"]},"CreateCalendarEventDto":{"type":"object","properties":{"title":{"type":"string","example":"Meeting with client"},"description":{"type":"string","example":"Discuss the new project"},"startAt":{"type":"string","format":"date-time","example":"2024-01-26T10:00:00Z"},"endAt":{"type":"string","format":"date-time","example":"2024-01-26T11:00:00Z"},"allDay":{"type":"boolean","default":false}},"required":["title","startAt","endAt"]},"UpdateCalendarEventDto":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"startAt":{"type":"string","format":"date-time"},"endAt":{"type":"string","format":"date-time"},"allDay":{"type":"boolean"}}},"TaskDto":{"type":"object","properties":{"id":{"type":"string","example":"ckx8l2k1s0000abc123xyz456","description":"ID"},"createdAt":{"type":"string","example":"2024-01-01T12:00:00.000Z","description":"Oluşturulma tarihi","format":"date-time"},"updatedAt":{"type":"string","example":"2024-01-01T12:05:00.000Z","description":"Güncellenme tarihi","format":"date-time"},"tenantId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Tenant ID"},"branchId":{"type":"object","example":"550e8400-e29b-41d4-a716-446655440000","description":"Branch ID","nullable":true},"title":{"type":"string","example":"Yeni ürün sayfası taslağı","description":"Task title"},"description":{"type":"object","example":"DS kartları ile UX prototipi oluştur.","description":"Task description","nullable":true},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH"],"example":"HIGH","description":"Task priority"},"status":{"type":"string","enum":["TODO","IN_PROGRESS","DONE"],"example":"TODO","description":"Task status"},"tags":{"example":["frontend","design"],"description":"Task tags","type":"array","items":{"type":"string"}},"deadline":{"type":"string","example":"2025-02-05T10:00:00.000Z","description":"Task deadline","nullable":true,"format":"date-time"},"position":{"type":"number","example":0,"description":"Task position within status column"},"version":{"type":"number","example":1,"description":"Task version for concurrency check"},"assignedTo":{"type":"object","example":"550e8400-e29b-41d4-a716-446655440000","description":"Assigned user ID","nullable":true},"createdBy":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Created by user ID"}},"required":["id","createdAt","updatedAt","tenantId","title","priority","status","tags","position","version","createdBy"]},"CreateTaskDto":{"type":"object","properties":{"branchId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Branch ID"},"title":{"type":"string","example":"Yeni ürün sayfası taslağı","description":"Task title"},"description":{"type":"string","example":"DS kartları ile UX prototipi oluştur.","description":"Task description"},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH"],"example":"MEDIUM","description":"Task priority","default":"MEDIUM"},"status":{"type":"string","enum":["TODO","IN_PROGRESS","DONE"],"example":"TODO","description":"Task status","default":"TODO"},"tags":{"example":["frontend","design"],"description":"Task tags","type":"array","items":{"type":"string"}},"deadline":{"type":"string","example":"2025-02-05T10:00:00.000Z","description":"Task deadline"},"position":{"type":"number","example":0,"description":"Task position within status column","default":0},"assignedTo":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Assigned user ID"}},"required":["title"]},"UpdateTaskDto":{"type":"object","properties":{"branchId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Branch ID"},"title":{"type":"string","example":"Yeni ürün sayfası taslağı","description":"Task title"},"description":{"type":"string","example":"DS kartları ile UX prototipi oluştur.","description":"Task description"},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH"],"example":"MEDIUM","description":"Task priority"},"status":{"type":"string","enum":["TODO","IN_PROGRESS","DONE"],"example":"TODO","description":"Task status"},"tags":{"example":["frontend","design"],"description":"Task tags","type":"array","items":{"type":"string"}},"deadline":{"type":"string","example":"2025-02-05T10:00:00.000Z","description":"Task deadline"},"position":{"type":"number","example":0,"description":"Task position within status column"},"version":{"type":"number","example":1,"description":"Task version for concurrency check"},"assignedTo":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Assigned user ID"}}},"ReorderTaskItemDto":{"type":"object","properties":{"id":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Task ID"},"position":{"type":"number","example":10,"description":"New position"}},"required":["id","position"]},"ReorderTasksDto":{"type":"object","properties":{"status":{"type":"string","enum":["TODO","IN_PROGRESS","DONE"],"description":"Target status"},"moves":{"description":"Array of tasks with their new positions","type":"array","items":{"$ref":"#/components/schemas/ReorderTaskItemDto"}},"clientMutationId":{"type":"string","example":"uuid","description":"Client mutation ID"},"baseVersion":{"type":"number","example":1,"description":"Base version of the list"}},"required":["status","moves","baseVersion"]},"GetTasksFilterDto":{"type":"object","properties":{"pageNumber":{"type":"number","example":1,"description":"Page number","default":1},"pageSize":{"type":"number","example":50,"description":"Page size","default":50},"search":{"type":"string","example":"dashboard","description":"Search by title"},"status":{"type":"array","description":"Filter by status(es)","items":{"type":"string","enum":["TODO","IN_PROGRESS","DONE"]}},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH"],"description":"Filter by priority"},"assignedTo":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Filter by assigned user ID"},"branchId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Filter by branch ID"},"dateFrom":{"type":"string","example":"2025-01-01T00:00:00.000Z","description":"Filter tasks created after this date"},"dateTo":{"type":"string","example":"2025-12-31T23:59:59.000Z","description":"Filter tasks created before this date"},"includeCompleted":{"type":"boolean","example":false,"description":"Include completed tasks (DONE status). Default: false","default":false},"sortBy":{"type":"string","enum":["createdAt","title","priority","status","deadline","position"]},"sortOrder":{"type":"string","example":"desc","description":"Sort order","enum":["asc","desc"]}}},"MoveTaskDto":{"type":"object","properties":{"status":{"type":"string","enum":["TODO","IN_PROGRESS","DONE"],"description":"New task status"},"position":{"type":"number","example":10,"description":"New position"},"baseVersion":{"type":"number","example":1,"description":"Current task version"}},"required":["status","position","baseVersion"]},"TaskOrderItemDto":{"type":"object","properties":{"id":{"type":"string"},"position":{"type":"number"}},"required":["id","position"]},"ReorderTasksResultDto":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"serverVersion":{"type":"number"},"normalized":{"type":"array","items":{"$ref":"#/components/schemas/TaskOrderItemDto"}}},"required":["success","message","serverVersion","normalized"]},"BankAccountDto":{"type":"object","properties":{"id":{"type":"string","example":"ckx8l2k1s0000abc123xyz456","description":"ID"},"createdAt":{"type":"string","example":"2024-01-01T12:00:00.000Z","description":"Oluşturulma tarihi","format":"date-time"},"updatedAt":{"type":"string","example":"2024-01-01T12:05:00.000Z","description":"Güncellenme tarihi","format":"date-time"},"accountId":{"type":"string","description":"Associated account ID for transactions"},"name":{"type":"string","description":"Name of the bank account"},"currency":{"type":"string","description":"Currency code"},"status":{"type":"string","description":"Account Status","enum":["ACTIVE","PASSIVE"]},"openingBalance":{"type":"string","format":"decimal","example":"1234.5600","description":"Opening Balance"},"openingDate":{"type":"string","description":"Opening Date","format":"date-time"},"currentBalance":{"type":"string","format":"decimal","example":"1234.5600","description":"Current Balance"},"isDefault":{"type":"boolean","description":"Is default account","example":false},"bankInstitutionId":{"type":"string","description":"Banka kurumu id"},"bankInstitutionName":{"type":"string","description":"Banka kurumu adı"},"iban":{"type":"string","description":"IBAN"},"accountNumber":{"type":"string","description":"Hesap numarası"}},"required":["id","createdAt","updatedAt","accountId","name","currency","status","openingBalance","openingDate","currentBalance","isDefault"]},"CreateBankAccountDto":{"type":"object","properties":{"name":{"type":"string","example":"Garanti BBVA - TR76...0001","description":"Banka ve hesap adı"},"currency":{"type":"string","example":"TRY","description":"Para birimi kodu","default":"TRY"},"openingBalance":{"type":"string","format":"decimal","example":"1000.0000","description":"Açılış bakiyesi"},"openingDate":{"type":"string","example":"2024-01-01T00:00:00.000Z","description":"Açılış tarihi","format":"date-time"},"openingBalanceType":{"type":"string","example":"CREDIT","description":"Açılış bakiyesi yönü. CREDIT = Alacak (Pozitif), DEBIT = Borç (Negatif)","enum":["DEBIT","CREDIT"]},"isOpeningBalance":{"type":"boolean","description":"Açılış bakiyesi eklensin mi?","default":false},"balanceType":{"type":"string","description":"UI bakiye tipi","enum":["debt","credit"]},"isActive":{"type":"boolean","description":"Hesap aktif mi?","default":true},"isDefault":{"type":"boolean","description":"Varsayılan hesap mı?","default":false},"bankInstitutionId":{"type":"string","description":"Kayıtlı banka kurumu id (varsa)"},"bankInstitutionName":{"type":"string","description":"Banka kurumu adı (id yoksa oluşturulur / eşleştirilir)"},"iban":{"type":"string","description":"IBAN"},"accountNumber":{"type":"string","description":"Hesap numarası"}},"required":["name"]},"UpdateBankAccountDto":{"type":"object","properties":{"name":{"type":"string","example":"Garanti BBVA - TR76...0001"},"status":{"type":"string","enum":["ACTIVE","PASSIVE"],"example":"ACTIVE","description":"Hesap durumu"},"isActive":{"type":"boolean","description":"Hesap aktif mi?"},"openingBalance":{"type":"string","format":"decimal","example":"1000.0000"},"openingDate":{"type":"string","example":"2024-01-01T00:00:00.000Z","format":"date-time"},"isDefault":{"type":"boolean","description":"Varsayılan hesap mı?"},"bankInstitutionId":{"type":"string","description":"Banka kurumu id"},"bankInstitutionName":{"type":"string","description":"Banka kurumu adı (yeni kurum oluşturmaz, sadece id ile güncelleyin)"},"iban":{"type":"string"},"accountNumber":{"type":"string"}}},"BankInstitutionDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","createdAt","updatedAt"]},"CashAccountDto":{"type":"object","properties":{"id":{"type":"string","description":"ID"},"accountId":{"type":"string","description":"Account ID"},"name":{"type":"string","description":"Name"},"currency":{"type":"string","description":"Currency"},"status":{"type":"string","description":"Account Status","enum":["ACTIVE","PASSIVE"]},"currentBalance":{"type":"string","format":"decimal","example":"1234.5600","description":"Current Balance"},"createdAt":{"type":"string","description":"Created At","format":"date-time"},"updatedAt":{"type":"string","description":"Updated At","format":"date-time"},"isDefault":{"type":"boolean","description":"Is default account","example":false}},"required":["id","accountId","name","currency","status","currentBalance","createdAt","updatedAt","isDefault"]},"CreateCashAccountDto":{"type":"object","properties":{"name":{"type":"string","example":"Merkez Kasa","description":"Kasa hesabının adı"},"currency":{"type":"string","example":"TRY","description":"Para birimi kodu","default":"TRY"},"openingBalance":{"type":"string","format":"decimal","example":"1000.0000","description":"Açılış bakiyesi"},"openingBalanceType":{"type":"string","example":"CREDIT","description":"Açılış bakiyesi yönü. CREDIT = Alacak (Pozitif), DEBIT = Borç (Negatif)","enum":["DEBIT","CREDIT"]},"status":{"type":"string","enum":["ACTIVE","PASSIVE"],"example":"ACTIVE","description":"Hesap durumu"},"isOpeningBalance":{"type":"boolean","description":"Açılış bakiyesi eklensin mi?","default":false},"balanceType":{"type":"string","description":"UI bakiye tipi","enum":["debt","credit"]},"openingDate":{"type":"string","example":"2024-01-01","description":"Hesap açılış tarihi"},"isActive":{"type":"boolean","description":"Hesap aktif mi?","default":true},"isDefault":{"type":"boolean","description":"Varsayılan hesap mı?","default":false}},"required":["name"]},"UpdateCashAccountDto":{"type":"object","properties":{"name":{"type":"string","example":"Merkez Kasa"},"status":{"type":"string","enum":["ACTIVE","PASSIVE"],"example":"ACTIVE","description":"Hesap durumu"},"isActive":{"type":"boolean","description":"Hesap aktif mi?"},"isDefault":{"type":"boolean","description":"Varsayılan hesap mı?"}}},"CreateCreditCardDto":{"type":"object","properties":{"name":{"type":"string","example":"Kurumsal Kart — Garanti"},"currency":{"type":"string","default":"TRY"},"creditLimit":{"type":"string","format":"decimal","example":"50000.0000","description":"Kredi limiti"},"statementDay":{"type":"number","example":15,"description":"Ekstre günü (ayın kaçı, 1-31)"},"dueDay":{"type":"number","example":25,"description":"Son ödeme günü (ayın kaçı, 1-31)"},"currentDebt":{"type":"string","format":"decimal","example":"5000.0000","description":"Şu anki borç (devreden bakiye)"},"openingDate":{"type":"string"}},"required":["name","creditLimit","statementDay","dueDay","currentDebt"]},"CreditCardAccountDto":{"type":"object","properties":{"id":{"type":"string","example":"ckx8l2k1s0000abc123xyz456","description":"ID"},"createdAt":{"type":"string","example":"2024-01-01T12:00:00.000Z","description":"Oluşturulma tarihi","format":"date-time"},"updatedAt":{"type":"string","example":"2024-01-01T12:05:00.000Z","description":"Güncellenme tarihi","format":"date-time"},"accountId":{"type":"string"},"name":{"type":"string"},"currency":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","PASSIVE"]},"openingBalance":{"type":"string","format":"decimal","example":"1234.5600"},"openingDate":{"format":"date-time","type":"string"},"currentBalance":{"type":"string","format":"decimal","example":"1234.5600"},"creditLimit":{"type":"string","format":"decimal","example":"1234.5600","nullable":true},"statementDay":{"type":"object"},"dueDay":{"type":"object"},"usedLimit":{"type":"string","format":"decimal","example":"1234.5600","description":"Kullanılan limit (mutlak borç)"},"remainingLimit":{"type":"string","format":"decimal","example":"1234.5600","description":"Kalan limit (creditLimit - usedLimit)","nullable":true}},"required":["id","createdAt","updatedAt","accountId","name","currency","status","openingBalance","openingDate","currentBalance","creditLimit","statementDay","dueDay","usedLimit","remainingLimit"]},"SpendingCategoryDto":{"type":"object","properties":{"categoryId":{"type":"string","nullable":true},"categoryName":{"type":"string"},"color":{"type":"string","nullable":true},"amount":{"type":"number"},"percentage":{"type":"number"}},"required":["categoryId","categoryName","color","amount","percentage"]},"SpendingDailyDto":{"type":"object","properties":{"date":{"type":"string"},"amount":{"type":"number"}},"required":["date","amount"]},"CreditCardSpendingSummaryDto":{"type":"object","properties":{"total":{"type":"number","description":"Toplam harcama tutarı"},"categories":{"type":"array","items":{"$ref":"#/components/schemas/SpendingCategoryDto"}},"daily":{"type":"array","items":{"$ref":"#/components/schemas/SpendingDailyDto"}}},"required":["total","categories","daily"]},"ReportKpisDto":{"type":"object","properties":{"totalSpend":{"type":"number","description":"Toplam harcama (brüt)"},"totalRefunds":{"type":"number","description":"Toplam iade"},"netSpend":{"type":"number","description":"Net harcama (totalSpend - totalRefunds)"},"transactionCount":{"type":"number","description":"İşlem adedi (gider)"},"averageTransaction":{"type":"number","description":"Ortalama gider tutarı"},"totalOutstandingDebt":{"type":"number","description":"Seçili kartların güncel toplam borcu (tüm zamanlar)"},"previousPeriodDeltaPct":{"type":"number","description":"Önceki döneme göre net harcama değişim yüzdesi","nullable":true},"previousPeriodNetSpend":{"type":"number","description":"Önceki dönem net harcama","nullable":true},"categorizedPct":{"type":"number","description":"Kategorize işlem oranı (%)"},"categorizedPctPrev":{"type":"number","description":"Önceki dönemdeki kategorize oranı","nullable":true},"weekendSharePct":{"type":"number","description":"Hafta içi / hafta sonu payı (%)"},"projectedPeriodSpend":{"type":"number","description":"Mevcut tempo ile dönem sonu tahmini (gün bazlı extrapolation)","nullable":true}},"required":["totalSpend","totalRefunds","netSpend","transactionCount","averageTransaction","totalOutstandingDebt","previousPeriodDeltaPct","previousPeriodNetSpend","categorizedPct","categorizedPctPrev","weekendSharePct","projectedPeriodSpend"]},"ReportCategoryDto":{"type":"object","properties":{"categoryId":{"type":"string","nullable":true},"categoryName":{"type":"string"},"color":{"type":"string","nullable":true},"amount":{"type":"number"},"percentage":{"type":"number"},"transactionCount":{"type":"number"},"averageAmount":{"type":"number"}},"required":["categoryId","categoryName","color","amount","percentage","transactionCount","averageAmount"]},"ReportDailyDto":{"type":"object","properties":{"date":{"type":"string"},"amount":{"type":"number"},"transactionCount":{"type":"number"}},"required":["date","amount","transactionCount"]},"ReportMonthlyDto":{"type":"object","properties":{"month":{"type":"string","description":"YYYY-MM"},"amount":{"type":"number"},"transactionCount":{"type":"number"}},"required":["month","amount","transactionCount"]},"ReportMerchantDto":{"type":"object","properties":{"merchant":{"type":"string"},"amount":{"type":"number"},"transactionCount":{"type":"number"},"topCategoryName":{"type":"string","nullable":true}},"required":["merchant","amount","transactionCount","topCategoryName"]},"ReportWeekdayDto":{"type":"object","properties":{"weekday":{"type":"number","description":"0=Paz, 1=Pzt, ..., 6=Cmt"},"label":{"type":"string"},"amount":{"type":"number"},"transactionCount":{"type":"number"}},"required":["weekday","label","amount","transactionCount"]},"ReportByCardDto":{"type":"object","properties":{"cardId":{"type":"string"},"cardName":{"type":"string"},"amount":{"type":"number","description":"Dönem içi net harcama"},"transactionCount":{"type":"number"},"refunds":{"type":"number"},"creditLimit":{"type":"number","nullable":true},"currentUsed":{"type":"number"},"utilizationPct":{"type":"number","nullable":true}},"required":["cardId","cardName","amount","transactionCount","refunds","creditLimit","currentUsed","utilizationPct"]},"ReportUncategorizedDto":{"type":"object","properties":{"amount":{"type":"number"},"transactionCount":{"type":"number"},"percentage":{"type":"number"}},"required":["amount","transactionCount","percentage"]},"ReportLargestTransactionDto":{"type":"object","properties":{"id":{"type":"string"},"date":{"type":"string"},"amount":{"type":"number"},"description":{"type":"string","nullable":true},"merchant":{"type":"string","nullable":true},"categoryName":{"type":"string","nullable":true},"categoryColor":{"type":"string","nullable":true},"cardName":{"type":"string"}},"required":["id","date","amount","description","merchant","categoryName","categoryColor","cardName"]},"ReportMoverDto":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"previousAmount":{"type":"number"},"currentAmount":{"type":"number"},"deltaAmount":{"type":"number"},"deltaPct":{"type":"number","description":"Yüzde değişim; önceki 0 ise null","nullable":true},"color":{"type":"string","nullable":true}},"required":["key","label","previousAmount","currentAmount","deltaAmount","deltaPct","color"]},"ReportNewMerchantDto":{"type":"object","properties":{"merchant":{"type":"string"},"amount":{"type":"number"},"transactionCount":{"type":"number"},"firstSeenDate":{"type":"string"}},"required":["merchant","amount","transactionCount","firstSeenDate"]},"CreditCardDetailedReportDto":{"type":"object","properties":{"kpis":{"$ref":"#/components/schemas/ReportKpisDto"},"categories":{"type":"array","items":{"$ref":"#/components/schemas/ReportCategoryDto"}},"daily":{"type":"array","items":{"$ref":"#/components/schemas/ReportDailyDto"}},"monthly":{"type":"array","items":{"$ref":"#/components/schemas/ReportMonthlyDto"}},"topMerchants":{"type":"array","items":{"$ref":"#/components/schemas/ReportMerchantDto"}},"byWeekday":{"type":"array","items":{"$ref":"#/components/schemas/ReportWeekdayDto"}},"byCard":{"type":"array","items":{"$ref":"#/components/schemas/ReportByCardDto"}},"uncategorized":{"$ref":"#/components/schemas/ReportUncategorizedDto"},"largestTransactions":{"type":"array","items":{"$ref":"#/components/schemas/ReportLargestTransactionDto"}},"categoryMovers":{"type":"array","items":{"$ref":"#/components/schemas/ReportMoverDto"}},"merchantMovers":{"type":"array","items":{"$ref":"#/components/schemas/ReportMoverDto"}},"newMerchants":{"type":"array","items":{"$ref":"#/components/schemas/ReportNewMerchantDto"}}},"required":["kpis","categories","daily","monthly","topMerchants","byWeekday","byCard","uncategorized","largestTransactions","categoryMovers","merchantMovers","newMerchants"]},"StatementPeriodDto":{"type":"object","properties":{"periodStart":{"type":"string"},"periodEnd":{"type":"string"},"spend":{"type":"number"},"transactionCount":{"type":"number"}},"required":["periodStart","periodEnd","spend","transactionCount"]},"StatementCycleCardDto":{"type":"object","properties":{"cardId":{"type":"string"},"cardName":{"type":"string"},"statementDay":{"type":"number","nullable":true},"dueDay":{"type":"number","nullable":true},"creditLimit":{"type":"number","nullable":true},"currentUsed":{"type":"number"},"currentStatement":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/StatementPeriodDto"}]},"previousStatement":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/StatementPeriodDto"}]},"nextDueDate":{"type":"string","nullable":true},"daysUntilDue":{"type":"number","nullable":true},"minPaymentEstimate":{"type":"number","nullable":true}},"required":["cardId","cardName","statementDay","dueDay","creditLimit","currentUsed","currentStatement","previousStatement","nextDueDate","daysUntilDue","minPaymentEstimate"]},"StatementCyclesResponseDto":{"type":"object","properties":{"cards":{"type":"array","items":{"$ref":"#/components/schemas/StatementCycleCardDto"}}},"required":["cards"]},"RecurringItemDto":{"type":"object","properties":{"merchant":{"type":"string"},"averageAmount":{"type":"number"},"cadenceDays":{"type":"number"},"occurrenceCount":{"type":"number"},"totalPaid":{"type":"number"},"firstSeenDate":{"type":"string"},"lastSeenDate":{"type":"string"},"nextExpectedDate":{"type":"string"},"topCategoryName":{"type":"string","nullable":true}},"required":["merchant","averageAmount","cadenceDays","occurrenceCount","totalPaid","firstSeenDate","lastSeenDate","nextExpectedDate","topCategoryName"]},"RecurringResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/RecurringItemDto"}},"monthlyFixedLoad":{"type":"number","description":"Toplam aylık sabit yük (tahmini)"},"lookbackDays":{"type":"number","description":"Analiz penceresi (gün)"}},"required":["items","monthlyFixedLoad","lookbackDays"]},"HeatmapCellDto":{"type":"object","properties":{"date":{"type":"string","description":"YYYY-MM-DD (TR local)"},"weekday":{"type":"number","description":"0=Paz, 1=Pzt, ..., 6=Cmt"},"week":{"type":"string","description":"ISO week (YYYY-WW)"},"amount":{"type":"number"},"transactionCount":{"type":"number"}},"required":["date","weekday","week","amount","transactionCount"]},"WeeklyHeatmapResponseDto":{"type":"object","properties":{"cells":{"type":"array","items":{"$ref":"#/components/schemas/HeatmapCellDto"}},"weeksShown":{"type":"number"},"maxAmount":{"type":"number"},"windowBegin":{"type":"string","nullable":true},"windowEnd":{"type":"string","nullable":true}},"required":["cells","weeksShown","maxAmount"]},"UpdateCreditCardDto":{"type":"object","properties":{"name":{"type":"string","example":"Kurumsal Kart — Garanti"},"creditLimit":{"type":"string","format":"decimal","example":"50000.0000"},"statementDay":{"type":"number","example":15},"dueDay":{"type":"number","example":25}}},"CreditCardImportColumnMappingDto":{"type":"object","properties":{"dateColumn":{"type":"string"},"descriptionColumn":{"type":"string"},"amountColumn":{"type":"string"},"debitColumn":{"type":"string"},"creditColumn":{"type":"string"},"referenceNoColumn":{"type":"string"},"amountSignMode":{"type":"string"}}},"CreditCardImportTransactionPreviewDto":{"type":"object","properties":{"rowIndex":{"type":"number"},"date":{"type":"string","nullable":true},"description":{"type":"string"},"amount":{"type":"number"},"direction":{"type":"string","enum":["IN","OUT"]},"isDuplicate":{"type":"boolean"},"classification":{"type":"string","enum":["EXPENSE","REFUND","UNKNOWN"]},"referenceNo":{"type":"string"},"categoryId":{"type":"string","nullable":true},"categoryName":{"type":"string","nullable":true},"categoryTier":{"type":"string","enum":["HIGH","MEDIUM","LOW"],"nullable":true},"categoryScore":{"type":"number","nullable":true},"error":{"type":"string"}},"required":["rowIndex","description","amount","direction","isDuplicate","classification"]},"CreditCardImportPreviewResultDto":{"type":"object","properties":{"fingerprint":{"type":"string"},"sheetName":{"type":"string"},"headers":{"type":"array","items":{"type":"string"}},"detectedMapping":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/CreditCardImportColumnMappingDto"}]},"needsMapping":{"type":"boolean"},"preview":{"type":"array","items":{"$ref":"#/components/schemas/CreditCardImportTransactionPreviewDto"}},"duplicateCount":{"type":"number"},"templateName":{"type":"string","nullable":true}},"required":["fingerprint","sheetName","headers","needsMapping","preview","duplicateCount"]},"ImportConfirmMappingDto":{"type":"object","properties":{"dateColumn":{"type":"string","description":"Tarih sütunu"},"descriptionColumn":{"type":"string","description":"Açıklama sütunu"},"amountColumn":{"type":"string","description":"Tutar sütunu (tek sütun) veya debit/credit kullanılıyorsa opsiyonel"},"debitColumn":{"type":"string","description":"Borç sütunu"},"creditColumn":{"type":"string","description":"Alacak sütunu"},"referenceNoColumn":{"type":"string","description":"Referans no sütunu"},"amountSignMode":{"type":"string","enum":["NEGATIVE_IS_OUT","NEGATIVE_IS_IN"],"description":"Sign yorumu. NEGATIVE_IS_OUT (varsayılan): negatif tutar=harcama, pozitif=iade/ödeme. NEGATIVE_IS_IN: tam tersi."}},"required":["amountColumn"]},"ImportPreviewDto":{"type":"object","properties":{"file":{"type":"string","description":"Dosya base64"},"accountId":{"type":"string","description":"Kredi kartı account ID"},"sheetName":{"type":"string","description":"Sayfa adı"},"mapping":{"description":"Manuel eşleştirme. Verilirse auto-detect yerine bu kullanılır.","allOf":[{"$ref":"#/components/schemas/ImportConfirmMappingDto"}]}},"required":["file","accountId"]},"CreditCardImportConfirmResultDto":{"type":"object","properties":{"importedCount":{"type":"number"},"skippedDuplicateCount":{"type":"number"},"createdTemplateId":{"type":"string","nullable":true}},"required":["importedCount","skippedDuplicateCount"]},"ImportConfirmDto":{"type":"object","properties":{"accountId":{"type":"string","description":"Kredi kartı account ID"},"fingerprint":{"type":"string","description":"Fingerprint"},"mapping":{"$ref":"#/components/schemas/ImportConfirmMappingDto"},"sheetName":{"type":"string","description":"Sayfa adı"},"templateName":{"type":"string","description":"Şablon adı (yeni kaydedilecekse)"},"saveTemplate":{"type":"boolean","description":"Şablon kaydedilsin mi?"},"fileBase64":{"type":"string","description":"Dosya base64 (raw file for re-parse)"},"rowIndexes":{"description":"Onaylanan satır indeksleri","type":"array","items":{"type":"number"}},"rowCategories":{"type":"object","description":"Satır bazlı kategori eşlemesi { rowIndex: categoryId }"}},"required":["accountId","fingerprint","mapping","fileBase64","rowIndexes"]},"ImportTemplateDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"fingerprint":{"type":"string"},"sheetName":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","fingerprint","createdAt"]},"CreditCardPaymentDto":{"type":"object","properties":{"sourceAccountId":{"type":"string","description":"Kaynak hesap ID (banka/kasa)"},"amount":{"type":"string","format":"decimal","example":"1000.0000","description":"Ödeme tutarı"},"description":{"type":"string","description":"Açıklama"},"date":{"type":"string","description":"İşlem tarihi"}},"required":["sourceAccountId","amount"]},"ManualCreditCardTransactionDto":{"type":"object","properties":{"accountId":{"type":"string","description":"Kredi kartı account ID"},"amount":{"type":"string","format":"decimal","example":"1000.0000","description":"Tutar"},"direction":{"type":"string","enum":["IN","OUT"],"description":"Yön: OUT = harcama, IN = iade/ödeme"},"description":{"type":"string","description":"Açıklama"},"date":{"type":"string","description":"İşlem tarihi"},"counterAccountId":{"type":"string","description":"Karşı hesap ID"}},"required":["accountId","amount","direction"]},"BankReconciliationDto":{"type":"object","properties":{"id":{"type":"string","example":"ckx8l2k1s0000abc123xyz456","description":"ID"},"createdAt":{"type":"string","example":"2024-01-01T12:00:00.000Z","description":"Oluşturulma tarihi","format":"date-time"},"updatedAt":{"type":"string","example":"2024-01-01T12:05:00.000Z","description":"Güncellenme tarihi","format":"date-time"},"bankAccountId":{"type":"string"},"bankAccountName":{"type":"string"},"status":{"type":"string","enum":["DRAFT","IN_REVIEW","COMPLETED","CANCELLED"]},"periodStart":{"type":"string"},"periodEnd":{"type":"string"},"statementDate":{"type":"string"},"openingBalance":{"type":"string","format":"decimal","example":"1234.5600"},"closingBalance":{"type":"string","format":"decimal","example":"1234.5600"},"totalLines":{"type":"number"},"matchedLines":{"type":"number"},"unmatchedLines":{"type":"number"},"newLines":{"type":"number"},"ignoredLines":{"type":"number"},"notes":{"type":"object"}},"required":["id","createdAt","updatedAt","bankAccountId","status","periodStart","periodEnd","statementDate","openingBalance","closingBalance","totalLines","matchedLines","unmatchedLines","newLines","ignoredLines"]},"ReconciliationLineDto":{"type":"object","properties":{"id":{"type":"string"},"reconciliationId":{"type":"string"},"statementDate":{"type":"string"},"statementDescription":{"type":"string"},"statementAmount":{"type":"string","format":"decimal","example":"1234.5600"},"statementDirection":{"type":"string","enum":["IN","OUT"]},"statementReferenceNo":{"type":"object"},"status":{"type":"string","enum":["UNMATCHED","AUTO_MATCHED","MANUAL_MATCHED","NEW_TRANSACTION","IGNORED"]},"matchScore":{"type":"object"},"matchedTransactionId":{"type":"object"},"matchedTransactionDescription":{"type":"object"},"createdTransactionId":{"type":"object"},"categoryId":{"type":"object"},"categoryName":{"type":"object"},"notes":{"type":"object"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","reconciliationId","statementDate","statementDescription","statementAmount","statementDirection","status","createdAt","updatedAt"]},"ReconciliationPreviewLineDto":{"type":"object","properties":{"rowIndex":{"type":"number"},"date":{"type":"object"},"description":{"type":"string"},"amount":{"type":"number"},"direction":{"type":"string","enum":["IN","OUT"]},"isDuplicate":{"type":"boolean"},"referenceNo":{"type":"string"},"balance":{"type":"number"},"categoryId":{"type":"object"},"categoryName":{"type":"object"},"categoryTier":{"type":"object"},"categoryScore":{"type":"object"},"autoMatchTransactionId":{"type":"object"},"autoMatchDescription":{"type":"object"},"autoMatchScore":{"type":"object"},"error":{"type":"string"}},"required":["rowIndex","description","amount","direction","isDuplicate"]},"ReconciliationPreviewResultDto":{"type":"object","properties":{"fingerprint":{"type":"string"},"sheetName":{"type":"string"},"headers":{"type":"array","items":{"type":"string"}},"detectedMapping":{"type":"object","description":"Algılanan sütun eşlemesi"},"needsMapping":{"type":"boolean","description":"Sütun eşlemesi gerekiyor mu?"},"preview":{"description":"Önizleme satırları","type":"array","items":{"$ref":"#/components/schemas/ReconciliationPreviewLineDto"}},"duplicateCount":{"type":"number","description":"Tekrar eden satır sayısı"},"autoMatchedCount":{"type":"number","description":"Otomatik eşleşen satır sayısı"},"templateName":{"type":"object","description":"Şablon adı"}},"required":["fingerprint","sheetName","headers","needsMapping","preview","duplicateCount","autoMatchedCount"]},"ReconciliationColumnMappingDto":{"type":"object","properties":{"dateColumn":{"type":"string","description":"Tarih sütunu","example":"İşlem Tarihi"},"descriptionColumn":{"type":"string","description":"Açıklama sütunu","example":"Açıklama"},"amountColumn":{"type":"string","description":"Tutar sütunu","example":"Tutar"},"debitColumn":{"type":"string","description":"Borç sütunu","example":"Borç"},"creditColumn":{"type":"string","description":"Alacak sütunu","example":"Alacak"},"referenceNoColumn":{"type":"string","description":"Referans no sütunu","example":"Referans No"},"amountSignMode":{"type":"string","enum":["NEGATIVE_IS_OUT","NEGATIVE_IS_IN"],"description":"Tutar işareti yorumu"}}},"ReconciliationImportPreviewDto":{"type":"object","properties":{"file":{"type":"string","description":"Dosya base64"},"accountId":{"type":"string","description":"Banka hesabı account ID","example":"550e8400-e29b-41d4-a716-446655440000"},"sheetName":{"type":"string","description":"Sayfa adı","example":"Sheet1"},"mapping":{"description":"Manuel sütun eşlemesi","allOf":[{"$ref":"#/components/schemas/ReconciliationColumnMappingDto"}]}},"required":["file","accountId"]},"CreateReconciliationDto":{"type":"object","properties":{"accountId":{"type":"string","description":"Banka hesabı account ID","example":"550e8400-e29b-41d4-a716-446655440000"},"fileBase64":{"type":"string","description":"Dosya base64"},"fingerprint":{"type":"string","description":"Fingerprint","example":"abc123def456"},"mapping":{"$ref":"#/components/schemas/ReconciliationColumnMappingDto"},"sheetName":{"type":"string","description":"Sayfa adı"},"periodStart":{"type":"string","description":"Dönem başlangıcı","example":"2026-04-01T00:00:00.000Z"},"periodEnd":{"type":"string","description":"Dönem bitişi","example":"2026-04-30T00:00:00.000Z"},"statementDate":{"type":"string","description":"Ekstre tarihi","example":"2026-04-21T00:00:00.000Z"},"openingBalance":{"type":"string","format":"decimal","example":"50000.0000","description":"Açılış bakiyesi"},"closingBalance":{"type":"string","format":"decimal","example":"45000.0000","description":"Kapanış bakiyesi"},"notes":{"type":"string","description":"Notlar","example":"Nisan 2026 mutabakatı"},"saveTemplate":{"type":"boolean","description":"Şablon kaydedilsin mi?"},"templateName":{"type":"string","description":"Şablon adı","example":"Garanti BBVA Şablonu"}},"required":["accountId","fileBase64","fingerprint","mapping"]},"UnmatchedTransactionDto":{"type":"object","properties":{"id":{"type":"string"},"date":{"type":"string"},"description":{"type":"string","nullable":true},"amount":{"type":"string","format":"decimal","example":"1234.5600"},"direction":{"type":"string","enum":["IN","OUT"]},"referenceNo":{"type":"string","nullable":true}},"required":["id","date","amount","direction"]},"ResolveLineActionDto":{"type":"object","properties":{"lineId":{"type":"string","description":"Satır ID","example":"550e8400-e29b-41d4-a716-446655440000"},"action":{"type":"string","enum":["MANUAL_MATCHED","NEW_TRANSACTION","IGNORED"],"description":"Satır çözümleme aksiyonu"},"transactionId":{"type":"string","description":"Eşleştirilecek işlem ID (MANUAL_MATCHED)"},"categoryId":{"type":"string","description":"Kategori ID"},"counterAccountId":{"type":"string","description":"Karşı hesap ID (NEW_TRANSACTION)"},"notes":{"type":"string","description":"Notlar"}},"required":["lineId","action"]},"ResolveReconciliationDto":{"type":"object","properties":{"lines":{"description":"Çözümlenecek satır aksiyonları","type":"array","items":{"$ref":"#/components/schemas/ResolveLineActionDto"}}},"required":["lines"]},"CreateLoanDto":{"type":"object","properties":{"name":{"type":"string","example":"İşletme Kredisi — Ziraat"},"principal":{"type":"string","format":"decimal","example":"500000.0000","description":"Anapara"},"interestRate":{"type":"string","format":"decimal","example":"2.4900","description":"Faiz oranı (%)"},"termMonths":{"type":"number","example":36,"description":"Vade (ay)"},"currency":{"type":"string","default":"TRY"},"openingBalance":{"type":"string","format":"decimal","example":"500000.0000","description":"Açılış bakiyesi"},"openingDate":{"type":"string"},"openingBalanceType":{"type":"string","enum":["DEBIT","CREDIT"]},"isOpeningBalance":{"type":"boolean"}},"required":["name","principal"]},"UpdateLoanDto":{"type":"object","properties":{"name":{"type":"string","example":"İşletme Kredisi — Ziraat"},"principal":{"type":"string","format":"decimal","example":"500000.0000","description":"Anapara"},"interestRate":{"type":"string","format":"decimal","example":"2.4900","description":"Faiz oranı (%)"},"termMonths":{"type":"number","example":36,"description":"Vade (ay)"},"currency":{"type":"string","default":"TRY"}}},"LoanAccountDto":{"type":"object","properties":{"id":{"type":"string","example":"ckx8l2k1s0000abc123xyz456","description":"ID"},"createdAt":{"type":"string","example":"2024-01-01T12:00:00.000Z","description":"Oluşturulma tarihi","format":"date-time"},"updatedAt":{"type":"string","example":"2024-01-01T12:05:00.000Z","description":"Güncellenme tarihi","format":"date-time"},"accountId":{"type":"string"},"name":{"type":"string"},"currency":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","PASSIVE"]},"openingBalance":{"type":"string","format":"decimal","example":"1234.5600"},"openingDate":{"format":"date-time","type":"string"},"currentBalance":{"type":"string","format":"decimal","example":"1234.5600"},"principal":{"type":"string","format":"decimal","example":"1234.5600"},"interestRate":{"type":"string","format":"decimal","example":"1234.5600","nullable":true},"termMonths":{"type":"object"}},"required":["id","createdAt","updatedAt","accountId","name","currency","status","openingBalance","openingDate","currentBalance","principal"]},"SupplierDto":{"type":"object","properties":{"id":{"type":"string","example":"ckx8l2k1s0000abc123xyz456","description":"ID"},"createdAt":{"type":"string","example":"2024-01-01T12:00:00.000Z","description":"Oluşturulma tarihi","format":"date-time"},"updatedAt":{"type":"string","example":"2024-01-01T12:05:00.000Z","description":"Güncellenme tarihi","format":"date-time"},"tenantId":{"type":"string","description":"Tenant ID"},"branchId":{"type":"string","description":"Branch ID"},"accountId":{"type":"string","description":"Account ID"},"name":{"type":"string","description":"Supplier Name"},"phone":{"type":"string","description":"Phone Number"},"contactPerson":{"type":"string","description":"Contact Person"},"status":{"type":"string","description":"Account Status","enum":["ACTIVE","PASSIVE"]},"taxNumber":{"type":"string","description":"VKN"},"taxOffice":{"type":"string","description":"Vergi dairesi"},"address":{"type":"string","description":"Adres"},"city":{"type":"string","description":"Şehir"},"country":{"type":"string","description":"Ülke"},"postalCode":{"type":"string","description":"Posta kodu"},"district":{"type":"string","description":"İlçe"},"balance":{"type":"string","format":"decimal","example":"1234.5600","description":"Derived balance (SUM IN - SUM OUT)"}},"required":["id","createdAt","updatedAt","tenantId","branchId","accountId","name","status"]},"ProductNameUnitDto":{"type":"object","properties":{"name":{"type":"string"},"unit":{"type":"string"}},"required":["name","unit"]},"WarehouseIdNameCodeDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"code":{"type":"string"}},"required":["id","name"]},"StockMovementDto":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"productId":{"type":"string"},"warehouseId":{"type":"string"},"quantity":{"type":"string","format":"decimal","example":"1234.5600"},"direction":{"type":"string","enum":["IN","OUT"]},"type":{"type":"string","enum":["OPENING","SALE","PURCHASE","RETURN","ADJUSTMENT","TRANSFER"]},"referenceId":{"type":"string"},"referenceType":{"type":"string","enum":["INVOICE","SHIFT","MANUAL","TRANSFER"]},"invoiceLineId":{"type":"object"},"description":{"type":"string"},"product":{"$ref":"#/components/schemas/ProductNameUnitDto"},"warehouse":{"$ref":"#/components/schemas/WarehouseIdNameCodeDto"}},"required":["id","createdAt","productId","quantity","direction","type"]},"ProductDto":{"type":"object","properties":{"id":{"type":"string","example":"ckx8l2k1s0000abc123xyz456","description":"ID"},"createdAt":{"type":"string","example":"2024-01-01T12:00:00.000Z","description":"Oluşturulma tarihi","format":"date-time"},"updatedAt":{"type":"string","example":"2024-01-01T12:05:00.000Z","description":"Güncellenme tarihi","format":"date-time"},"name":{"type":"string","example":"Laptop Dell XPS 15","description":"Product name"},"unit":{"type":"string","example":"adet","description":"Unit of measure"},"unitPrice":{"type":"string","format":"decimal","example":"1234.5600","description":"Unit price","nullable":true},"isActive":{"type":"boolean","example":true,"description":"Active status"},"trackStock":{"type":"boolean","example":false,"description":"Whether to track stock for this product"},"currentStock":{"type":"number","description":"Current stock level"},"recentMovements":{"description":"Recent stock movements","type":"array","items":{"$ref":"#/components/schemas/StockMovementDto"}},"barcode":{"type":"string","example":"8691234567890","description":"Barcode"},"defaultVatRate":{"type":"string","format":"decimal","example":"1234.5600","description":"Default VAT Rate","nullable":true},"defaultWithholdingCode":{"type":"string","example":"601","description":"Default Withholding Code"},"buyingPrice":{"type":"string","format":"decimal","example":"1234.5600","description":"Buying Price","nullable":true}},"required":["id","createdAt","updatedAt","name","unit","unitPrice","isActive","trackStock"]},"InvoiceItemDto":{"type":"object","properties":{"id":{"type":"string"},"productId":{"type":"string"},"product":{"$ref":"#/components/schemas/ProductDto"},"quantity":{"type":"string","format":"decimal","example":"1234.5600"},"unitPrice":{"type":"string","format":"decimal","example":"1234.5600"},"subtotal":{"type":"string","format":"decimal","example":"1234.5600","description":"Birim fiyat * Miktar (iskonto öncesi)"},"taxBase":{"type":"string","format":"decimal","example":"1234.5600","description":"İskonto ve genel iskonto sonrası matrah (KDV matrahı)"},"lineTotal":{"type":"string","format":"decimal","example":"1234.5600","description":"Ödenecek satır tutarı: taxBase + vatAmount − withholdingAmount"},"taxRate":{"type":"string","format":"decimal","example":"1234.5600","description":"KDV oranı (0-100)"},"discountRate":{"type":"string","format":"decimal","example":"1234.5600","description":"İskonto oranı (0-100)"},"discountAmount":{"type":"string","format":"decimal","example":"1234.5600","description":"İskonto tutarı"},"vatAmount":{"type":"string","format":"decimal","example":"1234.5600","description":"Hesaplanan KDV tutarı"},"withholdingCode":{"type":"string","nullable":true,"description":"Tevkifat kodu"},"withholdingAmount":{"type":"string","format":"decimal","example":"1234.5600","description":"Tevkifat tutarı"},"netAmount":{"type":"string","format":"decimal","example":"1234.5600","description":"Net satır tutarı (lineTotal ile aynı)"},"unitCode":{"type":"string","nullable":true,"description":"UBL unit code (UN/ECE Rec 20)"},"productNameSnapshot":{"type":"object","description":"Belge anındaki ürün adı (snapshot)"},"barcodeSnapshot":{"type":"object","description":"Belge anındaki barkod (snapshot)"},"unitNameSnapshot":{"type":"object","description":"Belge anındaki birim adı (snapshot)"},"description":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","productId","quantity","unitPrice","subtotal","lineTotal","createdAt","updatedAt"]},"ExpenseItemDto":{"type":"object","properties":{"id":{"type":"string","example":"ckx8l2k1s0000abc123xyz456","description":"ID"},"createdAt":{"type":"string","example":"2024-01-01T12:00:00.000Z","description":"Oluşturulma tarihi","format":"date-time"},"updatedAt":{"type":"string","example":"2024-01-01T12:05:00.000Z","description":"Güncellenme tarihi","format":"date-time"},"name":{"type":"string","example":"Ofis Kira Gideri","description":"Expense item name"},"description":{"type":"string","example":"Aylık ofis kira ödemesi","description":"Expense item description"},"isActive":{"type":"boolean","example":true,"description":"Active status"}},"required":["id","createdAt","updatedAt","name","isActive"]},"InvoiceExpenseItemDto":{"type":"object","properties":{"id":{"type":"string"},"expenseItemId":{"type":"string"},"expenseItem":{"$ref":"#/components/schemas/ExpenseItemDto"},"amount":{"type":"string","format":"decimal","example":"1234.5600"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","expenseItemId","amount","createdAt","updatedAt"]},"TenantDto":{"type":"object","properties":{"id":{"type":"string","example":"ckx8l2k1s0000abc123xyz456","description":"ID"},"createdAt":{"type":"string","example":"2024-01-01T12:00:00.000Z","description":"Oluşturulma tarihi","format":"date-time"},"updatedAt":{"type":"string","example":"2024-01-01T12:05:00.000Z","description":"Güncellenme tarihi","format":"date-time"},"slug":{"type":"string","example":"acme-corp","description":"Tenant slug (benzersiz tanımlayıcı)"},"name":{"type":"string","example":"Acme Corporation","description":"Tenant adı"},"modules":{"example":["accounting","hr"],"description":"Aktif modüller","type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["ACTIVE","SUSPENDED","ARCHIVED"],"example":"ACTIVE","description":"Tenant durumu"},"isTest":{"type":"boolean","example":false,"description":"Test tenant bayrağı (Orbit tarafında atanır, biHesap readonly yansıtır).","default":false},"companyName":{"type":"string","example":"Acme Corp","nullable":true},"website":{"type":"string","example":"https://acme.com","nullable":true},"email":{"type":"string","example":"contact@acme.com"},"phone":{"type":"string","example":"+90534567890","nullable":true},"address":{"type":"string","nullable":true},"taxNumber":{"type":"string","example":"1234567890","nullable":true},"taxOffice":{"type":"string","example":"Gebze V.D.","nullable":true},"officialName":{"type":"string","nullable":true},"logoUrl":{"type":"string","example":"https://cdn.acme.com/logo.png","nullable":true}},"required":["id","createdAt","updatedAt","slug","name","modules","status","isTest"]},"InvoiceDto":{"type":"object","properties":{"id":{"type":"string","example":"ckx8l2k1s0000abc123xyz456","description":"ID"},"createdAt":{"type":"string","example":"2024-01-01T12:00:00.000Z","description":"Oluşturulma tarihi","format":"date-time"},"updatedAt":{"type":"string","example":"2024-01-01T12:05:00.000Z","description":"Güncellenme tarihi","format":"date-time"},"invoiceNumber":{"type":"string"},"series":{"type":"string","description":"Invoice series (e.g. \"A\")"},"sequenceNumber":{"type":"number","description":"Sequential number within tenant + year"},"type":{"type":"string","enum":["SALES","PURCHASE","EXPENSE","SALES_RETURN","PURCHASE_RETURN"]},"paymentType":{"type":"string","enum":["CASH","CREDIT"]},"isCancelled":{"type":"boolean","description":"Whether invoice is cancelled"},"issueDate":{"type":"string","format":"date-time"},"dueDate":{"type":"string","format":"date-time","nullable":true},"customerId":{"type":"string","nullable":true},"customer":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/CustomerDto"}]},"supplierId":{"type":"string","nullable":true},"supplier":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/SupplierDto"}]},"counterpartyNameSnapshot":{"type":"string","nullable":true,"description":"Snapshot of counterparty name at invoice creation"},"counterpartyTypeSnapshot":{"type":"string","enum":["CUSTOMER","SUPPLIER","NONE"],"description":"Type of counterparty (CUSTOMER, SUPPLIER, or NONE)"},"counterpartyTaxNoSnapshot":{"type":"string","nullable":true,"description":"Snapshot of counterparty tax number"},"counterpartyPhoneSnapshot":{"type":"string","nullable":true,"description":"Snapshot of counterparty phone"},"counterpartyAddressSnapshot":{"type":"string","nullable":true,"description":"Snapshot of counterparty address at invoice creation"},"counterpartyTaxOfficeSnapshot":{"type":"string","nullable":true,"description":"Snapshot of counterparty tax office at invoice creation"},"displayCounterpartyName":{"type":"string","nullable":true,"description":"R3: Computed display name - uses customer/supplier name if exists, otherwise snapshot"},"totalAmount":{"type":"string","format":"decimal","example":"1234.5600"},"paidAmount":{"type":"string","format":"decimal","example":"1234.5600"},"remainingAmount":{"type":"string","format":"decimal","example":"1234.5600"},"totalDiscountRate":{"type":"string","format":"decimal","example":"1234.5600","description":"Genel iskonto oranı (0-100)","nullable":true},"totalDiscountAmount":{"type":"string","format":"decimal","example":"1234.5600","description":"Toplam iskonto tutarı (satır iskontoları + genel iskonto)","nullable":true},"subtotal":{"type":"string","format":"decimal","example":"1234.5600","description":"Brüt toplam (iskonto öncesi)"},"taxBaseTotal":{"type":"string","format":"decimal","example":"1234.5600","description":"Toplam KDV matrahı"},"totalVatAmount":{"type":"string","format":"decimal","example":"1234.5600","description":"Toplam KDV tutarı"},"totalWithholdingAmount":{"type":"string","format":"decimal","example":"1234.5600","description":"Toplam tevkifat tutarı"},"currency":{"type":"string","description":"Invoice currency (ISO 4217)","example":"TRY"},"status":{"type":"string","description":"Invoice status: DRAFT | APPROVED | CANCELLED (nullable for legacy rows)"},"cancelledAt":{"type":"string","format":"date-time","nullable":true,"description":"Cancellation timestamp"},"customerNameSnapshot":{"type":"object","nullable":true,"description":"Müşteri adı snapshot"},"customerTaxNumberSnapshot":{"type":"object","nullable":true,"description":"Müşteri VKN/TCKN snapshot"},"supplierNameSnapshot":{"type":"object","nullable":true,"description":"Tedarikçi adı snapshot"},"supplierTaxNumberSnapshot":{"type":"object","nullable":true,"description":"Tedarikçi vergi no snapshot"},"derivedPaymentStatus":{"type":"string","example":"OPEN"},"items":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceItemDto"}},"expenseItems":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceExpenseItemDto"}},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/TransactionDto"}},"systemMovements":{"description":"R7: All system movements (Transaction) for full audit trail in invoice detail","type":"array","items":{"$ref":"#/components/schemas/TransactionDto"}},"documentMovements":{"type":"object","description":"Document-centric movements grouped by category for invoice detail 3-block layout","example":{"ledgerMovements":[],"cashMovements":[],"cancellationMovements":[]}},"tenant":{"$ref":"#/components/schemas/TenantDto"},"description":{"type":"string","nullable":true},"referencedInvoiceId":{"type":"string","nullable":true},"referencedInvoice":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/InvoiceDto"}]},"returnInvoices":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceDto"}},"canCancel":{"type":"boolean","description":"Whether this invoice can be cancelled"},"cancelBlockReason":{"type":"string","nullable":true,"description":"Reason why invoice cannot be cancelled (if canCancel is false)"},"canDelete":{"type":"boolean","description":"Whether this invoice can be hard-deleted (no manual linked movements, no blocking returns)"},"deleteBlockReason":{"type":"string","nullable":true,"description":"Reason why invoice cannot be deleted (if canDelete is false)"}},"required":["id","createdAt","updatedAt","invoiceNumber","series","sequenceNumber","type","paymentType","isCancelled","issueDate","totalAmount","paidAmount","remainingAmount","subtotal","taxBaseTotal","totalVatAmount","totalWithholdingAmount","derivedPaymentStatus","items","expenseItems","canCancel"]},"CreateInvoiceItemDto":{"type":"object","properties":{"productId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Ürün ID"},"quantity":{"type":"number","example":1,"description":"Miktar"},"unitPrice":{"type":"string","format":"decimal","example":"250.0000","description":"Birim fiyat"},"taxRate":{"type":"number","example":20,"description":"KDV oranı (0-100)"},"discountRate":{"type":"number","example":10,"description":"İskonto oranı (0-100)"},"withholdingCode":{"type":"string","example":"601","description":"Tevkifat kodu"},"description":{"type":"string","example":"Kalem detayı","description":"Açıklama"}},"required":["productId","quantity","unitPrice"]},"CreateInvoiceExpenseItemDto":{"type":"object","properties":{"expenseItemId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Gider kalemi ID"},"amount":{"type":"string","format":"decimal","example":"500.0000","description":"Tutar"}},"required":["expenseItemId","amount"]},"SinglePaymentDto":{"type":"object","properties":{"accountId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Kasa/Banka Hesap ID"},"amount":{"type":"string","format":"decimal","example":"500.0000","description":"Tutar"}},"required":["accountId","amount"]},"CreateInvoiceDto":{"type":"object","properties":{"type":{"type":"string","enum":["SALES","PURCHASE","EXPENSE","SALES_RETURN","PURCHASE_RETURN"],"example":"SALES","description":"Belge tipi"},"paymentType":{"type":"string","enum":["CASH","CREDIT"],"example":"CASH","description":"Ödeme tipi"},"series":{"type":"string","example":"A","description":"Fatura seri (boş bırakılırsa otomatik, doldurulursa manuel mod)"},"sequenceNumber":{"type":"number","example":1,"description":"Manuel sıra numarası (series ile birlikte verilmelidir)"},"issueDate":{"type":"string","format":"date-time","example":"2024-01-15T00:00:00Z","description":"Düzenleme tarihi"},"totalDiscountRate":{"type":"number","example":5,"description":"Genel iskonto oranı (0-100)"},"dueDate":{"type":"string","format":"date-time","example":"2024-02-15T00:00:00Z","description":"Vade tarihi"},"customerId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Müşteri ID"},"supplierId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Tedarikçi ID"},"items":{"description":"Ürün kalemleri","type":"array","items":{"$ref":"#/components/schemas/CreateInvoiceItemDto"}},"expenseItems":{"description":"Gider kalemleri","type":"array","items":{"$ref":"#/components/schemas/CreateInvoiceExpenseItemDto"}},"description":{"type":"string","example":"Notlar","description":"Açıklama","maxLength":500},"payments":{"description":"Çoklu ödeme kalemleri","type":"array","items":{"$ref":"#/components/schemas/SinglePaymentDto"}},"paymentAccountId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Kasa/Banka Hesap ID (Peşin ödemede zorunlu - Tek hesap)"},"referencedInvoiceId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"İade edilen belge ID"},"partnerEventId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Partner-events idempotency token (internal — do not set from UI)"}},"required":["type","paymentType","issueDate","items","expenseItems","payments"]},"UpdateInvoiceDto":{"type":"object","properties":{"type":{"type":"string","enum":["SALES","PURCHASE","EXPENSE","SALES_RETURN","PURCHASE_RETURN"],"example":"SALES","description":"Belge tipi"},"paymentType":{"type":"string","enum":["CASH","CREDIT"],"example":"CASH","description":"Ödeme tipi"},"series":{"type":"string","example":"A","description":"Fatura seri (boş bırakılırsa otomatik, doldurulursa manuel mod)"},"sequenceNumber":{"type":"number","example":1,"description":"Manuel sıra numarası (series ile birlikte verilmelidir)"},"issueDate":{"type":"string","format":"date-time","example":"2024-01-15T00:00:00Z","description":"Düzenleme tarihi"},"totalDiscountRate":{"type":"number","example":5,"description":"Genel iskonto oranı (0-100)"},"dueDate":{"type":"string","format":"date-time","example":"2024-02-15T00:00:00Z","description":"Vade tarihi"},"customerId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Müşteri ID"},"supplierId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Tedarikçi ID"},"items":{"description":"Ürün kalemleri","type":"array","items":{"$ref":"#/components/schemas/CreateInvoiceItemDto"}},"expenseItems":{"description":"Gider kalemleri","type":"array","items":{"$ref":"#/components/schemas/CreateInvoiceExpenseItemDto"}},"description":{"type":"string","example":"Notlar","description":"Açıklama","maxLength":500},"payments":{"description":"Çoklu ödeme kalemleri","type":"array","items":{"$ref":"#/components/schemas/SinglePaymentDto"}},"paymentAccountId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Kasa/Banka Hesap ID (Peşin ödemede zorunlu - Tek hesap)"},"referencedInvoiceId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"İade edilen belge ID"},"partnerEventId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Partner-events idempotency token (internal — do not set from UI)"}}},"InvoicePaymentEntryDto":{"type":"object","properties":{"accountId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Kasa veya Banka Hesap ID"},"amount":{"type":"number","example":1000.5,"description":"Ödeme tutarı"},"currency":{"type":"string","example":"TRY","description":"Para birimi"}},"required":["accountId","amount","currency"]},"AddInvoicePaymentDto":{"type":"object","properties":{"payments":{"description":"Ödeme kalemleri","type":"array","items":{"$ref":"#/components/schemas/InvoicePaymentEntryDto"}},"externalReference":{"type":"string","example":"client-req-2026-04-15-abc123","description":"Opsiyonel istemci kaynaklı idempotency/doğal anahtar. Aynı (tenant, invoiceId, externalReference) kombinasyonu ile gelen ikinci istek DB unique constraint ile reddedilir. Çift ödeme/çift kayıt riskini önler."}},"required":["payments"]},"PreviewInvoiceLineDto":{"type":"object","properties":{"productId":{"type":"string","description":"Ürün ID (taslakta boş olabilir)"},"quantity":{"type":"number","example":1},"unitPrice":{"type":"string","format":"decimal","example":"100.0000","description":"Birim fiyat"},"taxRate":{"type":"number","example":20},"discountRate":{"type":"number","example":0},"withholdingCode":{"type":"object","example":"601"}},"required":["quantity","unitPrice"]},"PreviewExpenseLineDto":{"type":"object","properties":{"expenseItemId":{"type":"string"},"amount":{"type":"string","format":"decimal","example":"100.0000","description":"Tutar"}},"required":["amount"]},"PreviewInvoiceDto":{"type":"object","properties":{"type":{"type":"string","enum":["SALES","PURCHASE","EXPENSE","SALES_RETURN","PURCHASE_RETURN"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/PreviewInvoiceLineDto"}},"expenseItems":{"type":"array","items":{"$ref":"#/components/schemas/PreviewExpenseLineDto"}},"totalDiscountRate":{"type":"number","example":0,"description":"Genel iskonto % (0–100)"}},"required":["type"]},"InvoicePreviewLineResponseDto":{"type":"object","properties":{"taxBase":{"type":"number"},"vatAmount":{"type":"number"},"withholdingAmount":{"type":"number"},"lineTotal":{"type":"number"},"discountAmount":{"type":"number"}},"required":["taxBase","vatAmount","withholdingAmount","lineTotal","discountAmount"]},"InvoicePreviewExpenseLineResponseDto":{"type":"object","properties":{"amount":{"type":"number"}},"required":["amount"]},"InvoicePreviewResponseDto":{"type":"object","properties":{"subtotal":{"type":"number"},"totalDiscountAmount":{"type":"number"},"taxBaseTotal":{"type":"number"},"totalVatAmount":{"type":"number"},"totalWithholdingAmount":{"type":"number"},"totalAmount":{"type":"number"},"lineDiscountSum":{"type":"number","description":"Yalnızca satır iskontolarının toplamı"},"generalDiscountAmount":{"type":"number","description":"Genel iskonto tutarı"},"items":{"type":"array","items":{"$ref":"#/components/schemas/InvoicePreviewLineResponseDto"}},"expenseItems":{"type":"array","items":{"$ref":"#/components/schemas/InvoicePreviewExpenseLineResponseDto"}}},"required":["subtotal","totalDiscountAmount","taxBaseTotal","totalVatAmount","totalWithholdingAmount","totalAmount","lineDiscountSum","generalDiscountAmount","items","expenseItems"]},"TevkifatCodeDto":{"type":"object","properties":{"code":{"type":"string","example":"601","description":"Tevkifat kodu (3 hane)"},"label":{"type":"string","example":"Yapım İşleri... (3/10)","description":"Okunabilir etiket"},"numerator":{"type":"number","example":3,"description":"Oranın payı (numerator)"},"denominator":{"type":"number","example":10,"description":"Oranın paydası (denominator)"},"ratio":{"type":"number","example":0.3,"description":"Hesaplanmış oran (numerator/denominator)"}},"required":["code","label","numerator","denominator","ratio"]},"InvoiceBalanceDto":{"type":"object","properties":{"totalAmount":{"type":"string","format":"decimal","example":"1234.5600","description":"Fatura toplam tutarı"},"paidAmount":{"type":"string","format":"decimal","example":"1234.5600","description":"Ödenen tutar (ledger üzerinden hesaplanır)"},"remainingAmount":{"type":"string","format":"decimal","example":"1234.5600","description":"Kalan bakiye"},"isFullyPaid":{"type":"boolean","description":"Fatura tamamen ödendi mi"},"currency":{"type":"string","description":"Fatura para birimi (ISO 4217)"}},"required":["totalAmount","paidAmount","remainingAmount","isFullyPaid","currency"]},"InvoicePaymentResultDto":{"type":"object","properties":{"success":{"type":"boolean","description":"İşlem başarı durumu"},"transactionIds":{"description":"Oluşturulan ledger işlem (transaction) kimlikleri","type":"array","items":{"type":"string"}}},"required":["success","transactionIds"]},"WarehouseDto":{"type":"object","properties":{"id":{"type":"string","example":"ckx8l2k1s0000abc123xyz456","description":"ID"},"createdAt":{"type":"string","example":"2024-01-01T12:00:00.000Z","description":"Oluşturulma tarihi","format":"date-time"},"updatedAt":{"type":"string","example":"2024-01-01T12:05:00.000Z","description":"Güncellenme tarihi","format":"date-time"},"name":{"type":"string"},"code":{"type":"object"},"isDefault":{"type":"boolean"},"isActive":{"type":"boolean"}},"required":["id","createdAt","updatedAt","name","isDefault","isActive"]},"CreateWarehouseDto":{"type":"object","properties":{"name":{"type":"string","example":"Ana Depo"},"code":{"type":"string","example":"MAIN"},"isDefault":{"type":"boolean","description":"Marks default warehouse for the branch"},"isActive":{"type":"boolean"}},"required":["name"]},"UpdateWarehouseDto":{"type":"object","properties":{"name":{"type":"string","example":"Ana Depo"},"code":{"type":"string","example":"MAIN"},"isDefault":{"type":"boolean","description":"Marks default warehouse for the branch"},"isActive":{"type":"boolean"}}},"StockMovementsQueryDto":{"type":"object","properties":{"productId":{"type":"string","description":"Filter by product id"},"warehouseId":{"type":"string","description":"Filter by warehouse id"},"type":{"type":"string","enum":["OPENING","SALE","PURCHASE","RETURN","ADJUSTMENT","TRANSFER"],"description":"Movement type"},"startDate":{"type":"string","description":"Start date (ISO-8601)"},"endDate":{"type":"string","description":"End date (ISO-8601)"},"pageNumber":{"type":"number","description":"Page number","example":1,"minimum":1},"pageSize":{"type":"number","description":"Page size","example":20,"minimum":1}}},"ProductStockMovementsQueryDto":{"type":"object","properties":{"startDate":{"type":"string","description":"Start date (ISO-8601)"},"endDate":{"type":"string","description":"End date (ISO-8601)"},"warehouseId":{"type":"string","description":"Filter by warehouse id"},"pageNumber":{"type":"number","description":"Page number","example":1,"minimum":1},"pageSize":{"type":"number","description":"Page size","example":20,"minimum":1}}},"ProductStockSnapshotQueryDto":{"type":"object","properties":{"warehouseId":{"type":"string","description":"Filter by warehouse id"}}},"WarehouseStockBreakdownDto":{"type":"object","properties":{"warehouseId":{"type":"string"},"warehouseName":{"type":"string"},"quantity":{"type":"string","description":"Net quantity as decimal string"}},"required":["warehouseId","warehouseName","quantity"]},"ProductStockSnapshotDto":{"type":"object","properties":{"productId":{"type":"string"},"totalQuantity":{"type":"string","description":"Net quantity across branch warehouses"},"byWarehouse":{"type":"array","items":{"$ref":"#/components/schemas/WarehouseStockBreakdownDto"}}},"required":["productId","totalQuantity"]},"CreateManualStockMovementDto":{"type":"object","properties":{"productId":{"type":"string","format":"uuid"},"warehouseId":{"type":"string","format":"uuid"},"quantity":{"type":"number","example":1.25},"direction":{"type":"string","enum":["IN","OUT"],"example":"IN"},"type":{"type":"string","enum":["ADJUSTMENT","OPENING"],"default":"ADJUSTMENT"},"description":{"type":"string","description":"Manual operation note"}},"required":["productId","quantity","direction"]},"StockTransferLineDto":{"type":"object","properties":{"id":{"type":"string"},"productId":{"type":"string"},"quantity":{"type":"string"}},"required":["id","productId","quantity"]},"StockTransferDto":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"fromWarehouseId":{"type":"string"},"toWarehouseId":{"type":"string"},"status":{"type":"string","enum":["DRAFT","COMPLETED","CANCELLED"]},"note":{"type":"object"},"completedAt":{"type":"object"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/StockTransferLineDto"}}},"required":["id","createdAt","updatedAt","fromWarehouseId","toWarehouseId","status","lines"]},"StockTransferLineInputDto":{"type":"object","properties":{"productId":{"type":"string"},"quantity":{"type":"number","example":10}},"required":["productId","quantity"]},"CreateStockTransferDto":{"type":"object","properties":{"fromWarehouseId":{"type":"string"},"toWarehouseId":{"type":"string"},"note":{"type":"string"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/StockTransferLineInputDto"}}},"required":["fromWarehouseId","toWarehouseId","lines"]},"CreateProductDto":{"type":"object","properties":{"name":{"type":"string","example":"Laptop Dell XPS 15","description":"Product name"},"unit":{"type":"string","example":"adet","description":"Birim (adet, kg, saat, m², vb.)"},"unitPrice":{"type":"string","format":"decimal","example":"25000.0000","description":"Birim fiyat"},"trackStock":{"type":"boolean","example":true,"description":"Stok takibi yapılsın mı?"},"initialStock":{"type":"number","example":100,"description":"Açılış stok miktarı"},"barcode":{"type":"string","example":"8691234567890","description":"Barcode"},"defaultVatRate":{"type":"number","example":20,"description":"Default VAT Rate"},"defaultWithholdingCode":{"type":"string","example":"601","description":"Default Withholding Code"},"buyingPrice":{"type":"string","format":"decimal","example":"20000.0000","description":"Buying Price"}},"required":["name","unit"]},"UpdateProductDto":{"type":"object","properties":{"name":{"type":"string","example":"Laptop Dell XPS 15","description":"Product name"},"unit":{"type":"string","example":"adet","description":"Birim (adet, kg, saat, m², vb.)"},"unitPrice":{"type":"string","format":"decimal","example":"25000.0000","description":"Birim fiyat"},"trackStock":{"type":"boolean","example":true,"description":"Stok takibi yapılsın mı?"},"initialStock":{"type":"number","example":100,"description":"Açılış stok miktarı"},"barcode":{"type":"string","example":"8691234567890","description":"Barcode"},"defaultVatRate":{"type":"number","example":20,"description":"Default VAT Rate"},"defaultWithholdingCode":{"type":"string","example":"601","description":"Default Withholding Code"},"buyingPrice":{"type":"string","format":"decimal","example":"20000.0000","description":"Buying Price"},"isActive":{"type":"boolean","example":false,"description":"Active status (for soft delete)"}}},"AccountSearchDto":{"type":"object","properties":{"pageNumber":{"type":"number","description":"Sayfa numarası","example":1,"minimum":1},"pageSize":{"type":"number","description":"Sayfa başına gösterilecek kayıt sayısı","example":10,"minimum":1},"search":{"type":"string","description":"Arama metni","example":"john"},"status":{"type":"string","enum":["ACTIVE","PASSIVE","ALL"],"description":"Filter by status using SSOT model (ACTIVE, PASSIVE, ALL)","default":"ACTIVE"},"isDefault":{"type":"boolean","description":"Varsayılan hesapları filtrele"}},"required":["pageNumber","pageSize"]},"CreateExpenseItemDto":{"type":"object","properties":{"name":{"type":"string","example":"Ofis Kira Gideri","description":"Expense item name"},"description":{"type":"string","example":"Aylık ofis kira ödemesi","description":"Gider kalemi açıklaması"}},"required":["name"]},"UpdateExpenseItemDto":{"type":"object","properties":{"name":{"type":"string","example":"Ofis Kira Gideri","description":"Expense item name"},"description":{"type":"string","example":"Aylık ofis kira ödemesi","description":"Gider kalemi açıklaması"},"isActive":{"type":"boolean","example":false,"description":"Active status (for soft delete)"}}},"CreateTransactionDto":{"type":"object","properties":{"direction":{"type":"string","example":"OUT","enum":["IN","OUT"],"description":"Transaction direction"},"accountId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Account ID"},"counterAccountId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Counter Account ID (optional side)","nullable":true},"amount":{"type":"string","format":"decimal","example":"1000.5000","description":"Transaction amount"},"currency":{"type":"string","example":"TRY","description":"Currency code","default":"TRY"},"type":{"type":"string","example":"COLLECTION","enum":["COLLECTION","PAYMENT","TRANSFER","ADJUSTMENT","OPENING_BALANCE","CREDIT_CARD_EXPENSE","CREDIT_CARD_REFUND"],"description":"Transaction type: COLLECTION, PAYMENT, TRANSFER, ADJUSTMENT"},"description":{"type":"string","example":"Payment for service","description":"Transaction description"},"referenceNo":{"type":"string","example":"REF-123456","description":"Reference Number"},"sourceId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Optional Source ID (e.g. Invoice ID)"},"source":{"type":"string","example":"MANUAL","enum":["MANUAL","INVOICE","SYSTEM"],"description":"Transaction source","default":"MANUAL"},"date":{"type":"string","example":"2023-10-27T10:00:00.000Z","description":"Transaction date","format":"date-time"},"partnerEventId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Partner-events idempotency token (internal — do not set from UI)"}},"required":["direction","accountId","amount","type"]},"UpdateTransactionDto":{"type":"object","properties":{"direction":{"type":"string","example":"OUT","enum":["IN","OUT"],"description":"Transaction direction"},"accountId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Account ID"},"counterAccountId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Counter Account ID (optional side)","nullable":true},"amount":{"type":"string","format":"decimal","example":"1000.5000","description":"Transaction amount"},"currency":{"type":"string","example":"TRY","description":"Currency code","default":"TRY"},"type":{"type":"string","example":"COLLECTION","enum":["COLLECTION","PAYMENT","TRANSFER","ADJUSTMENT","OPENING_BALANCE","CREDIT_CARD_EXPENSE","CREDIT_CARD_REFUND"],"description":"Transaction type: COLLECTION, PAYMENT, TRANSFER, ADJUSTMENT"},"description":{"type":"string","example":"Payment for service","description":"Transaction description"},"referenceNo":{"type":"string","example":"REF-123456","description":"Reference Number"},"sourceId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Optional Source ID (e.g. Invoice ID)"},"source":{"type":"string","example":"MANUAL","enum":["MANUAL","INVOICE","SYSTEM"],"description":"Transaction source","default":"MANUAL"},"date":{"type":"string","example":"2023-10-27T10:00:00.000Z","description":"Transaction date","format":"date-time"},"partnerEventId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Partner-events idempotency token (internal — do not set from UI)"}}},"BulkDeleteTransactionsDto":{"type":"object","properties":{"ids":{"description":"Silinecek işlem ID listesi","example":["550e8400-e29b-41d4-a716-446655440000"],"type":"array","items":{"type":"string"}}},"required":["ids"]},"BulkDeleteResultDto":{"type":"object","properties":{"deletedCount":{"type":"number","description":"Silinen işlem sayısı"},"skippedIds":{"description":"Silinemeyen (bulunamayan veya koruma altında olan) işlem ID listesi","type":"array","items":{"type":"string"}}},"required":["deletedCount","skippedIds"]},"PeriodRangeDto":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"required":["from","to"]},"PeriodFinancialTotalsDto":{"type":"object","properties":{"income":{"type":"string","format":"decimal","example":"1234.5600","description":"Income total (sales - sales returns)"},"expense":{"type":"string","format":"decimal","example":"1234.5600","description":"Expense total (purchase + expense - purchase returns)"},"net":{"type":"string","format":"decimal","example":"1234.5600","description":"Net result (income - expense)"}},"required":["income","expense","net"]},"PeriodCashFlowDto":{"type":"object","properties":{"collections":{"type":"string","format":"decimal","example":"1234.5600","description":"Collections (cash/bank IN)"},"payments":{"type":"string","format":"decimal","example":"1234.5600","description":"Payments (cash/bank OUT)"},"net":{"type":"string","format":"decimal","example":"1234.5600","description":"Net cash movement"}},"required":["collections","payments","net"]},"PeriodSummaryDto":{"type":"object","properties":{"period":{"$ref":"#/components/schemas/PeriodRangeDto"},"financial":{"$ref":"#/components/schemas/PeriodFinancialTotalsDto"},"cashFlow":{"$ref":"#/components/schemas/PeriodCashFlowDto"},"invoiceStats":{"type":"object","description":"Per-invoice-type aggregates (sales, purchases, returns, expense)","additionalProperties":{"$ref":"#/components/schemas/PeriodInvoiceSegmentDto"}},"dailyTrend":{"type":"array","description":"Daily trend buckets","items":{"type":"object"}},"stockMovements":{"type":"object","description":"Stock movement aggregates","additionalProperties":{}},"transactions":{"type":"object","description":"Detailed transaction aggregates","additionalProperties":{}},"creditSales":{"type":"object","description":"Credit sales (open receivables)","additionalProperties":{}},"creditPurchases":{"type":"object","description":"Credit purchases (open payables)","additionalProperties":{}}},"required":["period","financial","cashFlow","invoiceStats","dailyTrend","stockMovements","transactions","creditSales","creditPurchases"]},"PeriodInvoiceSegmentDto":{"type":"object","properties":{"count":{"type":"number","description":"Belge sayısı"},"total":{"type":"string","format":"decimal","example":"1234.5600","description":"Toplam tutar"}},"required":["count","total"]},"SummarySnapshotDto":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"fromDate":{"type":"string","format":"date-time"},"toDate":{"type":"string","format":"date-time"},"branchId":{"type":"string"},"createdBy":{"type":"string","nullable":true},"creator":{"type":"object","description":"Creator metadata (fullName)","additionalProperties":{},"nullable":true},"data":{"type":"object","description":"Serialized summary payload + metadata","additionalProperties":{}},"branch":{"type":"object","description":"Branch minimal info","additionalProperties":{},"nullable":true},"tenant":{"type":"object","description":"Tenant minimal info","additionalProperties":{},"nullable":true}},"required":["id","createdAt","fromDate","toDate","branchId","data"]},"SummarySnapshotListItemDto":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"fromDate":{"type":"string","format":"date-time"},"toDate":{"type":"string","format":"date-time"},"branchId":{"type":"string"},"createdBy":{"type":"string","nullable":true},"creator":{"type":"object","description":"Creator metadata (fullName)","additionalProperties":{},"nullable":true}},"required":["id","createdAt","fromDate","toDate","branchId"]},"CreateSummarySnapshotDto":{"type":"object","properties":{"beginDate":{"type":"string","description":"Dönem başlangıç tarihi (ISO 8601)","example":"2026-01-01T00:00:00.000Z"},"endDate":{"type":"string","description":"Dönem bitiş tarihi (ISO 8601)","example":"2026-01-31T23:59:59.999Z"}},"required":["beginDate","endDate"]},"CreateSupplierDto":{"type":"object","properties":{"name":{"type":"string","example":"Global Logistics","description":"Supplier name"},"phone":{"type":"string","example":"+905551112233","description":"Tedarikçi telefon numarası"},"contactPerson":{"type":"string","example":"Jane Doe","description":"İlgili kişi adı"},"address":{"type":"string","example":"123 Business St, Istanbul","description":"Tedarikçi adresi"},"taxNumber":{"type":"string","example":"1234567890","description":"VKN"},"taxOffice":{"type":"string","example":"Büyük Mükellefler","description":"Vergi dairesi"},"city":{"type":"string","example":"İstanbul","description":"Şehir"},"country":{"type":"string","example":"Türkiye","description":"Ülke"},"postalCode":{"type":"string","example":"34000","description":"Posta kodu"},"district":{"type":"string","example":"Kadıköy","description":"İlçe"},"status":{"type":"string","enum":["ACTIVE","PASSIVE"],"example":"ACTIVE","description":"Hesap durumu"},"openingBalance":{"type":"string","format":"decimal","example":"1000.0000","description":"Açılış bakiyesi"},"openingDate":{"type":"string","example":"2024-01-01T00:00:00.000Z","description":"Açılış tarihi","format":"date-time"},"openingBalanceType":{"type":"string","example":"CREDIT","description":"Bakiye yönü (CREDIT = Alacaklı, DEBIT = Borçlu)","enum":["DEBIT","CREDIT"]},"isOpeningBalance":{"type":"boolean","description":"Whether to add an opening balance","default":false},"balanceType":{"type":"string","description":"UI balance type","enum":["debt","credit"]},"isActive":{"type":"boolean","description":"Whether the account is active","default":true}},"required":["name"]},"UpdateSupplierDto":{"type":"object","properties":{"name":{"type":"string","example":"Global Logistics","description":"Supplier name"},"phone":{"type":"string","example":"+905551112233","description":"Tedarikçi telefon numarası"},"contactPerson":{"type":"string","example":"Jane Doe","description":"İlgili kişi adı"},"address":{"type":"string","example":"123 Business St, Istanbul","description":"Tedarikçi adresi"},"taxNumber":{"type":"string","example":"1234567890","description":"VKN"},"taxOffice":{"type":"string","example":"Büyük Mükellefler","description":"Vergi dairesi"},"city":{"type":"string","example":"İstanbul","description":"Şehir"},"country":{"type":"string","example":"Türkiye","description":"Ülke"},"postalCode":{"type":"string","example":"34000","description":"Posta kodu"},"district":{"type":"string","example":"Kadıköy","description":"İlçe"},"status":{"type":"string","enum":["ACTIVE","PASSIVE"],"example":"ACTIVE","description":"Hesap durumu"},"openingBalance":{"type":"string","format":"decimal","example":"1000.0000","description":"Açılış bakiyesi"},"openingDate":{"type":"string","example":"2024-01-01T00:00:00.000Z","description":"Açılış tarihi","format":"date-time"},"openingBalanceType":{"type":"string","example":"CREDIT","description":"Bakiye yönü (CREDIT = Alacaklı, DEBIT = Borçlu)","enum":["DEBIT","CREDIT"]},"isOpeningBalance":{"type":"boolean","description":"Whether to add an opening balance","default":false},"balanceType":{"type":"string","description":"UI balance type","enum":["debt","credit"]},"isActive":{"type":"boolean","description":"Whether the account is active","default":true}}},"CreatePaymentPlanItemDto":{"type":"object","properties":{"dueDate":{"type":"string","description":"Due date of the installment","example":"2024-05-01"},"amount":{"type":"string","format":"decimal","example":"1000.0000","description":"Amount of the installment"},"description":{"type":"string","description":"Description of the installment"}},"required":["dueDate","amount"]},"CreatePaymentPlanDto":{"type":"object","properties":{"name":{"type":"string","description":"Name of the payment plan","example":"2024 Device Plan"},"description":{"type":"string","description":"General description of the plan"},"items":{"type":"array","items":{"$ref":"#/components/schemas/CreatePaymentPlanItemDto"}}},"required":["name","items"]},"UpdatePaymentPlanDto":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}}},"PaymentPlanItemDto":{"type":"object","properties":{"id":{"type":"string"},"dueDate":{"format":"date-time","type":"string"},"amount":{"type":"string","format":"decimal","example":"1234.5600"},"description":{"type":"string"},"status":{"type":"string","enum":["PAID","PENDING"],"description":"UI intent only — not authoritative for financial state."},"paidAt":{"format":"date-time","type":"string"},"transactionId":{"type":"string","description":"Active confirming Transaction id. Non-null ⇒ ledger entry exists. Unique per item.","nullable":true},"reversedTransactionId":{"type":"string","description":"Audit link to the reversing Transaction when this item has been reverted.","nullable":true},"paymentConfirmedAt":{"format":"date-time","type":"string","description":"Timestamp of the most recent confirmation.","nullable":true}},"required":["id","dueDate","amount","status"]},"PaymentPlanStatsDto":{"type":"object","properties":{"totalItems":{"type":"number"},"paidCount":{"type":"number"},"pendingCount":{"type":"number"},"progressPercentage":{"type":"number"}},"required":["totalItems","paidCount","pendingCount","progressPercentage"]},"PaymentPlanDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"totalAmount":{"type":"string","format":"decimal","example":"1234.5600"},"startDate":{"format":"date-time","type":"string"},"endDate":{"format":"date-time","type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PaymentPlanItemDto"}},"stats":{"$ref":"#/components/schemas/PaymentPlanStatsDto"}},"required":["id","name","totalAmount","startDate","endDate","items","stats"]},"ImportResultErrorDto":{"type":"object","properties":{"rowNumber":{"type":"number"},"errorMessage":{"type":"string"}},"required":["rowNumber","errorMessage"]},"ImportResultDto":{"type":"object","properties":{"successCount":{"type":"number"},"failedCount":{"type":"number"},"totalCount":{"type":"number"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ImportResultErrorDto"}}},"required":["successCount","failedCount","totalCount","errors"]},"ConfirmPaymentResponseDto":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/PaymentPlanItemDto"},"transactionId":{"type":"string","description":"Active confirming transaction id."},"skipped":{"type":"boolean","description":"True when the item was already confirmed (idempotent no-op)."}},"required":["item","transactionId","skipped"]},"RevertPaymentResponseDto":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/PaymentPlanItemDto"},"reversedTransactionId":{"type":"string","description":"Id of the reversing Transaction row, when one was written.","nullable":true},"skipped":{"type":"boolean","description":"True when there was nothing to revert (idempotent no-op)."}},"required":["item","skipped"]},"PaymentPlanImportDetectedMappingDto":{"type":"object","properties":{"title":{"type":"string"},"amount":{"type":"string"},"dueDate":{"type":"string"},"category":{"type":"string"}}},"PaymentPlanImportPreviewRowDto":{"type":"object","properties":{"rowIndex":{"type":"number"},"dueDate":{"type":"string","nullable":true},"amount":{"type":"number"},"title":{"type":"string"},"category":{"type":"string"},"error":{"type":"string"}},"required":["rowIndex","dueDate","amount","title"]},"PaymentPlanImportPreviewResponseDto":{"type":"object","properties":{"fingerprint":{"type":"string"},"sheetName":{"type":"string"},"headers":{"type":"array","items":{"type":"string"}},"detectedMapping":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/PaymentPlanImportDetectedMappingDto"}]},"needsMapping":{"type":"boolean"},"preview":{"type":"array","items":{"$ref":"#/components/schemas/PaymentPlanImportPreviewRowDto"}},"templateName":{"type":"string","nullable":true}},"required":["fingerprint","sheetName","headers","detectedMapping","needsMapping","preview","templateName"]},"PaymentPlanImportConfirmResponseDto":{"type":"object","properties":{"createdCount":{"type":"number"},"planId":{"type":"string","nullable":true},"createdTemplateId":{"type":"string","nullable":true}},"required":["createdCount","planId","createdTemplateId"]},"PaymentPlanImportMappingDto":{"type":"object","properties":{"title":{"type":"string","description":"Başlık (title) sütunu"},"amount":{"type":"string","description":"Tutar (amount) sütunu"},"dueDate":{"type":"string","description":"Vade tarihi (due date) sütunu"},"category":{"type":"string","description":"Kategori (category) sütunu (opsiyonel)"}}},"PaymentPlanImportPreviewDto":{"type":"object","properties":{"file":{"type":"string","description":"Dosya base64"},"sheetName":{"type":"string","description":"Sayfa adı"},"mapping":{"description":"Manuel eşleştirme. Verilirse auto-detect yerine bu kullanılır.","allOf":[{"$ref":"#/components/schemas/PaymentPlanImportMappingDto"}]}},"required":["file"]},"PaymentPlanImportConfirmDto":{"type":"object","properties":{"name":{"type":"string","description":"Ödeme planı adı"},"description":{"type":"string","description":"Genel açıklama"},"fingerprint":{"type":"string","description":"Fingerprint"},"mapping":{"$ref":"#/components/schemas/PaymentPlanImportMappingDto"},"sheetName":{"type":"string","description":"Sayfa adı"},"templateName":{"type":"string","description":"Şablon adı (yeni kaydedilecekse)"},"saveTemplate":{"type":"boolean","description":"Şablon kaydedilsin mi?"},"fileBase64":{"type":"string","description":"Dosya base64 (re-parse için)"},"rowIndexes":{"description":"Onaylanan satır indeksleri","type":"array","items":{"type":"number"}}},"required":["name","fingerprint","mapping","fileBase64","rowIndexes"]},"ConfirmPaymentDto":{"type":"object","properties":{"sourceAccountId":{"type":"string","description":"Source account (cash / bank) paying the installment","example":"00000000-0000-0000-0000-000000000000"},"date":{"type":"string","description":"Payment date (YYYY-MM-DD). Defaults to now.","example":"2026-04-19"}},"required":["sourceAccountId"]},"UpdatePaymentPlanItemDto":{"type":"object","properties":{"dueDate":{"type":"string","description":"Due date of the installment","example":"2024-05-01"},"amount":{"type":"string","format":"decimal","example":"1000.0000","description":"Amount of the installment"},"description":{"type":"string","description":"Description of the installment"}}},"EmployeeDto":{"type":"object","properties":{"id":{"type":"string","example":"ckx8l2k1s0000abc123xyz456","description":"ID"},"createdAt":{"type":"string","example":"2024-01-01T12:00:00.000Z","description":"Oluşturulma tarihi","format":"date-time"},"updatedAt":{"type":"string","example":"2024-01-01T12:05:00.000Z","description":"Güncellenme tarihi","format":"date-time"},"tenantId":{"type":"string","description":"Tenant ID"},"branchId":{"type":"string","description":"Branch ID"},"accountId":{"type":"string","description":"Account ID"},"name":{"type":"string","description":"Employee Name"},"phone":{"type":"string","description":"Phone Number"},"dailyWage":{"type":"string","format":"decimal","example":"1234.5600","description":"Daily Wage"},"startDate":{"type":"string","description":"Start Date","format":"date-time"},"isActive":{"type":"boolean","description":"Is Active"},"balance":{"type":"string","format":"decimal","example":"1234.5600","description":"Derived balance (SUM IN - SUM OUT)"},"departmentId":{"type":"string","description":"Department ID"},"title":{"type":"string","description":"Pozisyon / Ünvan"},"employmentType":{"type":"string","description":"Çalışma tipi","enum":["FULL_TIME","PART_TIME","CONTRACT"]},"employeeStatus":{"type":"string","description":"Çalışan durumu","enum":["ACTIVE","PASSIVE","ON_LEAVE"]},"hireDate":{"type":"string","description":"İşe giriş tarihi","format":"date-time"},"terminationDate":{"type":"string","description":"İşten çıkış tarihi","format":"date-time"}},"required":["id","createdAt","updatedAt","tenantId","branchId","accountId","name","dailyWage","startDate","isActive"]},"CreateEmployeeDto":{"type":"object","properties":{"name":{"type":"string","example":"John Doe","description":"Employee full name"},"phone":{"type":"string","example":"+905550001122","description":"Personel telefon numarası"},"dailyWage":{"type":"string","format":"decimal","example":"250.0000","description":"Yevmiye tutarı"},"startDate":{"type":"string","example":"2023-01-01","description":"İşe giriş tarihi","format":"date-time"},"status":{"type":"string","enum":["ACTIVE","PASSIVE"],"example":"ACTIVE","description":"Hesap durumu"},"openingBalance":{"type":"string","format":"decimal","example":"1000.0000","description":"Açılış bakiyesi"},"openingDate":{"type":"string","example":"2024-01-01T00:00:00.000Z","description":"Açılış tarihi","format":"date-time"},"openingBalanceType":{"type":"string","example":"CREDIT","description":"Bakiye yönü (CREDIT = Alacaklı, DEBIT = Borçlu)","enum":["DEBIT","CREDIT"]},"isOpeningBalance":{"type":"boolean","description":"Whether to add an opening balance","default":false},"balanceType":{"type":"string","description":"UI balance type","enum":["debt","credit"]},"isActive":{"type":"boolean","description":"Whether the account is active","default":true},"departmentId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Department ID"},"title":{"type":"string","example":"Muhasebe Uzmanı","description":"Pozisyon / Ünvan"},"employmentType":{"type":"string","enum":["FULL_TIME","PART_TIME","CONTRACT"],"example":"FULL_TIME","description":"Çalışma tipi"},"employeeStatus":{"type":"string","enum":["ACTIVE","PASSIVE","ON_LEAVE"],"example":"ACTIVE","description":"Çalışan durumu"},"hireDate":{"type":"string","example":"2023-01-01","description":"İşe giriş tarihi","format":"date-time"},"terminationDate":{"type":"string","example":"2024-12-31","description":"İşten çıkış tarihi","format":"date-time"}},"required":["name","dailyWage"]},"UpdateEmployeeDto":{"type":"object","properties":{"name":{"type":"string","example":"John Doe","description":"Employee full name"},"phone":{"type":"string","example":"+905550001122","description":"Personel telefon numarası"},"dailyWage":{"type":"string","format":"decimal","example":"250.0000","description":"Yevmiye tutarı"},"startDate":{"type":"string","example":"2023-01-01","description":"İşe giriş tarihi","format":"date-time"},"status":{"type":"string","enum":["ACTIVE","PASSIVE"],"example":"ACTIVE","description":"Hesap durumu"},"openingBalance":{"type":"string","format":"decimal","example":"1000.0000","description":"Açılış bakiyesi"},"openingDate":{"type":"string","example":"2024-01-01T00:00:00.000Z","description":"Açılış tarihi","format":"date-time"},"openingBalanceType":{"type":"string","example":"CREDIT","description":"Bakiye yönü (CREDIT = Alacaklı, DEBIT = Borçlu)","enum":["DEBIT","CREDIT"]},"isOpeningBalance":{"type":"boolean","description":"Whether to add an opening balance","default":false},"balanceType":{"type":"string","description":"UI balance type","enum":["debt","credit"]},"isActive":{"type":"boolean","description":"Whether the account is active","default":true},"departmentId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Department ID"},"title":{"type":"string","example":"Muhasebe Uzmanı","description":"Pozisyon / Ünvan"},"employmentType":{"type":"string","enum":["FULL_TIME","PART_TIME","CONTRACT"],"example":"FULL_TIME","description":"Çalışma tipi"},"employeeStatus":{"type":"string","enum":["ACTIVE","PASSIVE","ON_LEAVE"],"example":"ACTIVE","description":"Çalışan durumu"},"hireDate":{"type":"string","example":"2023-01-01","description":"İşe giriş tarihi","format":"date-time"},"terminationDate":{"type":"string","example":"2024-12-31","description":"İşten çıkış tarihi","format":"date-time"}}},"CreateEmployeeTransactionDto":{"type":"object","properties":{"type":{"type":"string","example":"DAILY_WAGE","description":"Transaction type","enum":["DAILY_WAGE","ADVANCE_PAYMENT","EXPENSE_REIMBURSE","ADJUSTMENT"]},"amount":{"type":"string","format":"decimal","example":"100.0000","description":"İşlem tutarı"},"date":{"type":"string","example":"2024-01-01T00:00:00.000Z","description":"İşlem tarihi","format":"date-time"},"description":{"type":"string","example":"Günlük yevmiye ödemesi","description":"İşlem açıklaması"},"direction":{"type":"string","example":"CREDIT","description":"İşlem yönü (DEBIT = Borç, CREDIT = Alacak)","enum":["DEBIT","CREDIT"]}},"required":["type","amount","date"]},"UpdateEmployeeTransactionDto":{"type":"object","properties":{"type":{"type":"string","example":"DAILY_WAGE","description":"Transaction type","enum":["DAILY_WAGE","ADVANCE_PAYMENT","EXPENSE_REIMBURSE","ADJUSTMENT"]},"amount":{"type":"string","format":"decimal","example":"100.0000","description":"İşlem tutarı"},"date":{"type":"string","example":"2024-01-01T00:00:00.000Z","description":"İşlem tarihi","format":"date-time"},"description":{"type":"string","example":"Günlük yevmiye ödemesi","description":"İşlem açıklaması"},"direction":{"type":"string","example":"CREDIT","description":"İşlem yönü (DEBIT = Borç, CREDIT = Alacak)","enum":["DEBIT","CREDIT"]}}},"EmployeeLedgerItemDto":{"type":"object","properties":{"id":{"type":"string","description":"ID"},"date":{"type":"string","description":"Date","format":"date-time"},"type":{"type":"string","description":"Type"},"labelTr":{"type":"string","description":"Label (Turkish)"},"descriptionTr":{"type":"string","description":"Description (Turkish)"},"amount":{"type":"string","format":"decimal","example":"1234.5600","description":"Amount"},"direction":{"type":"string","description":"Direction","enum":["DEBIT","CREDIT"]},"source":{"type":"string","description":"Source (Transaction)"},"balance":{"type":"string","format":"decimal","example":"1234.5600","description":"Running balance after this transaction"},"displayType":{"type":"string","description":"User-facing display type"},"displayLabel":{"type":"string","description":"Short user-facing label"},"displayDescription":{"type":"string","description":"Human-readable explanation"}},"required":["id","date","type","labelTr","descriptionTr","amount","direction","source","displayType","displayLabel","displayDescription"]},"EmployeeLedgerSummaryDto":{"type":"object","properties":{"totalWage":{"type":"string","format":"decimal","example":"1234.5600","description":"Total Wage"},"totalExpense":{"type":"string","format":"decimal","example":"1234.5600","description":"Total Expense"},"totalAdvance":{"type":"string","format":"decimal","example":"1234.5600","description":"Total Advance"},"balance":{"type":"string","format":"decimal","example":"1234.5600","description":"Current Balance"}},"required":["totalWage","totalExpense","totalAdvance","balance"]},"EmployeeLookupQueryDto":{"type":"object","properties":{"search":{"type":"string","description":"Arama metni"}}},"DepartmentDto":{"type":"object","properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"branchId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"managerEmployeeId":{"type":"string"},"isActive":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","tenantId","branchId","name","isActive","createdAt","updatedAt"]},"CreateDepartmentDto":{"type":"object","properties":{"name":{"type":"string","example":"Muhasebe","description":"Department name"},"description":{"type":"string","example":"Muhasebe ve finans departmanı","description":"Department description"},"managerEmployeeId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Manager employee ID"},"isActive":{"type":"boolean","description":"Whether the department is active","default":true}},"required":["name"]},"UpdateDepartmentDto":{"type":"object","properties":{"name":{"type":"string","example":"Muhasebe","description":"Department name"},"description":{"type":"string","example":"Muhasebe ve finans departmanı","description":"Department description"},"managerEmployeeId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Manager employee ID"},"isActive":{"type":"boolean","description":"Whether the department is active","default":true}}},"LeaveDto":{"type":"object","properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"branchId":{"type":"string"},"employeeId":{"type":"string"},"startDate":{"format":"date-time","type":"string"},"endDate":{"format":"date-time","type":"string"},"type":{"type":"string","enum":["PAID","UNPAID","ANNUAL","SICK","OTHER"]},"status":{"type":"string","enum":["PENDING","APPROVED","REJECTED"]},"approverId":{"type":"string"},"note":{"type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["id","tenantId","branchId","employeeId","startDate","endDate","type","status","createdAt"]},"CreateLeaveDto":{"type":"object","properties":{"employeeId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Employee ID"},"startDate":{"type":"string","example":"2023-11-01","description":"Start date of the leave"},"endDate":{"type":"string","example":"2023-11-05","description":"End date of the leave"},"type":{"type":"string","example":"PAID","enum":["PAID","UNPAID","ANNUAL","SICK","OTHER"],"description":"Type of leave (PAID, UNPAID, ANNUAL, SICK, OTHER)"},"note":{"type":"string","example":"Yıllık izin talebi","description":"Note for the leave request"}},"required":["employeeId","startDate","endDate","type"]},"UpdateLeaveDto":{"type":"object","properties":{"employeeId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Employee ID"},"startDate":{"type":"string","example":"2023-11-01","description":"Start date of the leave"},"endDate":{"type":"string","example":"2023-11-05","description":"End date of the leave"},"type":{"type":"string","example":"PAID","enum":["PAID","UNPAID","ANNUAL","SICK","OTHER"],"description":"Type of leave (PAID, UNPAID, ANNUAL, SICK, OTHER)"},"note":{"type":"string","example":"Yıllık izin talebi","description":"Note for the leave request"}}},"ApproveLeaveDto":{"type":"object","properties":{"note":{"type":"string","example":"Onaylandı","description":"Approval note"}}},"RejectLeaveDto":{"type":"object","properties":{"note":{"type":"string","example":"Reddedildi - uygun tarih yok","description":"Rejection reason"}}},"WorkDayDto":{"type":"object","properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"branchId":{"type":"string"},"employeeId":{"type":"string"},"date":{"format":"date-time","type":"string"},"worked":{"type":"boolean"},"amount":{"type":"string","format":"decimal","example":"1234.5600"},"createdAt":{"format":"date-time","type":"string"}},"required":["id","tenantId","branchId","employeeId","date","worked","amount","createdAt"]},"CreateWorkDayDto":{"type":"object","properties":{"employeeId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Employee ID"},"date":{"type":"string","example":"2023-10-27","description":"Work date"},"worked":{"type":"boolean","example":true,"description":"Whether the employee worked on this date"},"amount":{"type":"string","format":"decimal","example":"250.0000","description":"Amount earned for this day (defaults to employee daily wage)"}},"required":["employeeId","date","worked","amount"]},"UpdateWorkDayDto":{"type":"object","properties":{"employeeId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Employee ID"},"date":{"type":"string","example":"2023-10-27","description":"Work date"},"worked":{"type":"boolean","example":true,"description":"Whether the employee worked on this date"},"amount":{"type":"string","format":"decimal","example":"250.0000","description":"Amount earned for this day (defaults to employee daily wage)"}}},"WorkDaysListQueryDto":{"type":"object","properties":{"startDate":{"type":"string","description":"Başlangıç tarihi (ISO-8601)"},"endDate":{"type":"string","description":"Bitiş tarihi (ISO-8601)"}}},"EmployeeDocumentDto":{"type":"object","properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"branchId":{"type":"string"},"employeeId":{"type":"string"},"fileName":{"type":"string"},"fileUrl":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"number"},"category":{"type":"string","enum":["CONTRACT","ID_DOCUMENT","CERTIFICATE","HEALTH_REPORT","PAYSLIP","OTHER"]},"uploadedBy":{"type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["id","tenantId","branchId","employeeId","fileName","fileUrl","mimeType","sizeBytes","category","uploadedBy","createdAt"]},"UploadEmployeeDocumentDto":{"type":"object","properties":{"employeeId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Employee ID"},"category":{"type":"string","example":"CONTRACT","enum":["CONTRACT","ID_DOCUMENT","CERTIFICATE","HEALTH_REPORT","PAYSLIP","OTHER"],"description":"Document category"}},"required":["employeeId"]},"EmployeeNoteDto":{"type":"object","properties":{"id":{"type":"string"},"employeeId":{"type":"string"},"content":{"type":"string"},"createdByUserId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","employeeId","content","createdAt","updatedAt"]},"CreateEmployeeNoteDto":{"type":"object","properties":{"employeeId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Employee ID"},"content":{"type":"string","example":"Çalışan performans değerlendirmesi yapıldı.","description":"Note content"}},"required":["employeeId","content"]},"UpdateEmployeeNoteDto":{"type":"object","properties":{"content":{"type":"string","example":"Güncellenmiş not içeriği","description":"Updated note content"}},"required":["content"]},"EmployeeTransactionSummaryDto":{"type":"object","properties":{"totalWage":{"type":"string","format":"decimal","example":"1234.5600","description":"Total Wage"},"totalExpense":{"type":"string","format":"decimal","example":"1234.5600","description":"Total Expense"},"totalAdvance":{"type":"string","format":"decimal","example":"1234.5600","description":"Total Advance"},"balance":{"type":"string","format":"decimal","example":"1234.5600","description":"Current Balance"}},"required":["totalWage","totalExpense","totalAdvance","balance"]},"FinancialFlowDto":{"type":"object","properties":{"income":{"type":"number"},"expense":{"type":"number"},"net":{"type":"number"},"collections":{"type":"number"},"payments":{"type":"number"}},"required":["income","expense","net","collections","payments"]},"AccountBalanceDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"currency":{"type":"string"},"balance":{"type":"number"}},"required":["id","name","currency","balance"]},"AccountBalancesDto":{"type":"object","properties":{"cashAccounts":{"type":"array","items":{"$ref":"#/components/schemas/AccountBalanceDto"}},"bankAccounts":{"type":"array","items":{"$ref":"#/components/schemas/AccountBalanceDto"}},"customerBalances":{"type":"array","items":{"$ref":"#/components/schemas/AccountBalanceDto"}},"supplierBalances":{"type":"array","items":{"$ref":"#/components/schemas/AccountBalanceDto"}}},"required":["cashAccounts","bankAccounts","customerBalances","supplierBalances"]},"InventoryReportDto":{"type":"object","properties":{"stockIn":{"type":"number"},"stockOut":{"type":"number"},"endingStock":{"type":"number"}},"required":["stockIn","stockOut","endingStock"]},"UnifiedFinancialReportDto":{"type":"object","properties":{"period":{"type":"object"},"flow":{"$ref":"#/components/schemas/FinancialFlowDto"},"balances":{"$ref":"#/components/schemas/AccountBalancesDto"},"inventory":{"$ref":"#/components/schemas/InventoryReportDto"}},"required":["period","flow","balances","inventory"]},"ProductSalesReportDto":{"type":"object","properties":{"totalQuantity":{"type":"string","description":"Net satış miktarı (satış − iade)","example":"125.5"},"totalAmount":{"type":"string","description":"Net satış tutarı satır toplamları (satış − iade), TRY","example":"15420.75"}},"required":["totalQuantity","totalAmount"]},"CustomerReportExportQueryDto":{"type":"object","properties":{"customerId":{"type":"string","description":"Müşteri ID","format":"uuid"},"startDate":{"type":"string","example":"2024-01-01","description":"Başlangıç tarihi (ISO 8601)"},"endDate":{"type":"string","example":"2024-01-31","description":"Bitiş tarihi (ISO 8601)"}},"required":["customerId"]},"SupplierReportExportQueryDto":{"type":"object","properties":{"supplierId":{"type":"string","description":"Supplier ID"},"startDate":{"type":"string","description":"Start Date"},"endDate":{"type":"string","description":"End Date"}},"required":["supplierId"]},"CashFlowPeriodItemDto":{"type":"object","properties":{"period":{"type":"string","description":"Periyot etiketi (ör: \"2026-04\" veya \"2026-W14\" veya \"2026-04-15\")"},"income":{"type":"string","format":"decimal","example":"1234.5600","description":"Dönem gelir toplamı"},"expense":{"type":"string","format":"decimal","example":"1234.5600","description":"Dönem gider toplamı"},"net":{"type":"string","format":"decimal","example":"1234.5600","description":"Dönem net (gelir - gider)"}},"required":["period","income","expense","net"]},"CashFlowTotalsDto":{"type":"object","properties":{"totalIncome":{"type":"string","format":"decimal","example":"1234.5600","description":"Toplam gelir"},"totalExpense":{"type":"string","format":"decimal","example":"1234.5600","description":"Toplam gider"},"totalNet":{"type":"string","format":"decimal","example":"1234.5600","description":"Toplam net"}},"required":["totalIncome","totalExpense","totalNet"]},"CashFlowReportDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CashFlowPeriodItemDto"}},"totals":{"$ref":"#/components/schemas/CashFlowTotalsDto"}},"required":["items","totals"]},"AgingBucketsDto":{"type":"object","properties":{"current":{"type":"string","format":"decimal","example":"1234.5600","description":"Vadesi gelmemiş veya 0-30 gün"},"days_31_60":{"type":"string","format":"decimal","example":"1234.5600","description":"31-60 gün gecikme"},"days_61_90":{"type":"string","format":"decimal","example":"1234.5600","description":"61-90 gün gecikme"},"days_90_plus":{"type":"string","format":"decimal","example":"1234.5600","description":"90+ gün gecikme"}},"required":["current","days_31_60","days_61_90","days_90_plus"]},"ReceivableItemDto":{"type":"object","properties":{"accountId":{"type":"string","description":"Müşteri hesap ID"},"customerName":{"type":"string","description":"Müşteri adı"},"balance":{"type":"string","format":"decimal","example":"1234.5600","description":"Mevcut bakiye (alacak)"},"openInvoiceCount":{"type":"number","description":"Açık fatura adedi"},"oldestInvoiceDate":{"type":"string","description":"En eski fatura tarihi"},"aging":{"$ref":"#/components/schemas/AgingBucketsDto"}},"required":["accountId","customerName","balance","openInvoiceCount","aging"]},"ReceivablesBucketTotalsDto":{"type":"object","properties":{"current":{"type":"string","format":"decimal","example":"1234.5600"},"days_31_60":{"type":"string","format":"decimal","example":"1234.5600"},"days_61_90":{"type":"string","format":"decimal","example":"1234.5600"},"days_90_plus":{"type":"string","format":"decimal","example":"1234.5600"}},"required":["current","days_31_60","days_61_90","days_90_plus"]},"ReceivablesTotalsDto":{"type":"object","properties":{"totalReceivable":{"type":"string","format":"decimal","example":"1234.5600","description":"Toplam alacak"},"bucketTotals":{"$ref":"#/components/schemas/ReceivablesBucketTotalsDto"},"customerCount":{"type":"number","description":"Müşteri sayısı"}},"required":["totalReceivable","bucketTotals","customerCount"]},"ReceivablesReportDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ReceivableItemDto"}},"totals":{"$ref":"#/components/schemas/ReceivablesTotalsDto"}},"required":["items","totals"]},"PayableAgingBucketsDto":{"type":"object","properties":{"current":{"type":"string","format":"decimal","example":"1234.5600","description":"Vadesi gelmemiş veya 0-30 gün"},"days_31_60":{"type":"string","format":"decimal","example":"1234.5600","description":"31-60 gün gecikme"},"days_61_90":{"type":"string","format":"decimal","example":"1234.5600","description":"61-90 gün gecikme"},"days_90_plus":{"type":"string","format":"decimal","example":"1234.5600","description":"90+ gün gecikme"}},"required":["current","days_31_60","days_61_90","days_90_plus"]},"PayableItemDto":{"type":"object","properties":{"accountId":{"type":"string","description":"Tedarikçi hesap ID"},"supplierName":{"type":"string","description":"Tedarikçi adı"},"balance":{"type":"string","format":"decimal","example":"1234.5600","description":"Borç bakiye"},"openInvoiceCount":{"type":"number","description":"Açık fatura adedi"},"oldestInvoiceDate":{"type":"string","description":"En eski fatura tarihi"},"aging":{"$ref":"#/components/schemas/PayableAgingBucketsDto"}},"required":["accountId","supplierName","balance","openInvoiceCount","aging"]},"PayablesBucketTotalsDto":{"type":"object","properties":{"current":{"type":"string","format":"decimal","example":"1234.5600"},"days_31_60":{"type":"string","format":"decimal","example":"1234.5600"},"days_61_90":{"type":"string","format":"decimal","example":"1234.5600"},"days_90_plus":{"type":"string","format":"decimal","example":"1234.5600"}},"required":["current","days_31_60","days_61_90","days_90_plus"]},"PayablesTotalsDto":{"type":"object","properties":{"totalPayable":{"type":"string","format":"decimal","example":"1234.5600","description":"Toplam borç"},"bucketTotals":{"$ref":"#/components/schemas/PayablesBucketTotalsDto"},"supplierCount":{"type":"number","description":"Tedarikçi sayısı"}},"required":["totalPayable","bucketTotals","supplierCount"]},"PayablesReportDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PayableItemDto"}},"totals":{"$ref":"#/components/schemas/PayablesTotalsDto"}},"required":["items","totals"]},"OverdueInvoiceItemDto":{"type":"object","properties":{"invoiceId":{"type":"string","description":"Fatura ID"},"invoiceNumber":{"type":"string","description":"Fatura numarası"},"type":{"type":"string","description":"Fatura tipi","enum":["SALES","PURCHASE"]},"counterpartyName":{"type":"string","description":"Karşı taraf adı (müşteri veya tedarikçi)"},"issueDate":{"type":"string","description":"Fatura tarihi"},"dueDate":{"type":"string","description":"Vade tarihi"},"daysOverdue":{"type":"number","description":"Gecikme gün sayısı"},"totalAmount":{"type":"string","format":"decimal","example":"1234.5600","description":"Fatura toplam tutarı"},"paidAmount":{"type":"string","format":"decimal","example":"1234.5600","description":"Ödenen tutar"},"remainingAmount":{"type":"string","format":"decimal","example":"1234.5600","description":"Kalan tutar"}},"required":["invoiceId","invoiceNumber","type","counterpartyName","issueDate","dueDate","daysOverdue","totalAmount","paidAmount","remainingAmount"]},"OverdueInvoicesTotalsDto":{"type":"object","properties":{"invoiceCount":{"type":"number","description":"Fatura adedi"},"totalRemaining":{"type":"string","format":"decimal","example":"1234.5600","description":"Toplam kalan tutar"}},"required":["invoiceCount","totalRemaining"]},"OverdueInvoicesReportDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/OverdueInvoiceItemDto"}},"totals":{"$ref":"#/components/schemas/OverdueInvoicesTotalsDto"}},"required":["items","totals"]},"GetConsolidatedReportDto":{"type":"object","properties":{"entityType":{"type":"string","enum":["CUSTOMER","VENDOR","CASH","BANK","EMPLOYEE"]},"entityId":{"type":"string"},"startDate":{"format":"date-time","type":"string"},"endDate":{"format":"date-time","type":"string"},"includeItems":{"type":"boolean"},"includeBalance":{"type":"boolean"}},"required":["entityType","startDate","endDate"]},"AttachmentDto":{"type":"object","properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"branchId":{"type":"string"},"relatedType":{"type":"string","enum":["TRANSACTION","CUSTOMER","SUPPLIER","EMPLOYEE"]},"relatedId":{"type":"string"},"fileName":{"type":"string"},"fileUrl":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"number"},"uploadedBy":{"type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["id","tenantId","branchId","relatedType","relatedId","fileName","fileUrl","mimeType","sizeBytes","uploadedBy","createdAt"]},"UploadAttachmentDto":{"type":"object","properties":{"relatedType":{"type":"string","example":"TRANSACTION","enum":["TRANSACTION","CUSTOMER","SUPPLIER","EMPLOYEE"],"description":"Target entity type"},"relatedId":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Target entity ID"},"file":{"type":"string","format":"binary","description":"File to upload"}},"required":["relatedType","relatedId","file"]},"CreateNoteDto":{"type":"object","properties":{"entityType":{"type":"string","enum":["CUSTOMER","SUPPLIER","EMPLOYEE","PRODUCT"],"description":"Type of the entity the note belongs to","example":"INVOICE"},"entityId":{"type":"string","description":"UUID of the entity the note is attached to","example":"123e4567-e89b-12d3-a456-426614174000"},"content":{"type":"string","description":"Note content text","example":"Follow up next week"}},"required":["entityType","entityId","content"]},"NoteDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique note identifier","example":"123e4567-e89b-12d3-a456-426614174000"},"createdAt":{"format":"date-time","type":"string","description":"Timestamp when the note was created","example":"2025-01-15T10:30:00.000Z"},"updatedAt":{"format":"date-time","type":"string","description":"Timestamp when the note was last updated","example":"2025-01-15T10:30:00.000Z"},"entityType":{"type":"string","description":"Type of the entity the note belongs to","example":"INVOICE"},"entityId":{"type":"string","description":"UUID of the entity the note is attached to","example":"123e4567-e89b-12d3-a456-426614174000"},"content":{"type":"string","description":"Note content text","example":"Follow up next week"},"createdByUserId":{"type":"string","description":"UUID of the user who created the note","example":"123e4567-e89b-12d3-a456-426614174000"}},"required":["id","createdAt","updatedAt","entityType","entityId","content"]},"UpdateNoteDto":{"type":"object","properties":{"content":{"type":"string","description":"Updated note content text","example":"Follow up next week"}},"required":["content"]},"FileResponseDto":{"type":"object","properties":{"storageKey":{"type":"string"},"originalName":{"type":"string"},"mimeType":{"type":"string"},"size":{"type":"number"},"url":{"type":"string"}},"required":["storageKey","originalName","mimeType","size","url"]},"DashboardStatItemDto":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string","description":"DecimalString — parasal tutar"},"percentageChange":{"type":"number","description":"Önceki aya göre yüzde değişim"},"trend":{"type":"string","enum":["up","down","neutral"]}},"required":["label","value"]},"DashboardChartItemDto":{"type":"object","properties":{"date":{"type":"string"},"income":{"type":"string","description":"DecimalString"},"expense":{"type":"string","description":"DecimalString"},"net":{"type":"string","description":"DecimalString"}},"required":["date","income","expense","net"]},"TenantDashboardStatsDto":{"type":"object","properties":{"totalCash":{"$ref":"#/components/schemas/DashboardStatItemDto"},"totalBank":{"$ref":"#/components/schemas/DashboardStatItemDto"},"totalReceivables":{"$ref":"#/components/schemas/DashboardStatItemDto"},"totalPayables":{"$ref":"#/components/schemas/DashboardStatItemDto"},"monthlyTrend":{"type":"array","items":{"$ref":"#/components/schemas/DashboardChartItemDto"}}},"required":["totalCash","totalBank","totalReceivables","totalPayables","monthlyTrend"]},"TopAccountDto":{"type":"object","properties":{"accountName":{"type":"string"},"amount":{"type":"number"}},"required":["accountName","amount"]},"TopDebtorDto":{"type":"object","properties":{"name":{"type":"string"},"balance":{"type":"number"}},"required":["name","balance"]},"CategoryDistributionDto":{"type":"object","properties":{"categoryName":{"type":"string"},"amount":{"type":"number"},"percentage":{"type":"number"}},"required":["categoryName","amount","percentage"]},"LatestTransactionDto":{"type":"object","properties":{"id":{"type":"string"},"date":{"type":"string"},"description":{"type":"string"},"amount":{"type":"number"},"type":{"type":"string"},"accountName":{"type":"string"},"counterAccountName":{"type":"string"}},"required":["id","date","description","amount","type","accountName","counterAccountName"]},"UpcomingPaymentDto":{"type":"object","properties":{"id":{"type":"string"},"invoiceNumber":{"type":"string"},"dueDate":{"type":"string"},"amount":{"type":"string","description":"DecimalString"},"remainingAmount":{"type":"string","description":"DecimalString"},"partyName":{"type":"string"},"type":{"type":"string"}},"required":["id","invoiceNumber","dueDate","amount","remainingAmount","partyName","type"]},"DashboardReportDto":{"type":"object","properties":{"netCash":{"type":"number"},"cashTotal":{"type":"number"},"bankTotal":{"type":"number"},"totalReceivable":{"type":"number"},"totalPayable":{"type":"number"},"growthPercent":{"type":"number"},"incomeExpenseRatio":{"type":"number"},"transactionsLast30Days":{"type":"number"},"topIncomeAccounts":{"type":"array","items":{"$ref":"#/components/schemas/TopAccountDto"}},"topExpenseAccounts":{"type":"array","items":{"$ref":"#/components/schemas/TopAccountDto"}},"topDebtors":{"type":"array","items":{"$ref":"#/components/schemas/TopDebtorDto"}},"topCreditors":{"type":"array","items":{"$ref":"#/components/schemas/TopDebtorDto"}},"expenseByCategory":{"type":"array","items":{"$ref":"#/components/schemas/CategoryDistributionDto"}},"monthlyTrend":{"type":"array","items":{"$ref":"#/components/schemas/DashboardChartItemDto"}},"latestTransactions":{"type":"array","items":{"$ref":"#/components/schemas/LatestTransactionDto"}},"upcomingPayments":{"type":"array","items":{"$ref":"#/components/schemas/UpcomingPaymentDto"}},"accountsSummary":{"type":"array","items":{"$ref":"#/components/schemas/AccountSummaryDto"}},"overdueReceivablesTotal":{"type":"number"},"otherTransactionRatio":{"type":"number"},"periodIncome":{"type":"number"},"periodExpense":{"type":"number"},"periodNet":{"type":"number"}},"required":["netCash","cashTotal","bankTotal","totalReceivable","totalPayable","growthPercent","incomeExpenseRatio","transactionsLast30Days","topIncomeAccounts","topExpenseAccounts","topDebtors","topCreditors","expenseByCategory","monthlyTrend","latestTransactions","upcomingPayments","accountsSummary","overdueReceivablesTotal","otherTransactionRatio","periodIncome","periodExpense","periodNet"]},"DashboardStockDto":{"type":"object","properties":{"netCash":{"type":"number"},"cashTotal":{"type":"number"},"bankTotal":{"type":"number"},"totalReceivable":{"type":"number"},"totalPayable":{"type":"number"},"topDebtors":{"type":"array","items":{"$ref":"#/components/schemas/TopDebtorDto"}},"topCreditors":{"type":"array","items":{"$ref":"#/components/schemas/TopDebtorDto"}},"accountsSummary":{"type":"array","items":{"$ref":"#/components/schemas/AccountSummaryDto"}}},"required":["netCash","cashTotal","bankTotal","totalReceivable","totalPayable","topDebtors","topCreditors","accountsSummary"]},"DashboardFlowDto":{"type":"object","properties":{"periodIncome":{"type":"number"},"periodExpense":{"type":"number"},"periodNet":{"type":"number"},"transactionsCount":{"type":"number"},"monthlyTrend":{"type":"array","items":{"$ref":"#/components/schemas/DashboardChartItemDto"}},"latestTransactions":{"type":"array","items":{"$ref":"#/components/schemas/LatestTransactionDto"}},"upcomingPayments":{"type":"array","items":{"$ref":"#/components/schemas/UpcomingPaymentDto"}},"overdueReceivablesTotal":{"type":"number"}},"required":["periodIncome","periodExpense","periodNet","transactionsCount","monthlyTrend","latestTransactions","upcomingPayments","overdueReceivablesTotal"]},"DashboardAlertDto":{"type":"object","properties":{"title":{"type":"string"},"message":{"type":"string"},"type":{"type":"string","enum":["warning","danger","info"]}},"required":["title","message","type"]},"DashboardHealthDto":{"type":"object","properties":{"totalCash":{"$ref":"#/components/schemas/DashboardStatItemDto"},"totalBank":{"$ref":"#/components/schemas/DashboardStatItemDto"},"totalReceivable":{"$ref":"#/components/schemas/DashboardStatItemDto"},"totalPayable":{"$ref":"#/components/schemas/DashboardStatItemDto"},"currentMonthNet":{"$ref":"#/components/schemas/DashboardStatItemDto"},"alertCount":{"type":"number"},"alerts":{"type":"array","items":{"$ref":"#/components/schemas/DashboardAlertDto"}},"upcomingPayments":{"type":"array","items":{"$ref":"#/components/schemas/UpcomingPaymentDto"}},"miniCashFlow":{"type":"array","items":{"$ref":"#/components/schemas/DashboardChartItemDto"}}},"required":["totalCash","totalBank","totalReceivable","totalPayable","currentMonthNet","alertCount","alerts","upcomingPayments","miniCashFlow"]},"SupportTicketDto":{"type":"object","properties":{"id":{"type":"string"},"ticketNo":{"type":"string"},"subject":{"type":"string"},"category":{"type":"string"},"status":{"type":"string","enum":["OPEN","CLOSED","WAITING_FOR_CUSTOMER","WAITING_FOR_ADMIN"]},"priority":{"type":"string","enum":["LOW","NORMAL","HIGH","URGENT"]},"createdAt":{"format":"date-time","type":"string"},"closedAt":{"type":"object"}},"required":["id","ticketNo","subject","category","status","priority","createdAt"]},"SupportTicketMessageDto":{"type":"object","properties":{"id":{"type":"string"},"ticketId":{"type":"string"},"senderType":{"type":"string","enum":["CUSTOMER","ADMIN"]},"body":{"type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["id","ticketId","senderType","body","createdAt"]},"SupportTicketDetailDto":{"type":"object","properties":{"id":{"type":"string"},"ticketNo":{"type":"string"},"subject":{"type":"string"},"category":{"type":"string"},"status":{"type":"string","enum":["OPEN","CLOSED","WAITING_FOR_CUSTOMER","WAITING_FOR_ADMIN"]},"priority":{"type":"string","enum":["LOW","NORMAL","HIGH","URGENT"]},"createdAt":{"format":"date-time","type":"string"},"closedAt":{"type":"object"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/SupportTicketMessageDto"}}},"required":["id","ticketNo","subject","category","status","priority","createdAt","messages"]},"CreateSupportTicketDto":{"type":"object","properties":{"subject":{"type":"string"},"category":{"type":"string"},"priority":{"type":"string","enum":["LOW","NORMAL","HIGH","URGENT"]},"message":{"type":"string"}},"required":["subject","category","message"]},"CreateSupportTicketMessageDto":{"type":"object","properties":{"body":{"type":"string"}},"required":["body"]}}}}