{
  "openapi": "3.0.0",
  "info": {
    "title": "Numezis API",
    "version": "0.3.0",
    "description": "Multi-portal API with AccessMode-based authorization. Documentation generated automatically from route annotations.",
    "contact": {
      "name": "Numezis API Support",
      "email": "support@numezis.com"
    }
  },
  "servers": [
    {
      "url": "http://localhost:8080/api/v1",
      "description": "Development"
    },
    {
      "url": "https://api.staging.numezis.com/api/v1",
      "description": "Staging"
    },
    {
      "url": "https://api.numezis.com/api/v1",
      "description": "Production"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "JWT token obtained from /auth/login endpoint"
      }
    },
    "parameters": {
      "companyId": {
        "name": "companyId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "Company ID"
      },
      "tenantId": {
        "name": "tenantId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "Tenant ID"
      },
      "paginationQuery": {
        "name": "limit",
        "in": "query",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "default": 20
        },
        "description": "Maximum number of items to return"
      },
      "paginationOffset": {
        "name": "offset",
        "in": "query",
        "schema": {
          "type": "integer",
          "minimum": 0,
          "default": 0
        },
        "description": "Number of items to skip"
      },
      "SuperadminTenantIdPathParam": {
        "name": "tenantId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "SuperadminCompanyIdPathParam": {
        "name": "companyId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "SuperadminPartnerTenantIdPathParam": {
        "name": "partnerTenantId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "SuperadminUserIdPathParam": {
        "name": "userId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "SuperadminInvitationIdPathParam": {
        "name": "invitationId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "SuperadminRunIdPathParam": {
        "name": "runId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "SuperadminCountryCodePathParam": {
        "name": "countryCode",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "SuperadminComplianceIdPathParam": {
        "name": "complianceId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "SuperadminResourceIdPathParam": {
        "name": "resourceId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "SuperadminSourceIdPathParam": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "SuperadminDiscoveryRunIdPathParam": {
        "name": "runId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "SuperadminDiscoveryCandidateIdPathParam": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "SuperadminRuleIndexPathParam": {
        "name": "ruleIndex",
        "in": "path",
        "required": true,
        "schema": {
          "type": "integer"
        }
      },
      "SuperadminAccountCodePathParam": {
        "name": "accountCode",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "SuperadminLinkIdPathParam": {
        "name": "linkId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "SuperadminAlertIdPathParam": {
        "name": "alertId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "SuperadminSessionIdPathParam": {
        "name": "sessionId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "SuperadminStripeEventIdPathParam": {
        "name": "stripeEventId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      }
    },
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "UNAUTHORIZED",
                  "FORBIDDEN",
                  "NOT_FOUND",
                  "VALIDATION_ERROR",
                  "CONFLICT",
                  "INTERNAL_ERROR",
                  "SERVICE_UNAVAILABLE",
                  "BAD_REQUEST",
                  "PAYMENT_REQUIRED",
                  "RATE_LIMIT_EXCEEDED",
                  "MODULE_NOT_ENABLED",
                  "PERMISSION_DENIED",
                  "COMPANY_NOT_ACTIVE",
                  "TENANT_NOT_ACTIVE",
                  "INVALID_TOKEN",
                  "TOKEN_EXPIRED",
                  "INVITATION_EXPIRED",
                  "INVALID_CREDENTIALS",
                  "EMAIL_NOT_VERIFIED",
                  "DATA_INTEGRITY_GUARD",
                  "SSO_PROVISIONING_REQUIRED",
                  "MFA_SETUP_REQUIRED",
                  "MFA_VERIFICATION_REQUIRED",
                  "MFA_STEP_UP_REQUIRED",
                  "USER_SUSPENDED",
                  "COMPANY_ARCHIVED",
                  "NETWORK_ERROR",
                  "COUNTRY_NOT_FOUND",
                  "AGENT_TIMEOUT",
                  "TOOL_EXECUTION_ERROR",
                  "LEGACY_APPROVAL_UNSUPPORTED",
                  "MODEL_ERROR",
                  "AGENT_CANCELLED",
                  "SUSPICIOUS_CONTENT_DETECTED",
                  "IMPORT_MOVED_TO_DATA_IMPORTS",
                  "INVALID_PORTAL",
                  "INVALID_PORTAL_FOR_RUNS",
                  "INVALID_PORTAL_FOR_STATS",
                  "ACCESSMODE_USER_MISMATCH",
                  "ACCESSMODE_TENANT_MISMATCH",
                  "ACCESSMODE_COMPANY_MISMATCH",
                  "ORG_PROVISIONING_FAILED"
                ],
                "description": "Error code (ErrorCode type)",
                "example": "NOT_FOUND"
              },
              "message": {
                "type": "string",
                "description": "Localized error message (via translateError() with i18n keys)",
                "example": "Company not found"
              },
              "details": {
                "type": "object",
                "description": "Optional error details (validation errors, etc.)",
                "additionalProperties": true
              },
              "field": {
                "type": "string",
                "description": "Optional field name for validation errors",
                "example": "email"
              },
              "correlationId": {
                "type": "string",
                "description": "Request correlation ID for debugging",
                "example": "req-1234567890"
              },
              "requestId": {
                "type": "string",
                "description": "Request ID for tracing",
                "example": "req-9876543210"
              }
            }
          }
        }
      },
      "SuccessResponse": {
        "type": "object",
        "required": [
          "success"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "example": true,
            "description": "Always true for successful responses"
          },
          "data": {
            "type": "object",
            "description": "Response data (structure varies by endpoint)",
            "additionalProperties": true
          }
        }
      },
      "GlobalSearchResultGroup": {
        "type": "string",
        "enum": [
          "pages",
          "settings",
          "config",
          "actions",
          "records"
        ],
        "description": "UI section grouping for global search palette"
      },
      "GlobalSearchNavigationKind": {
        "type": "string",
        "enum": [
          "page",
          "settings",
          "config",
          "hub",
          "action"
        ],
        "description": "Navigation catalog kind for page/settings results"
      },
      "GlobalSearchResultType": {
        "type": "string",
        "enum": [
          "navigation",
          "action",
          "user",
          "invoice",
          "order",
          "contact",
          "document",
          "task",
          "quote",
          "expense",
          "bill",
          "project",
          "lead",
          "product",
          "config"
        ],
        "description": "Global search result entity/type discriminator"
      },
      "GlobalSearchResult": {
        "type": "object",
        "required": [
          "type",
          "id",
          "title",
          "href"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "navigation",
              "action",
              "user",
              "invoice",
              "order",
              "contact",
              "document",
              "task",
              "quote",
              "expense",
              "bill",
              "project",
              "lead",
              "product",
              "config"
            ],
            "description": "Global search result entity/type discriminator"
          },
          "group": {
            "type": "string",
            "enum": [
              "pages",
              "settings",
              "config",
              "actions",
              "records"
            ],
            "description": "UI section grouping for global search palette"
          },
          "kind": {
            "type": "string",
            "enum": [
              "page",
              "settings",
              "config",
              "hub",
              "action"
            ],
            "description": "Navigation catalog kind for page/settings results"
          },
          "id": {
            "type": "string",
            "description": "Stable result identifier (route id, entity id, or action id)"
          },
          "title": {
            "type": "string",
            "description": "Localized display title"
          },
          "description": {
            "type": "string",
            "description": "Optional subtitle or summary"
          },
          "breadcrumb": {
            "type": "string",
            "description": "Resolved breadcrumb trail for palette display"
          },
          "href": {
            "type": "string",
            "description": "Resolved navigation target"
          },
          "icon": {
            "type": "string",
            "description": "Optional icon token"
          },
          "providerId": {
            "type": "string",
            "enum": [
              "page",
              "record",
              "action",
              "config"
            ],
            "description": "Provider identifier for ranking and telemetry"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true,
            "description": "Optional provider-specific metadata (non-sensitive)"
          },
          "highlights": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Optional highlight snippets"
          }
        }
      },
      "GlobalSearchResponse": {
        "type": "object",
        "required": [
          "results",
          "total",
          "query"
        ],
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "type",
                "id",
                "title",
                "href"
              ],
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "navigation",
                    "action",
                    "user",
                    "invoice",
                    "order",
                    "contact",
                    "document",
                    "task",
                    "quote",
                    "expense",
                    "bill",
                    "project",
                    "lead",
                    "product",
                    "config"
                  ],
                  "description": "Global search result entity/type discriminator"
                },
                "group": {
                  "type": "string",
                  "enum": [
                    "pages",
                    "settings",
                    "config",
                    "actions",
                    "records"
                  ],
                  "description": "UI section grouping for global search palette"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "page",
                    "settings",
                    "config",
                    "hub",
                    "action"
                  ],
                  "description": "Navigation catalog kind for page/settings results"
                },
                "id": {
                  "type": "string",
                  "description": "Stable result identifier (route id, entity id, or action id)"
                },
                "title": {
                  "type": "string",
                  "description": "Localized display title"
                },
                "description": {
                  "type": "string",
                  "description": "Optional subtitle or summary"
                },
                "breadcrumb": {
                  "type": "string",
                  "description": "Resolved breadcrumb trail for palette display"
                },
                "href": {
                  "type": "string",
                  "description": "Resolved navigation target"
                },
                "icon": {
                  "type": "string",
                  "description": "Optional icon token"
                },
                "providerId": {
                  "type": "string",
                  "enum": [
                    "page",
                    "record",
                    "action",
                    "config"
                  ],
                  "description": "Provider identifier for ranking and telemetry"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "Optional provider-specific metadata (non-sensitive)"
                },
                "highlights": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Optional highlight snippets"
                }
              }
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "query": {
            "type": "string"
          }
        }
      },
      "GlobalSearchSuccessResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "data": {
            "type": "object",
            "required": [
              "results",
              "total",
              "query"
            ],
            "properties": {
              "results": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "type",
                    "id",
                    "title",
                    "href"
                  ],
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "navigation",
                        "action",
                        "user",
                        "invoice",
                        "order",
                        "contact",
                        "document",
                        "task",
                        "quote",
                        "expense",
                        "bill",
                        "project",
                        "lead",
                        "product",
                        "config"
                      ],
                      "description": "Global search result entity/type discriminator"
                    },
                    "group": {
                      "type": "string",
                      "enum": [
                        "pages",
                        "settings",
                        "config",
                        "actions",
                        "records"
                      ],
                      "description": "UI section grouping for global search palette"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "page",
                        "settings",
                        "config",
                        "hub",
                        "action"
                      ],
                      "description": "Navigation catalog kind for page/settings results"
                    },
                    "id": {
                      "type": "string",
                      "description": "Stable result identifier (route id, entity id, or action id)"
                    },
                    "title": {
                      "type": "string",
                      "description": "Localized display title"
                    },
                    "description": {
                      "type": "string",
                      "description": "Optional subtitle or summary"
                    },
                    "breadcrumb": {
                      "type": "string",
                      "description": "Resolved breadcrumb trail for palette display"
                    },
                    "href": {
                      "type": "string",
                      "description": "Resolved navigation target"
                    },
                    "icon": {
                      "type": "string",
                      "description": "Optional icon token"
                    },
                    "providerId": {
                      "type": "string",
                      "enum": [
                        "page",
                        "record",
                        "action",
                        "config"
                      ],
                      "description": "Provider identifier for ranking and telemetry"
                    },
                    "metadata": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "Optional provider-specific metadata (non-sensitive)"
                    },
                    "highlights": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Optional highlight snippets"
                    }
                  }
                }
              },
              "total": {
                "type": "integer",
                "minimum": 0
              },
              "query": {
                "type": "string"
              }
            }
          }
        }
      },
      "SupportTicketSourceContext": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "pathname": {
            "type": "string"
          },
          "search": {
            "type": "string"
          },
          "hash": {
            "type": "string"
          },
          "referrer": {
            "type": "string"
          },
          "userAgent": {
            "type": "string"
          }
        }
      },
      "SupportTicketUatContext": {
        "type": "object",
        "required": [
          "moduleKey",
          "scenarioId",
          "result",
          "why"
        ],
        "properties": {
          "moduleKey": {
            "type": "string",
            "enum": [
              "accounting",
              "crm",
              "sales",
              "projects",
              "purchases",
              "documents",
              "contacts",
              "inventory",
              "hr"
            ]
          },
          "scenarioId": {
            "type": "string"
          },
          "result": {
            "type": "string",
            "enum": [
              "success",
              "failed",
              "blocked"
            ]
          },
          "why": {
            "type": "string"
          },
          "executionId": {
            "type": "string"
          }
        }
      },
      "SupportTicketScreenshot": {
        "type": "object",
        "required": [
          "filename",
          "contentType",
          "sizeBytes",
          "width",
          "height"
        ],
        "properties": {
          "filename": {
            "type": "string"
          },
          "contentType": {
            "type": "string",
            "enum": [
              "image/jpeg",
              "image/png",
              "image/webp"
            ]
          },
          "sizeBytes": {
            "type": "integer"
          },
          "width": {
            "type": "integer"
          },
          "height": {
            "type": "integer"
          },
          "previewUrl": {
            "type": "string"
          },
          "previewExpiresAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SupportTicket": {
        "type": "object",
        "required": [
          "id",
          "type",
          "status",
          "priority",
          "title",
          "description",
          "sourcePortal",
          "tenantId",
          "companyId",
          "partnerTenantId",
          "requesterUserId",
          "requesterRole",
          "assignedToUserId",
          "assignedByUserId",
          "planId",
          "firstResponseDueAt",
          "firstResponseAt",
          "slaState",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "support",
              "bug",
              "feedback",
              "other"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "new",
              "in_progress",
              "waiting_customer",
              "resolved",
              "closed"
            ]
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "urgent"
            ]
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "sourcePortal": {
            "type": "string",
            "enum": [
              "company",
              "tenant",
              "partner",
              "internal"
            ]
          },
          "sourcePath": {
            "type": "string"
          },
          "sourceContext": {
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string"
                  },
                  "pathname": {
                    "type": "string"
                  },
                  "search": {
                    "type": "string"
                  },
                  "hash": {
                    "type": "string"
                  },
                  "referrer": {
                    "type": "string"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              }
            ],
            "nullable": true
          },
          "uatContext": {
            "allOf": [
              {
                "type": "object",
                "required": [
                  "moduleKey",
                  "scenarioId",
                  "result",
                  "why"
                ],
                "properties": {
                  "moduleKey": {
                    "type": "string",
                    "enum": [
                      "accounting",
                      "crm",
                      "sales",
                      "projects",
                      "purchases",
                      "documents",
                      "contacts",
                      "inventory",
                      "hr"
                    ]
                  },
                  "scenarioId": {
                    "type": "string"
                  },
                  "result": {
                    "type": "string",
                    "enum": [
                      "success",
                      "failed",
                      "blocked"
                    ]
                  },
                  "why": {
                    "type": "string"
                  },
                  "executionId": {
                    "type": "string"
                  }
                }
              }
            ],
            "nullable": true
          },
          "screenshot": {
            "allOf": [
              {
                "type": "object",
                "required": [
                  "filename",
                  "contentType",
                  "sizeBytes",
                  "width",
                  "height"
                ],
                "properties": {
                  "filename": {
                    "type": "string"
                  },
                  "contentType": {
                    "type": "string",
                    "enum": [
                      "image/jpeg",
                      "image/png",
                      "image/webp"
                    ]
                  },
                  "sizeBytes": {
                    "type": "integer"
                  },
                  "width": {
                    "type": "integer"
                  },
                  "height": {
                    "type": "integer"
                  },
                  "previewUrl": {
                    "type": "string"
                  },
                  "previewExpiresAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              }
            ],
            "nullable": true
          },
          "tenantId": {
            "type": "string"
          },
          "companyId": {
            "type": "string",
            "nullable": true
          },
          "partnerTenantId": {
            "type": "string",
            "nullable": true
          },
          "requesterUserId": {
            "type": "string"
          },
          "requesterRole": {
            "type": "string"
          },
          "assignedToUserId": {
            "type": "string",
            "nullable": true
          },
          "assignedByUserId": {
            "type": "string",
            "nullable": true
          },
          "planId": {
            "type": "string",
            "enum": [
              "starter",
              "plus",
              "pro",
              "enterprise"
            ]
          },
          "firstResponseDueAt": {
            "type": "string",
            "format": "date-time"
          },
          "firstResponseAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "slaState": {
            "type": "string",
            "enum": [
              "on_track",
              "at_risk",
              "breached"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SupportScreenshotDraft": {
        "type": "object",
        "required": [
          "draftId",
          "filename",
          "contentType",
          "sizeBytes",
          "width",
          "height"
        ],
        "properties": {
          "draftId": {
            "type": "string"
          },
          "filename": {
            "type": "string"
          },
          "contentType": {
            "type": "string",
            "enum": [
              "image/jpeg",
              "image/png",
              "image/webp"
            ]
          },
          "sizeBytes": {
            "type": "integer"
          },
          "width": {
            "type": "integer"
          },
          "height": {
            "type": "integer"
          }
        }
      },
      "InternalSupportAssignee": {
        "type": "object",
        "required": [
          "id",
          "email",
          "role",
          "profile"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "profile": {
            "type": "object",
            "properties": {
              "firstName": {
                "type": "string"
              },
              "lastName": {
                "type": "string"
              },
              "avatarUrl": {
                "type": "string"
              }
            }
          }
        }
      },
      "SupportSlaPolicy": {
        "type": "object",
        "required": [
          "planId",
          "firstResponseHours",
          "coverage"
        ],
        "properties": {
          "planId": {
            "type": "string",
            "enum": [
              "starter",
              "plus",
              "pro",
              "enterprise"
            ]
          },
          "firstResponseHours": {
            "type": "integer"
          },
          "coverage": {
            "type": "string",
            "enum": [
              "24_7"
            ]
          }
        }
      },
      "CreateSupportTicketRequest": {
        "type": "object",
        "required": [
          "type",
          "title",
          "description"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "support",
              "bug",
              "feedback",
              "other"
            ]
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "urgent"
            ]
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "sourcePath": {
            "type": "string"
          },
          "sourceContext": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string"
              },
              "pathname": {
                "type": "string"
              },
              "search": {
                "type": "string"
              },
              "hash": {
                "type": "string"
              },
              "referrer": {
                "type": "string"
              },
              "userAgent": {
                "type": "string"
              }
            }
          },
          "uatContext": {
            "type": "object",
            "required": [
              "moduleKey",
              "scenarioId",
              "result",
              "why"
            ],
            "properties": {
              "moduleKey": {
                "type": "string",
                "enum": [
                  "accounting",
                  "crm",
                  "sales",
                  "projects",
                  "purchases",
                  "documents",
                  "contacts",
                  "inventory",
                  "hr"
                ]
              },
              "scenarioId": {
                "type": "string"
              },
              "result": {
                "type": "string",
                "enum": [
                  "success",
                  "failed",
                  "blocked"
                ]
              },
              "why": {
                "type": "string"
              },
              "executionId": {
                "type": "string"
              }
            }
          },
          "screenshotDraftId": {
            "type": "string"
          }
        }
      },
      "AssignInternalSupportTicketRequest": {
        "type": "object",
        "required": [
          "assignedToUserId"
        ],
        "properties": {
          "assignedToUserId": {
            "type": "string"
          }
        }
      },
      "UpdateInternalSupportTicketStatusRequest": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "new",
              "in_progress",
              "waiting_customer",
              "resolved",
              "closed"
            ]
          }
        }
      },
      "CompanySupportTicketListResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean"
          },
          "data": {
            "type": "object",
            "required": [
              "tickets",
              "total"
            ],
            "properties": {
              "tickets": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "id",
                    "type",
                    "status",
                    "priority",
                    "title",
                    "description",
                    "sourcePortal",
                    "tenantId",
                    "companyId",
                    "partnerTenantId",
                    "requesterUserId",
                    "requesterRole",
                    "assignedToUserId",
                    "assignedByUserId",
                    "planId",
                    "firstResponseDueAt",
                    "firstResponseAt",
                    "slaState",
                    "createdAt",
                    "updatedAt"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "support",
                        "bug",
                        "feedback",
                        "other"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "new",
                        "in_progress",
                        "waiting_customer",
                        "resolved",
                        "closed"
                      ]
                    },
                    "priority": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high",
                        "urgent"
                      ]
                    },
                    "title": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "sourcePortal": {
                      "type": "string",
                      "enum": [
                        "company",
                        "tenant",
                        "partner",
                        "internal"
                      ]
                    },
                    "sourcePath": {
                      "type": "string"
                    },
                    "sourceContext": {
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "url": {
                              "type": "string"
                            },
                            "pathname": {
                              "type": "string"
                            },
                            "search": {
                              "type": "string"
                            },
                            "hash": {
                              "type": "string"
                            },
                            "referrer": {
                              "type": "string"
                            },
                            "userAgent": {
                              "type": "string"
                            }
                          }
                        }
                      ],
                      "nullable": true
                    },
                    "uatContext": {
                      "allOf": [
                        {
                          "type": "object",
                          "required": [
                            "moduleKey",
                            "scenarioId",
                            "result",
                            "why"
                          ],
                          "properties": {
                            "moduleKey": {
                              "type": "string",
                              "enum": [
                                "accounting",
                                "crm",
                                "sales",
                                "projects",
                                "purchases",
                                "documents",
                                "contacts",
                                "inventory",
                                "hr"
                              ]
                            },
                            "scenarioId": {
                              "type": "string"
                            },
                            "result": {
                              "type": "string",
                              "enum": [
                                "success",
                                "failed",
                                "blocked"
                              ]
                            },
                            "why": {
                              "type": "string"
                            },
                            "executionId": {
                              "type": "string"
                            }
                          }
                        }
                      ],
                      "nullable": true
                    },
                    "screenshot": {
                      "allOf": [
                        {
                          "type": "object",
                          "required": [
                            "filename",
                            "contentType",
                            "sizeBytes",
                            "width",
                            "height"
                          ],
                          "properties": {
                            "filename": {
                              "type": "string"
                            },
                            "contentType": {
                              "type": "string",
                              "enum": [
                                "image/jpeg",
                                "image/png",
                                "image/webp"
                              ]
                            },
                            "sizeBytes": {
                              "type": "integer"
                            },
                            "width": {
                              "type": "integer"
                            },
                            "height": {
                              "type": "integer"
                            },
                            "previewUrl": {
                              "type": "string"
                            },
                            "previewExpiresAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          }
                        }
                      ],
                      "nullable": true
                    },
                    "tenantId": {
                      "type": "string"
                    },
                    "companyId": {
                      "type": "string",
                      "nullable": true
                    },
                    "partnerTenantId": {
                      "type": "string",
                      "nullable": true
                    },
                    "requesterUserId": {
                      "type": "string"
                    },
                    "requesterRole": {
                      "type": "string"
                    },
                    "assignedToUserId": {
                      "type": "string",
                      "nullable": true
                    },
                    "assignedByUserId": {
                      "type": "string",
                      "nullable": true
                    },
                    "planId": {
                      "type": "string",
                      "enum": [
                        "starter",
                        "plus",
                        "pro",
                        "enterprise"
                      ]
                    },
                    "firstResponseDueAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "firstResponseAt": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true
                    },
                    "slaState": {
                      "type": "string",
                      "enum": [
                        "on_track",
                        "at_risk",
                        "breached"
                      ]
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              },
              "total": {
                "type": "integer"
              }
            }
          }
        }
      },
      "InternalSupportTicketListResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean"
          },
          "data": {
            "type": "object",
            "required": [
              "tickets",
              "total",
              "breachedTicketIds"
            ],
            "properties": {
              "tickets": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "id",
                    "type",
                    "status",
                    "priority",
                    "title",
                    "description",
                    "sourcePortal",
                    "tenantId",
                    "companyId",
                    "partnerTenantId",
                    "requesterUserId",
                    "requesterRole",
                    "assignedToUserId",
                    "assignedByUserId",
                    "planId",
                    "firstResponseDueAt",
                    "firstResponseAt",
                    "slaState",
                    "createdAt",
                    "updatedAt"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "support",
                        "bug",
                        "feedback",
                        "other"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "new",
                        "in_progress",
                        "waiting_customer",
                        "resolved",
                        "closed"
                      ]
                    },
                    "priority": {
                      "type": "string",
                      "enum": [
                        "low",
                        "medium",
                        "high",
                        "urgent"
                      ]
                    },
                    "title": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "sourcePortal": {
                      "type": "string",
                      "enum": [
                        "company",
                        "tenant",
                        "partner",
                        "internal"
                      ]
                    },
                    "sourcePath": {
                      "type": "string"
                    },
                    "sourceContext": {
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "url": {
                              "type": "string"
                            },
                            "pathname": {
                              "type": "string"
                            },
                            "search": {
                              "type": "string"
                            },
                            "hash": {
                              "type": "string"
                            },
                            "referrer": {
                              "type": "string"
                            },
                            "userAgent": {
                              "type": "string"
                            }
                          }
                        }
                      ],
                      "nullable": true
                    },
                    "uatContext": {
                      "allOf": [
                        {
                          "type": "object",
                          "required": [
                            "moduleKey",
                            "scenarioId",
                            "result",
                            "why"
                          ],
                          "properties": {
                            "moduleKey": {
                              "type": "string",
                              "enum": [
                                "accounting",
                                "crm",
                                "sales",
                                "projects",
                                "purchases",
                                "documents",
                                "contacts",
                                "inventory",
                                "hr"
                              ]
                            },
                            "scenarioId": {
                              "type": "string"
                            },
                            "result": {
                              "type": "string",
                              "enum": [
                                "success",
                                "failed",
                                "blocked"
                              ]
                            },
                            "why": {
                              "type": "string"
                            },
                            "executionId": {
                              "type": "string"
                            }
                          }
                        }
                      ],
                      "nullable": true
                    },
                    "screenshot": {
                      "allOf": [
                        {
                          "type": "object",
                          "required": [
                            "filename",
                            "contentType",
                            "sizeBytes",
                            "width",
                            "height"
                          ],
                          "properties": {
                            "filename": {
                              "type": "string"
                            },
                            "contentType": {
                              "type": "string",
                              "enum": [
                                "image/jpeg",
                                "image/png",
                                "image/webp"
                              ]
                            },
                            "sizeBytes": {
                              "type": "integer"
                            },
                            "width": {
                              "type": "integer"
                            },
                            "height": {
                              "type": "integer"
                            },
                            "previewUrl": {
                              "type": "string"
                            },
                            "previewExpiresAt": {
                              "type": "string",
                              "format": "date-time"
                            }
                          }
                        }
                      ],
                      "nullable": true
                    },
                    "tenantId": {
                      "type": "string"
                    },
                    "companyId": {
                      "type": "string",
                      "nullable": true
                    },
                    "partnerTenantId": {
                      "type": "string",
                      "nullable": true
                    },
                    "requesterUserId": {
                      "type": "string"
                    },
                    "requesterRole": {
                      "type": "string"
                    },
                    "assignedToUserId": {
                      "type": "string",
                      "nullable": true
                    },
                    "assignedByUserId": {
                      "type": "string",
                      "nullable": true
                    },
                    "planId": {
                      "type": "string",
                      "enum": [
                        "starter",
                        "plus",
                        "pro",
                        "enterprise"
                      ]
                    },
                    "firstResponseDueAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "firstResponseAt": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true
                    },
                    "slaState": {
                      "type": "string",
                      "enum": [
                        "on_track",
                        "at_risk",
                        "breached"
                      ]
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              },
              "total": {
                "type": "integer"
              },
              "breachedTicketIds": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "SupportTicketResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean"
          },
          "data": {
            "type": "object",
            "required": [
              "ticket"
            ],
            "properties": {
              "ticket": {
                "type": "object",
                "required": [
                  "id",
                  "type",
                  "status",
                  "priority",
                  "title",
                  "description",
                  "sourcePortal",
                  "tenantId",
                  "companyId",
                  "partnerTenantId",
                  "requesterUserId",
                  "requesterRole",
                  "assignedToUserId",
                  "assignedByUserId",
                  "planId",
                  "firstResponseDueAt",
                  "firstResponseAt",
                  "slaState",
                  "createdAt",
                  "updatedAt"
                ],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "support",
                      "bug",
                      "feedback",
                      "other"
                    ]
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "new",
                      "in_progress",
                      "waiting_customer",
                      "resolved",
                      "closed"
                    ]
                  },
                  "priority": {
                    "type": "string",
                    "enum": [
                      "low",
                      "medium",
                      "high",
                      "urgent"
                    ]
                  },
                  "title": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "sourcePortal": {
                    "type": "string",
                    "enum": [
                      "company",
                      "tenant",
                      "partner",
                      "internal"
                    ]
                  },
                  "sourcePath": {
                    "type": "string"
                  },
                  "sourceContext": {
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string"
                          },
                          "pathname": {
                            "type": "string"
                          },
                          "search": {
                            "type": "string"
                          },
                          "hash": {
                            "type": "string"
                          },
                          "referrer": {
                            "type": "string"
                          },
                          "userAgent": {
                            "type": "string"
                          }
                        }
                      }
                    ],
                    "nullable": true
                  },
                  "uatContext": {
                    "allOf": [
                      {
                        "type": "object",
                        "required": [
                          "moduleKey",
                          "scenarioId",
                          "result",
                          "why"
                        ],
                        "properties": {
                          "moduleKey": {
                            "type": "string",
                            "enum": [
                              "accounting",
                              "crm",
                              "sales",
                              "projects",
                              "purchases",
                              "documents",
                              "contacts",
                              "inventory",
                              "hr"
                            ]
                          },
                          "scenarioId": {
                            "type": "string"
                          },
                          "result": {
                            "type": "string",
                            "enum": [
                              "success",
                              "failed",
                              "blocked"
                            ]
                          },
                          "why": {
                            "type": "string"
                          },
                          "executionId": {
                            "type": "string"
                          }
                        }
                      }
                    ],
                    "nullable": true
                  },
                  "screenshot": {
                    "allOf": [
                      {
                        "type": "object",
                        "required": [
                          "filename",
                          "contentType",
                          "sizeBytes",
                          "width",
                          "height"
                        ],
                        "properties": {
                          "filename": {
                            "type": "string"
                          },
                          "contentType": {
                            "type": "string",
                            "enum": [
                              "image/jpeg",
                              "image/png",
                              "image/webp"
                            ]
                          },
                          "sizeBytes": {
                            "type": "integer"
                          },
                          "width": {
                            "type": "integer"
                          },
                          "height": {
                            "type": "integer"
                          },
                          "previewUrl": {
                            "type": "string"
                          },
                          "previewExpiresAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    ],
                    "nullable": true
                  },
                  "tenantId": {
                    "type": "string"
                  },
                  "companyId": {
                    "type": "string",
                    "nullable": true
                  },
                  "partnerTenantId": {
                    "type": "string",
                    "nullable": true
                  },
                  "requesterUserId": {
                    "type": "string"
                  },
                  "requesterRole": {
                    "type": "string"
                  },
                  "assignedToUserId": {
                    "type": "string",
                    "nullable": true
                  },
                  "assignedByUserId": {
                    "type": "string",
                    "nullable": true
                  },
                  "planId": {
                    "type": "string",
                    "enum": [
                      "starter",
                      "plus",
                      "pro",
                      "enterprise"
                    ]
                  },
                  "firstResponseDueAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "firstResponseAt": {
                    "type": "string",
                    "format": "date-time",
                    "nullable": true
                  },
                  "slaState": {
                    "type": "string",
                    "enum": [
                      "on_track",
                      "at_risk",
                      "breached"
                    ]
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              }
            }
          }
        }
      },
      "SupportScreenshotDraftResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean"
          },
          "data": {
            "type": "object",
            "required": [
              "draft"
            ],
            "properties": {
              "draft": {
                "type": "object",
                "required": [
                  "draftId",
                  "filename",
                  "contentType",
                  "sizeBytes",
                  "width",
                  "height"
                ],
                "properties": {
                  "draftId": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string"
                  },
                  "contentType": {
                    "type": "string",
                    "enum": [
                      "image/jpeg",
                      "image/png",
                      "image/webp"
                    ]
                  },
                  "sizeBytes": {
                    "type": "integer"
                  },
                  "width": {
                    "type": "integer"
                  },
                  "height": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        }
      },
      "InternalSupportAssigneeListResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean"
          },
          "data": {
            "type": "object",
            "required": [
              "users"
            ],
            "properties": {
              "users": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "id",
                    "email",
                    "role",
                    "profile"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string"
                    },
                    "role": {
                      "type": "string"
                    },
                    "profile": {
                      "type": "object",
                      "properties": {
                        "firstName": {
                          "type": "string"
                        },
                        "lastName": {
                          "type": "string"
                        },
                        "avatarUrl": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "SupportSlaPolicyListResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean"
          },
          "data": {
            "type": "object",
            "required": [
              "policies"
            ],
            "properties": {
              "policies": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "planId",
                    "firstResponseHours",
                    "coverage"
                  ],
                  "properties": {
                    "planId": {
                      "type": "string",
                      "enum": [
                        "starter",
                        "plus",
                        "pro",
                        "enterprise"
                      ]
                    },
                    "firstResponseHours": {
                      "type": "integer"
                    },
                    "coverage": {
                      "type": "string",
                      "enum": [
                        "24_7"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      },
      "DeleteSupportTicketResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean"
          },
          "data": {
            "type": "object",
            "required": [
              "deleted"
            ],
            "properties": {
              "deleted": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "VatReportingDiagnosticAction": {
        "type": "object",
        "required": [
          "kind",
          "labelKey",
          "href"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "section",
              "document",
              "list"
            ]
          },
          "labelKey": {
            "type": "string"
          },
          "href": {
            "type": "string"
          }
        }
      },
      "VatReportingDiagnostic": {
        "type": "object",
        "required": [
          "code",
          "messageKey",
          "severity",
          "blocking"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "messageKey": {
            "type": "string"
          },
          "severity": {
            "type": "string",
            "enum": [
              "error",
              "warning",
              "info"
            ]
          },
          "blocking": {
            "type": "boolean"
          },
          "actions": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "kind",
                "labelKey",
                "href"
              ],
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "section",
                    "document",
                    "list"
                  ]
                },
                "labelKey": {
                  "type": "string"
                },
                "href": {
                  "type": "string"
                }
              }
            }
          },
          "meta": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "CompanyVatActivitySourceMappings": {
        "type": "object",
        "properties": {
          "productIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "revenueAccountCodes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CompanyVatNetTaxRateActivity": {
        "type": "object",
        "required": [
          "activityKey",
          "label",
          "approvedRate"
        ],
        "properties": {
          "activityKey": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "approvedRate": {
            "type": "number"
          },
          "estvApprovalRef": {
            "type": "string",
            "nullable": true
          },
          "effectiveFrom": {
            "type": "string",
            "format": "date"
          },
          "effectiveTo": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "sourceMappings": {
            "type": "object",
            "properties": {
              "productIds": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "revenueAccountCodes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "CompanyVatAdjustmentEntry": {
        "type": "object",
        "required": [
          "adjustmentType",
          "amount"
        ],
        "properties": {
          "adjustmentType": {
            "type": "string",
            "enum": [
              "acquisition_tax",
              "compensation_export",
              "deemed_input_tax_deduction",
              "margin_taxation",
              "method_transition_adjustment"
            ]
          },
          "amount": {
            "type": "number"
          },
          "rate": {
            "type": "number"
          },
          "turnover": {
            "type": "number"
          },
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3
          },
          "applies": {
            "type": "boolean"
          },
          "note": {
            "type": "string"
          }
        }
      },
      "CompanyVatReportingConfigWindow": {
        "type": "object",
        "required": [
          "key",
          "reportingMethod",
          "filingFrequency",
          "effectiveFrom"
        ],
        "properties": {
          "key": {
            "type": "string"
          },
          "reportingMethod": {
            "type": "string",
            "enum": [
              "effectiveReportingMethod",
              "netTaxRateMethod",
              "flatTaxRateMethod",
              "simpleTaxRateMethod"
            ]
          },
          "filingFrequency": {
            "type": "string",
            "enum": [
              "monthly",
              "quarterly",
              "semiannual",
              "annual"
            ]
          },
          "vatAccountingBasis": {
            "type": "string",
            "enum": [
              "accrual",
              "cash"
            ]
          },
          "effectiveFrom": {
            "type": "string",
            "format": "date"
          },
          "effectiveTo": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "annualFilingApproved": {
            "type": "boolean"
          },
          "annualFilingApprovalRef": {
            "type": "string",
            "nullable": true
          },
          "netTaxRateActivities": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "activityKey",
                "label",
                "approvedRate"
              ],
              "properties": {
                "activityKey": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "approvedRate": {
                  "type": "number"
                },
                "estvApprovalRef": {
                  "type": "string",
                  "nullable": true
                },
                "effectiveFrom": {
                  "type": "string",
                  "format": "date"
                },
                "effectiveTo": {
                  "type": "string",
                  "format": "date",
                  "nullable": true
                },
                "sourceMappings": {
                  "type": "object",
                  "properties": {
                    "productIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "revenueAccountCodes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "adjustments": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "adjustmentType",
                "amount"
              ],
              "properties": {
                "adjustmentType": {
                  "type": "string",
                  "enum": [
                    "acquisition_tax",
                    "compensation_export",
                    "deemed_input_tax_deduction",
                    "margin_taxation",
                    "method_transition_adjustment"
                  ]
                },
                "amount": {
                  "type": "number"
                },
                "rate": {
                  "type": "number"
                },
                "turnover": {
                  "type": "number"
                },
                "currency": {
                  "type": "string",
                  "minLength": 3,
                  "maxLength": 3
                },
                "applies": {
                  "type": "boolean"
                },
                "note": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "CompanyVatReportingConfig": {
        "type": "object",
        "required": [
          "id",
          "companyId",
          "tenantId",
          "countryCode",
          "windows",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "countryCode": {
            "type": "string"
          },
          "windows": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "key",
                "reportingMethod",
                "filingFrequency",
                "effectiveFrom"
              ],
              "properties": {
                "key": {
                  "type": "string"
                },
                "reportingMethod": {
                  "type": "string",
                  "enum": [
                    "effectiveReportingMethod",
                    "netTaxRateMethod",
                    "flatTaxRateMethod",
                    "simpleTaxRateMethod"
                  ]
                },
                "filingFrequency": {
                  "type": "string",
                  "enum": [
                    "monthly",
                    "quarterly",
                    "semiannual",
                    "annual"
                  ]
                },
                "vatAccountingBasis": {
                  "type": "string",
                  "enum": [
                    "accrual",
                    "cash"
                  ]
                },
                "effectiveFrom": {
                  "type": "string",
                  "format": "date"
                },
                "effectiveTo": {
                  "type": "string",
                  "format": "date",
                  "nullable": true
                },
                "annualFilingApproved": {
                  "type": "boolean"
                },
                "annualFilingApprovalRef": {
                  "type": "string",
                  "nullable": true
                },
                "netTaxRateActivities": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "activityKey",
                      "label",
                      "approvedRate"
                    ],
                    "properties": {
                      "activityKey": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      },
                      "approvedRate": {
                        "type": "number"
                      },
                      "estvApprovalRef": {
                        "type": "string",
                        "nullable": true
                      },
                      "effectiveFrom": {
                        "type": "string",
                        "format": "date"
                      },
                      "effectiveTo": {
                        "type": "string",
                        "format": "date",
                        "nullable": true
                      },
                      "sourceMappings": {
                        "type": "object",
                        "properties": {
                          "productIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "revenueAccountCodes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "adjustments": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "adjustmentType",
                      "amount"
                    ],
                    "properties": {
                      "adjustmentType": {
                        "type": "string",
                        "enum": [
                          "acquisition_tax",
                          "compensation_export",
                          "deemed_input_tax_deduction",
                          "margin_taxation",
                          "method_transition_adjustment"
                        ]
                      },
                      "amount": {
                        "type": "number"
                      },
                      "rate": {
                        "type": "number"
                      },
                      "turnover": {
                        "type": "number"
                      },
                      "currency": {
                        "type": "string",
                        "minLength": 3,
                        "maxLength": 3
                      },
                      "applies": {
                        "type": "boolean"
                      },
                      "note": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedBy": {
            "type": "string"
          }
        }
      },
      "CompanyVatPeriodAdjustment": {
        "type": "object",
        "required": [
          "id",
          "companyId",
          "tenantId",
          "countryCode",
          "period",
          "reportingMethod",
          "entries",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "countryCode": {
            "type": "string"
          },
          "period": {
            "type": "string"
          },
          "reportingMethod": {
            "type": "string",
            "enum": [
              "effectiveReportingMethod",
              "netTaxRateMethod",
              "flatTaxRateMethod",
              "simpleTaxRateMethod"
            ]
          },
          "reportingWindowKey": {
            "type": "string",
            "nullable": true
          },
          "entries": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "adjustmentType",
                "amount"
              ],
              "properties": {
                "adjustmentType": {
                  "type": "string",
                  "enum": [
                    "acquisition_tax",
                    "compensation_export",
                    "deemed_input_tax_deduction",
                    "margin_taxation",
                    "method_transition_adjustment"
                  ]
                },
                "amount": {
                  "type": "number"
                },
                "rate": {
                  "type": "number"
                },
                "turnover": {
                  "type": "number"
                },
                "currency": {
                  "type": "string",
                  "minLength": 3,
                  "maxLength": 3
                },
                "applies": {
                  "type": "boolean"
                },
                "note": {
                  "type": "string"
                }
              }
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedBy": {
            "type": "string"
          }
        }
      },
      "VatReturnBox": {
        "type": "object",
        "required": [
          "code"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "labelKey": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "base",
              "tax",
              "calculated"
            ]
          }
        }
      },
      "VatReturnMapping": {
        "type": "object",
        "required": [
          "vatRuleCode"
        ],
        "properties": {
          "vatRuleCode": {
            "type": "string"
          },
          "salesBaseBox": {
            "type": "string"
          },
          "salesTaxBox": {
            "type": "string"
          },
          "purchaseBaseBox": {
            "type": "string"
          },
          "purchaseTaxBox": {
            "type": "string"
          },
          "baseBox": {
            "type": "string"
          },
          "taxBox": {
            "type": "string"
          },
          "echSalesTarget": {
            "type": "string"
          },
          "echPurchaseTarget": {
            "type": "string"
          }
        }
      },
      "VatReturnEch0217Config": {
        "type": "object",
        "required": [
          "schemaVersion",
          "profile",
          "reportingMethod",
          "formOfReporting"
        ],
        "properties": {
          "schemaVersion": {
            "type": "string"
          },
          "profile": {
            "type": "string"
          },
          "reportingMethod": {
            "type": "string",
            "enum": [
              "effectiveReportingMethod",
              "netTaxRateMethod",
              "flatTaxRateMethod",
              "simpleTaxRateMethod"
            ]
          },
          "formOfReporting": {
            "type": "number",
            "enum": [
              1,
              2
            ]
          },
          "grossOrNet": {
            "type": "number",
            "enum": [
              1,
              2
            ]
          },
          "initialSubmissionType": {
            "type": "number",
            "enum": [
              1,
              2,
              3
            ]
          },
          "correctionSubmissionType": {
            "type": "number",
            "enum": [
              2,
              3
            ]
          },
          "supportedDeclarationTypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "VatReturnMethodConfig": {
        "type": "object",
        "required": [
          "reportingMethod",
          "boxes",
          "mappings"
        ],
        "properties": {
          "reportingMethod": {
            "type": "string",
            "enum": [
              "effectiveReportingMethod",
              "netTaxRateMethod",
              "flatTaxRateMethod",
              "simpleTaxRateMethod"
            ]
          },
          "defaultFilingFrequency": {
            "type": "string",
            "enum": [
              "monthly",
              "quarterly",
              "semiannual",
              "annual"
            ]
          },
          "requiresAnnualApproval": {
            "type": "boolean"
          },
          "computationStrategy": {
            "type": "string",
            "enum": [
              "effective",
              "net_tax_rate"
            ]
          },
          "formNameKey": {
            "type": "string"
          },
          "allowedFilingFrequencies": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "monthly",
                "quarterly",
                "semiannual",
                "annual"
              ]
            }
          },
          "submissionMode": {
            "type": "string",
            "enum": [
              "skill",
              "lifecycle"
            ]
          },
          "submissionSkillName": {
            "type": "string"
          },
          "boxes": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "code"
              ],
              "properties": {
                "code": {
                  "type": "string"
                },
                "labelKey": {
                  "type": "string"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "base",
                    "tax",
                    "calculated"
                  ]
                }
              }
            }
          },
          "mappings": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "vatRuleCode"
              ],
              "properties": {
                "vatRuleCode": {
                  "type": "string"
                },
                "salesBaseBox": {
                  "type": "string"
                },
                "salesTaxBox": {
                  "type": "string"
                },
                "purchaseBaseBox": {
                  "type": "string"
                },
                "purchaseTaxBox": {
                  "type": "string"
                },
                "baseBox": {
                  "type": "string"
                },
                "taxBox": {
                  "type": "string"
                },
                "echSalesTarget": {
                  "type": "string"
                },
                "echPurchaseTarget": {
                  "type": "string"
                }
              }
            }
          },
          "ech0217": {
            "type": "object",
            "required": [
              "schemaVersion",
              "profile",
              "reportingMethod",
              "formOfReporting"
            ],
            "properties": {
              "schemaVersion": {
                "type": "string"
              },
              "profile": {
                "type": "string"
              },
              "reportingMethod": {
                "type": "string",
                "enum": [
                  "effectiveReportingMethod",
                  "netTaxRateMethod",
                  "flatTaxRateMethod",
                  "simpleTaxRateMethod"
                ]
              },
              "formOfReporting": {
                "type": "number",
                "enum": [
                  1,
                  2
                ]
              },
              "grossOrNet": {
                "type": "number",
                "enum": [
                  1,
                  2
                ]
              },
              "initialSubmissionType": {
                "type": "number",
                "enum": [
                  1,
                  2,
                  3
                ]
              },
              "correctionSubmissionType": {
                "type": "number",
                "enum": [
                  2,
                  3
                ]
              },
              "supportedDeclarationTypes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "CompanyVatReportingContext": {
        "type": "object",
        "required": [
          "countryCode",
          "supportedReportingMethods",
          "supportedVatAccountingBases",
          "reportingConfigStatus",
          "diagnostics",
          "config"
        ],
        "properties": {
          "countryCode": {
            "type": "string"
          },
          "supportedReportingMethods": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "effectiveReportingMethod",
                "netTaxRateMethod",
                "flatTaxRateMethod",
                "simpleTaxRateMethod"
              ]
            }
          },
          "supportedVatAccountingBases": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "accrual",
                "cash"
              ]
            }
          },
          "reportingConfigStatus": {
            "type": "string",
            "enum": [
              "missing",
              "incomplete",
              "ready",
              "conflict"
            ]
          },
          "diagnostics": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "code",
                "messageKey",
                "severity",
                "blocking"
              ],
              "properties": {
                "code": {
                  "type": "string"
                },
                "messageKey": {
                  "type": "string"
                },
                "severity": {
                  "type": "string",
                  "enum": [
                    "error",
                    "warning",
                    "info"
                  ]
                },
                "blocking": {
                  "type": "boolean"
                },
                "actions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "kind",
                      "labelKey",
                      "href"
                    ],
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "section",
                          "document",
                          "list"
                        ]
                      },
                      "labelKey": {
                        "type": "string"
                      },
                      "href": {
                        "type": "string"
                      }
                    }
                  }
                },
                "meta": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "currentReportingMethod": {
            "type": "string",
            "enum": [
              "effectiveReportingMethod",
              "netTaxRateMethod",
              "flatTaxRateMethod",
              "simpleTaxRateMethod"
            ]
          },
          "currentFilingFrequency": {
            "type": "string",
            "enum": [
              "monthly",
              "quarterly",
              "semiannual",
              "annual"
            ]
          },
          "currentVatAccountingBasis": {
            "type": "string",
            "enum": [
              "accrual",
              "cash"
            ]
          },
          "activeXmlProfile": {
            "type": "string"
          },
          "config": {
            "allOf": [
              {
                "type": "object",
                "required": [
                  "id",
                  "companyId",
                  "tenantId",
                  "countryCode",
                  "windows",
                  "createdAt",
                  "updatedAt"
                ],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "companyId": {
                    "type": "string"
                  },
                  "tenantId": {
                    "type": "string"
                  },
                  "countryCode": {
                    "type": "string"
                  },
                  "windows": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "key",
                        "reportingMethod",
                        "filingFrequency",
                        "effectiveFrom"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "reportingMethod": {
                          "type": "string",
                          "enum": [
                            "effectiveReportingMethod",
                            "netTaxRateMethod",
                            "flatTaxRateMethod",
                            "simpleTaxRateMethod"
                          ]
                        },
                        "filingFrequency": {
                          "type": "string",
                          "enum": [
                            "monthly",
                            "quarterly",
                            "semiannual",
                            "annual"
                          ]
                        },
                        "vatAccountingBasis": {
                          "type": "string",
                          "enum": [
                            "accrual",
                            "cash"
                          ]
                        },
                        "effectiveFrom": {
                          "type": "string",
                          "format": "date"
                        },
                        "effectiveTo": {
                          "type": "string",
                          "format": "date",
                          "nullable": true
                        },
                        "annualFilingApproved": {
                          "type": "boolean"
                        },
                        "annualFilingApprovalRef": {
                          "type": "string",
                          "nullable": true
                        },
                        "netTaxRateActivities": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "activityKey",
                              "label",
                              "approvedRate"
                            ],
                            "properties": {
                              "activityKey": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "approvedRate": {
                                "type": "number"
                              },
                              "estvApprovalRef": {
                                "type": "string",
                                "nullable": true
                              },
                              "effectiveFrom": {
                                "type": "string",
                                "format": "date"
                              },
                              "effectiveTo": {
                                "type": "string",
                                "format": "date",
                                "nullable": true
                              },
                              "sourceMappings": {
                                "type": "object",
                                "properties": {
                                  "productIds": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    }
                                  },
                                  "revenueAccountCodes": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    }
                                  }
                                }
                              }
                            }
                          }
                        },
                        "adjustments": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "adjustmentType",
                              "amount"
                            ],
                            "properties": {
                              "adjustmentType": {
                                "type": "string",
                                "enum": [
                                  "acquisition_tax",
                                  "compensation_export",
                                  "deemed_input_tax_deduction",
                                  "margin_taxation",
                                  "method_transition_adjustment"
                                ]
                              },
                              "amount": {
                                "type": "number"
                              },
                              "rate": {
                                "type": "number"
                              },
                              "turnover": {
                                "type": "number"
                              },
                              "currency": {
                                "type": "string",
                                "minLength": 3,
                                "maxLength": 3
                              },
                              "applies": {
                                "type": "boolean"
                              },
                              "note": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updatedBy": {
                    "type": "string"
                  }
                }
              }
            ],
            "nullable": true
          },
          "activeWindow": {
            "allOf": [
              {
                "type": "object",
                "required": [
                  "key",
                  "reportingMethod",
                  "filingFrequency",
                  "effectiveFrom"
                ],
                "properties": {
                  "key": {
                    "type": "string"
                  },
                  "reportingMethod": {
                    "type": "string",
                    "enum": [
                      "effectiveReportingMethod",
                      "netTaxRateMethod",
                      "flatTaxRateMethod",
                      "simpleTaxRateMethod"
                    ]
                  },
                  "filingFrequency": {
                    "type": "string",
                    "enum": [
                      "monthly",
                      "quarterly",
                      "semiannual",
                      "annual"
                    ]
                  },
                  "vatAccountingBasis": {
                    "type": "string",
                    "enum": [
                      "accrual",
                      "cash"
                    ]
                  },
                  "effectiveFrom": {
                    "type": "string",
                    "format": "date"
                  },
                  "effectiveTo": {
                    "type": "string",
                    "format": "date",
                    "nullable": true
                  },
                  "annualFilingApproved": {
                    "type": "boolean"
                  },
                  "annualFilingApprovalRef": {
                    "type": "string",
                    "nullable": true
                  },
                  "netTaxRateActivities": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "activityKey",
                        "label",
                        "approvedRate"
                      ],
                      "properties": {
                        "activityKey": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "approvedRate": {
                          "type": "number"
                        },
                        "estvApprovalRef": {
                          "type": "string",
                          "nullable": true
                        },
                        "effectiveFrom": {
                          "type": "string",
                          "format": "date"
                        },
                        "effectiveTo": {
                          "type": "string",
                          "format": "date",
                          "nullable": true
                        },
                        "sourceMappings": {
                          "type": "object",
                          "properties": {
                            "productIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "revenueAccountCodes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "adjustments": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "adjustmentType",
                        "amount"
                      ],
                      "properties": {
                        "adjustmentType": {
                          "type": "string",
                          "enum": [
                            "acquisition_tax",
                            "compensation_export",
                            "deemed_input_tax_deduction",
                            "margin_taxation",
                            "method_transition_adjustment"
                          ]
                        },
                        "amount": {
                          "type": "number"
                        },
                        "rate": {
                          "type": "number"
                        },
                        "turnover": {
                          "type": "number"
                        },
                        "currency": {
                          "type": "string",
                          "minLength": 3,
                          "maxLength": 3
                        },
                        "applies": {
                          "type": "boolean"
                        },
                        "note": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            ],
            "nullable": true
          },
          "activeMethodConfig": {
            "allOf": [
              {
                "type": "object",
                "required": [
                  "reportingMethod",
                  "boxes",
                  "mappings"
                ],
                "properties": {
                  "reportingMethod": {
                    "type": "string",
                    "enum": [
                      "effectiveReportingMethod",
                      "netTaxRateMethod",
                      "flatTaxRateMethod",
                      "simpleTaxRateMethod"
                    ]
                  },
                  "defaultFilingFrequency": {
                    "type": "string",
                    "enum": [
                      "monthly",
                      "quarterly",
                      "semiannual",
                      "annual"
                    ]
                  },
                  "requiresAnnualApproval": {
                    "type": "boolean"
                  },
                  "computationStrategy": {
                    "type": "string",
                    "enum": [
                      "effective",
                      "net_tax_rate"
                    ]
                  },
                  "formNameKey": {
                    "type": "string"
                  },
                  "allowedFilingFrequencies": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "monthly",
                        "quarterly",
                        "semiannual",
                        "annual"
                      ]
                    }
                  },
                  "submissionMode": {
                    "type": "string",
                    "enum": [
                      "skill",
                      "lifecycle"
                    ]
                  },
                  "submissionSkillName": {
                    "type": "string"
                  },
                  "boxes": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "code"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "labelKey": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "base",
                            "tax",
                            "calculated"
                          ]
                        }
                      }
                    }
                  },
                  "mappings": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "vatRuleCode"
                      ],
                      "properties": {
                        "vatRuleCode": {
                          "type": "string"
                        },
                        "salesBaseBox": {
                          "type": "string"
                        },
                        "salesTaxBox": {
                          "type": "string"
                        },
                        "purchaseBaseBox": {
                          "type": "string"
                        },
                        "purchaseTaxBox": {
                          "type": "string"
                        },
                        "baseBox": {
                          "type": "string"
                        },
                        "taxBox": {
                          "type": "string"
                        },
                        "echSalesTarget": {
                          "type": "string"
                        },
                        "echPurchaseTarget": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "ech0217": {
                    "type": "object",
                    "required": [
                      "schemaVersion",
                      "profile",
                      "reportingMethod",
                      "formOfReporting"
                    ],
                    "properties": {
                      "schemaVersion": {
                        "type": "string"
                      },
                      "profile": {
                        "type": "string"
                      },
                      "reportingMethod": {
                        "type": "string",
                        "enum": [
                          "effectiveReportingMethod",
                          "netTaxRateMethod",
                          "flatTaxRateMethod",
                          "simpleTaxRateMethod"
                        ]
                      },
                      "formOfReporting": {
                        "type": "number",
                        "enum": [
                          1,
                          2
                        ]
                      },
                      "grossOrNet": {
                        "type": "number",
                        "enum": [
                          1,
                          2
                        ]
                      },
                      "initialSubmissionType": {
                        "type": "number",
                        "enum": [
                          1,
                          2,
                          3
                        ]
                      },
                      "correctionSubmissionType": {
                        "type": "number",
                        "enum": [
                          2,
                          3
                        ]
                      },
                      "supportedDeclarationTypes": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            ],
            "nullable": true
          }
        }
      },
      "CompanyVatReportingPayload": {
        "type": "object",
        "required": [
          "config",
          "context",
          "periodAdjustments"
        ],
        "properties": {
          "config": {
            "allOf": [
              {
                "type": "object",
                "required": [
                  "id",
                  "companyId",
                  "tenantId",
                  "countryCode",
                  "windows",
                  "createdAt",
                  "updatedAt"
                ],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "companyId": {
                    "type": "string"
                  },
                  "tenantId": {
                    "type": "string"
                  },
                  "countryCode": {
                    "type": "string"
                  },
                  "windows": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "key",
                        "reportingMethod",
                        "filingFrequency",
                        "effectiveFrom"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "reportingMethod": {
                          "type": "string",
                          "enum": [
                            "effectiveReportingMethod",
                            "netTaxRateMethod",
                            "flatTaxRateMethod",
                            "simpleTaxRateMethod"
                          ]
                        },
                        "filingFrequency": {
                          "type": "string",
                          "enum": [
                            "monthly",
                            "quarterly",
                            "semiannual",
                            "annual"
                          ]
                        },
                        "vatAccountingBasis": {
                          "type": "string",
                          "enum": [
                            "accrual",
                            "cash"
                          ]
                        },
                        "effectiveFrom": {
                          "type": "string",
                          "format": "date"
                        },
                        "effectiveTo": {
                          "type": "string",
                          "format": "date",
                          "nullable": true
                        },
                        "annualFilingApproved": {
                          "type": "boolean"
                        },
                        "annualFilingApprovalRef": {
                          "type": "string",
                          "nullable": true
                        },
                        "netTaxRateActivities": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "activityKey",
                              "label",
                              "approvedRate"
                            ],
                            "properties": {
                              "activityKey": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "approvedRate": {
                                "type": "number"
                              },
                              "estvApprovalRef": {
                                "type": "string",
                                "nullable": true
                              },
                              "effectiveFrom": {
                                "type": "string",
                                "format": "date"
                              },
                              "effectiveTo": {
                                "type": "string",
                                "format": "date",
                                "nullable": true
                              },
                              "sourceMappings": {
                                "type": "object",
                                "properties": {
                                  "productIds": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    }
                                  },
                                  "revenueAccountCodes": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    }
                                  }
                                }
                              }
                            }
                          }
                        },
                        "adjustments": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "adjustmentType",
                              "amount"
                            ],
                            "properties": {
                              "adjustmentType": {
                                "type": "string",
                                "enum": [
                                  "acquisition_tax",
                                  "compensation_export",
                                  "deemed_input_tax_deduction",
                                  "margin_taxation",
                                  "method_transition_adjustment"
                                ]
                              },
                              "amount": {
                                "type": "number"
                              },
                              "rate": {
                                "type": "number"
                              },
                              "turnover": {
                                "type": "number"
                              },
                              "currency": {
                                "type": "string",
                                "minLength": 3,
                                "maxLength": 3
                              },
                              "applies": {
                                "type": "boolean"
                              },
                              "note": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updatedBy": {
                    "type": "string"
                  }
                }
              }
            ],
            "nullable": true
          },
          "context": {
            "type": "object",
            "required": [
              "countryCode",
              "supportedReportingMethods",
              "supportedVatAccountingBases",
              "reportingConfigStatus",
              "diagnostics",
              "config"
            ],
            "properties": {
              "countryCode": {
                "type": "string"
              },
              "supportedReportingMethods": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "effectiveReportingMethod",
                    "netTaxRateMethod",
                    "flatTaxRateMethod",
                    "simpleTaxRateMethod"
                  ]
                }
              },
              "supportedVatAccountingBases": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "accrual",
                    "cash"
                  ]
                }
              },
              "reportingConfigStatus": {
                "type": "string",
                "enum": [
                  "missing",
                  "incomplete",
                  "ready",
                  "conflict"
                ]
              },
              "diagnostics": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "code",
                    "messageKey",
                    "severity",
                    "blocking"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "messageKey": {
                      "type": "string"
                    },
                    "severity": {
                      "type": "string",
                      "enum": [
                        "error",
                        "warning",
                        "info"
                      ]
                    },
                    "blocking": {
                      "type": "boolean"
                    },
                    "actions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "kind",
                          "labelKey",
                          "href"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "section",
                              "document",
                              "list"
                            ]
                          },
                          "labelKey": {
                            "type": "string"
                          },
                          "href": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              },
              "currentReportingMethod": {
                "type": "string",
                "enum": [
                  "effectiveReportingMethod",
                  "netTaxRateMethod",
                  "flatTaxRateMethod",
                  "simpleTaxRateMethod"
                ]
              },
              "currentFilingFrequency": {
                "type": "string",
                "enum": [
                  "monthly",
                  "quarterly",
                  "semiannual",
                  "annual"
                ]
              },
              "currentVatAccountingBasis": {
                "type": "string",
                "enum": [
                  "accrual",
                  "cash"
                ]
              },
              "activeXmlProfile": {
                "type": "string"
              },
              "config": {
                "allOf": [
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "companyId",
                      "tenantId",
                      "countryCode",
                      "windows",
                      "createdAt",
                      "updatedAt"
                    ],
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "companyId": {
                        "type": "string"
                      },
                      "tenantId": {
                        "type": "string"
                      },
                      "countryCode": {
                        "type": "string"
                      },
                      "windows": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "key",
                            "reportingMethod",
                            "filingFrequency",
                            "effectiveFrom"
                          ],
                          "properties": {
                            "key": {
                              "type": "string"
                            },
                            "reportingMethod": {
                              "type": "string",
                              "enum": [
                                "effectiveReportingMethod",
                                "netTaxRateMethod",
                                "flatTaxRateMethod",
                                "simpleTaxRateMethod"
                              ]
                            },
                            "filingFrequency": {
                              "type": "string",
                              "enum": [
                                "monthly",
                                "quarterly",
                                "semiannual",
                                "annual"
                              ]
                            },
                            "vatAccountingBasis": {
                              "type": "string",
                              "enum": [
                                "accrual",
                                "cash"
                              ]
                            },
                            "effectiveFrom": {
                              "type": "string",
                              "format": "date"
                            },
                            "effectiveTo": {
                              "type": "string",
                              "format": "date",
                              "nullable": true
                            },
                            "annualFilingApproved": {
                              "type": "boolean"
                            },
                            "annualFilingApprovalRef": {
                              "type": "string",
                              "nullable": true
                            },
                            "netTaxRateActivities": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "activityKey",
                                  "label",
                                  "approvedRate"
                                ],
                                "properties": {
                                  "activityKey": {
                                    "type": "string"
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "approvedRate": {
                                    "type": "number"
                                  },
                                  "estvApprovalRef": {
                                    "type": "string",
                                    "nullable": true
                                  },
                                  "effectiveFrom": {
                                    "type": "string",
                                    "format": "date"
                                  },
                                  "effectiveTo": {
                                    "type": "string",
                                    "format": "date",
                                    "nullable": true
                                  },
                                  "sourceMappings": {
                                    "type": "object",
                                    "properties": {
                                      "productIds": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "revenueAccountCodes": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "adjustments": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "adjustmentType",
                                  "amount"
                                ],
                                "properties": {
                                  "adjustmentType": {
                                    "type": "string",
                                    "enum": [
                                      "acquisition_tax",
                                      "compensation_export",
                                      "deemed_input_tax_deduction",
                                      "margin_taxation",
                                      "method_transition_adjustment"
                                    ]
                                  },
                                  "amount": {
                                    "type": "number"
                                  },
                                  "rate": {
                                    "type": "number"
                                  },
                                  "turnover": {
                                    "type": "number"
                                  },
                                  "currency": {
                                    "type": "string",
                                    "minLength": 3,
                                    "maxLength": 3
                                  },
                                  "applies": {
                                    "type": "boolean"
                                  },
                                  "note": {
                                    "type": "string"
                                  }
                                }
                              }
                            }
                          }
                        }
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedBy": {
                        "type": "string"
                      }
                    }
                  }
                ],
                "nullable": true
              },
              "activeWindow": {
                "allOf": [
                  {
                    "type": "object",
                    "required": [
                      "key",
                      "reportingMethod",
                      "filingFrequency",
                      "effectiveFrom"
                    ],
                    "properties": {
                      "key": {
                        "type": "string"
                      },
                      "reportingMethod": {
                        "type": "string",
                        "enum": [
                          "effectiveReportingMethod",
                          "netTaxRateMethod",
                          "flatTaxRateMethod",
                          "simpleTaxRateMethod"
                        ]
                      },
                      "filingFrequency": {
                        "type": "string",
                        "enum": [
                          "monthly",
                          "quarterly",
                          "semiannual",
                          "annual"
                        ]
                      },
                      "vatAccountingBasis": {
                        "type": "string",
                        "enum": [
                          "accrual",
                          "cash"
                        ]
                      },
                      "effectiveFrom": {
                        "type": "string",
                        "format": "date"
                      },
                      "effectiveTo": {
                        "type": "string",
                        "format": "date",
                        "nullable": true
                      },
                      "annualFilingApproved": {
                        "type": "boolean"
                      },
                      "annualFilingApprovalRef": {
                        "type": "string",
                        "nullable": true
                      },
                      "netTaxRateActivities": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "activityKey",
                            "label",
                            "approvedRate"
                          ],
                          "properties": {
                            "activityKey": {
                              "type": "string"
                            },
                            "label": {
                              "type": "string"
                            },
                            "approvedRate": {
                              "type": "number"
                            },
                            "estvApprovalRef": {
                              "type": "string",
                              "nullable": true
                            },
                            "effectiveFrom": {
                              "type": "string",
                              "format": "date"
                            },
                            "effectiveTo": {
                              "type": "string",
                              "format": "date",
                              "nullable": true
                            },
                            "sourceMappings": {
                              "type": "object",
                              "properties": {
                                "productIds": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "revenueAccountCodes": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              }
                            }
                          }
                        }
                      },
                      "adjustments": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "adjustmentType",
                            "amount"
                          ],
                          "properties": {
                            "adjustmentType": {
                              "type": "string",
                              "enum": [
                                "acquisition_tax",
                                "compensation_export",
                                "deemed_input_tax_deduction",
                                "margin_taxation",
                                "method_transition_adjustment"
                              ]
                            },
                            "amount": {
                              "type": "number"
                            },
                            "rate": {
                              "type": "number"
                            },
                            "turnover": {
                              "type": "number"
                            },
                            "currency": {
                              "type": "string",
                              "minLength": 3,
                              "maxLength": 3
                            },
                            "applies": {
                              "type": "boolean"
                            },
                            "note": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  }
                ],
                "nullable": true
              },
              "activeMethodConfig": {
                "allOf": [
                  {
                    "type": "object",
                    "required": [
                      "reportingMethod",
                      "boxes",
                      "mappings"
                    ],
                    "properties": {
                      "reportingMethod": {
                        "type": "string",
                        "enum": [
                          "effectiveReportingMethod",
                          "netTaxRateMethod",
                          "flatTaxRateMethod",
                          "simpleTaxRateMethod"
                        ]
                      },
                      "defaultFilingFrequency": {
                        "type": "string",
                        "enum": [
                          "monthly",
                          "quarterly",
                          "semiannual",
                          "annual"
                        ]
                      },
                      "requiresAnnualApproval": {
                        "type": "boolean"
                      },
                      "computationStrategy": {
                        "type": "string",
                        "enum": [
                          "effective",
                          "net_tax_rate"
                        ]
                      },
                      "formNameKey": {
                        "type": "string"
                      },
                      "allowedFilingFrequencies": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "monthly",
                            "quarterly",
                            "semiannual",
                            "annual"
                          ]
                        }
                      },
                      "submissionMode": {
                        "type": "string",
                        "enum": [
                          "skill",
                          "lifecycle"
                        ]
                      },
                      "submissionSkillName": {
                        "type": "string"
                      },
                      "boxes": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "code"
                          ],
                          "properties": {
                            "code": {
                              "type": "string"
                            },
                            "labelKey": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "base",
                                "tax",
                                "calculated"
                              ]
                            }
                          }
                        }
                      },
                      "mappings": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "vatRuleCode"
                          ],
                          "properties": {
                            "vatRuleCode": {
                              "type": "string"
                            },
                            "salesBaseBox": {
                              "type": "string"
                            },
                            "salesTaxBox": {
                              "type": "string"
                            },
                            "purchaseBaseBox": {
                              "type": "string"
                            },
                            "purchaseTaxBox": {
                              "type": "string"
                            },
                            "baseBox": {
                              "type": "string"
                            },
                            "taxBox": {
                              "type": "string"
                            },
                            "echSalesTarget": {
                              "type": "string"
                            },
                            "echPurchaseTarget": {
                              "type": "string"
                            }
                          }
                        }
                      },
                      "ech0217": {
                        "type": "object",
                        "required": [
                          "schemaVersion",
                          "profile",
                          "reportingMethod",
                          "formOfReporting"
                        ],
                        "properties": {
                          "schemaVersion": {
                            "type": "string"
                          },
                          "profile": {
                            "type": "string"
                          },
                          "reportingMethod": {
                            "type": "string",
                            "enum": [
                              "effectiveReportingMethod",
                              "netTaxRateMethod",
                              "flatTaxRateMethod",
                              "simpleTaxRateMethod"
                            ]
                          },
                          "formOfReporting": {
                            "type": "number",
                            "enum": [
                              1,
                              2
                            ]
                          },
                          "grossOrNet": {
                            "type": "number",
                            "enum": [
                              1,
                              2
                            ]
                          },
                          "initialSubmissionType": {
                            "type": "number",
                            "enum": [
                              1,
                              2,
                              3
                            ]
                          },
                          "correctionSubmissionType": {
                            "type": "number",
                            "enum": [
                              2,
                              3
                            ]
                          },
                          "supportedDeclarationTypes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  }
                ],
                "nullable": true
              }
            }
          },
          "periodAdjustments": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "companyId",
                "tenantId",
                "countryCode",
                "period",
                "reportingMethod",
                "entries",
                "createdAt",
                "updatedAt"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "companyId": {
                  "type": "string"
                },
                "tenantId": {
                  "type": "string"
                },
                "countryCode": {
                  "type": "string"
                },
                "period": {
                  "type": "string"
                },
                "reportingMethod": {
                  "type": "string",
                  "enum": [
                    "effectiveReportingMethod",
                    "netTaxRateMethod",
                    "flatTaxRateMethod",
                    "simpleTaxRateMethod"
                  ]
                },
                "reportingWindowKey": {
                  "type": "string",
                  "nullable": true
                },
                "entries": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "adjustmentType",
                      "amount"
                    ],
                    "properties": {
                      "adjustmentType": {
                        "type": "string",
                        "enum": [
                          "acquisition_tax",
                          "compensation_export",
                          "deemed_input_tax_deduction",
                          "margin_taxation",
                          "method_transition_adjustment"
                        ]
                      },
                      "amount": {
                        "type": "number"
                      },
                      "rate": {
                        "type": "number"
                      },
                      "turnover": {
                        "type": "number"
                      },
                      "currency": {
                        "type": "string",
                        "minLength": 3,
                        "maxLength": 3
                      },
                      "applies": {
                        "type": "boolean"
                      },
                      "note": {
                        "type": "string"
                      }
                    }
                  }
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedBy": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "CompanyVatReportingSuccessResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "data": {
            "type": "object",
            "required": [
              "config",
              "context",
              "periodAdjustments"
            ],
            "properties": {
              "config": {
                "allOf": [
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "companyId",
                      "tenantId",
                      "countryCode",
                      "windows",
                      "createdAt",
                      "updatedAt"
                    ],
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "companyId": {
                        "type": "string"
                      },
                      "tenantId": {
                        "type": "string"
                      },
                      "countryCode": {
                        "type": "string"
                      },
                      "windows": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "key",
                            "reportingMethod",
                            "filingFrequency",
                            "effectiveFrom"
                          ],
                          "properties": {
                            "key": {
                              "type": "string"
                            },
                            "reportingMethod": {
                              "type": "string",
                              "enum": [
                                "effectiveReportingMethod",
                                "netTaxRateMethod",
                                "flatTaxRateMethod",
                                "simpleTaxRateMethod"
                              ]
                            },
                            "filingFrequency": {
                              "type": "string",
                              "enum": [
                                "monthly",
                                "quarterly",
                                "semiannual",
                                "annual"
                              ]
                            },
                            "vatAccountingBasis": {
                              "type": "string",
                              "enum": [
                                "accrual",
                                "cash"
                              ]
                            },
                            "effectiveFrom": {
                              "type": "string",
                              "format": "date"
                            },
                            "effectiveTo": {
                              "type": "string",
                              "format": "date",
                              "nullable": true
                            },
                            "annualFilingApproved": {
                              "type": "boolean"
                            },
                            "annualFilingApprovalRef": {
                              "type": "string",
                              "nullable": true
                            },
                            "netTaxRateActivities": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "activityKey",
                                  "label",
                                  "approvedRate"
                                ],
                                "properties": {
                                  "activityKey": {
                                    "type": "string"
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "approvedRate": {
                                    "type": "number"
                                  },
                                  "estvApprovalRef": {
                                    "type": "string",
                                    "nullable": true
                                  },
                                  "effectiveFrom": {
                                    "type": "string",
                                    "format": "date"
                                  },
                                  "effectiveTo": {
                                    "type": "string",
                                    "format": "date",
                                    "nullable": true
                                  },
                                  "sourceMappings": {
                                    "type": "object",
                                    "properties": {
                                      "productIds": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "revenueAccountCodes": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "adjustments": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "adjustmentType",
                                  "amount"
                                ],
                                "properties": {
                                  "adjustmentType": {
                                    "type": "string",
                                    "enum": [
                                      "acquisition_tax",
                                      "compensation_export",
                                      "deemed_input_tax_deduction",
                                      "margin_taxation",
                                      "method_transition_adjustment"
                                    ]
                                  },
                                  "amount": {
                                    "type": "number"
                                  },
                                  "rate": {
                                    "type": "number"
                                  },
                                  "turnover": {
                                    "type": "number"
                                  },
                                  "currency": {
                                    "type": "string",
                                    "minLength": 3,
                                    "maxLength": 3
                                  },
                                  "applies": {
                                    "type": "boolean"
                                  },
                                  "note": {
                                    "type": "string"
                                  }
                                }
                              }
                            }
                          }
                        }
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedBy": {
                        "type": "string"
                      }
                    }
                  }
                ],
                "nullable": true
              },
              "context": {
                "type": "object",
                "required": [
                  "countryCode",
                  "supportedReportingMethods",
                  "supportedVatAccountingBases",
                  "reportingConfigStatus",
                  "diagnostics",
                  "config"
                ],
                "properties": {
                  "countryCode": {
                    "type": "string"
                  },
                  "supportedReportingMethods": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "effectiveReportingMethod",
                        "netTaxRateMethod",
                        "flatTaxRateMethod",
                        "simpleTaxRateMethod"
                      ]
                    }
                  },
                  "supportedVatAccountingBases": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "accrual",
                        "cash"
                      ]
                    }
                  },
                  "reportingConfigStatus": {
                    "type": "string",
                    "enum": [
                      "missing",
                      "incomplete",
                      "ready",
                      "conflict"
                    ]
                  },
                  "diagnostics": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "code",
                        "messageKey",
                        "severity",
                        "blocking"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "messageKey": {
                          "type": "string"
                        },
                        "severity": {
                          "type": "string",
                          "enum": [
                            "error",
                            "warning",
                            "info"
                          ]
                        },
                        "blocking": {
                          "type": "boolean"
                        },
                        "actions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "kind",
                              "labelKey",
                              "href"
                            ],
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "section",
                                  "document",
                                  "list"
                                ]
                              },
                              "labelKey": {
                                "type": "string"
                              },
                              "href": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "meta": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  },
                  "currentReportingMethod": {
                    "type": "string",
                    "enum": [
                      "effectiveReportingMethod",
                      "netTaxRateMethod",
                      "flatTaxRateMethod",
                      "simpleTaxRateMethod"
                    ]
                  },
                  "currentFilingFrequency": {
                    "type": "string",
                    "enum": [
                      "monthly",
                      "quarterly",
                      "semiannual",
                      "annual"
                    ]
                  },
                  "currentVatAccountingBasis": {
                    "type": "string",
                    "enum": [
                      "accrual",
                      "cash"
                    ]
                  },
                  "activeXmlProfile": {
                    "type": "string"
                  },
                  "config": {
                    "allOf": [
                      {
                        "type": "object",
                        "required": [
                          "id",
                          "companyId",
                          "tenantId",
                          "countryCode",
                          "windows",
                          "createdAt",
                          "updatedAt"
                        ],
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "companyId": {
                            "type": "string"
                          },
                          "tenantId": {
                            "type": "string"
                          },
                          "countryCode": {
                            "type": "string"
                          },
                          "windows": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "key",
                                "reportingMethod",
                                "filingFrequency",
                                "effectiveFrom"
                              ],
                              "properties": {
                                "key": {
                                  "type": "string"
                                },
                                "reportingMethod": {
                                  "type": "string",
                                  "enum": [
                                    "effectiveReportingMethod",
                                    "netTaxRateMethod",
                                    "flatTaxRateMethod",
                                    "simpleTaxRateMethod"
                                  ]
                                },
                                "filingFrequency": {
                                  "type": "string",
                                  "enum": [
                                    "monthly",
                                    "quarterly",
                                    "semiannual",
                                    "annual"
                                  ]
                                },
                                "vatAccountingBasis": {
                                  "type": "string",
                                  "enum": [
                                    "accrual",
                                    "cash"
                                  ]
                                },
                                "effectiveFrom": {
                                  "type": "string",
                                  "format": "date"
                                },
                                "effectiveTo": {
                                  "type": "string",
                                  "format": "date",
                                  "nullable": true
                                },
                                "annualFilingApproved": {
                                  "type": "boolean"
                                },
                                "annualFilingApprovalRef": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "netTaxRateActivities": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "required": [
                                      "activityKey",
                                      "label",
                                      "approvedRate"
                                    ],
                                    "properties": {
                                      "activityKey": {
                                        "type": "string"
                                      },
                                      "label": {
                                        "type": "string"
                                      },
                                      "approvedRate": {
                                        "type": "number"
                                      },
                                      "estvApprovalRef": {
                                        "type": "string",
                                        "nullable": true
                                      },
                                      "effectiveFrom": {
                                        "type": "string",
                                        "format": "date"
                                      },
                                      "effectiveTo": {
                                        "type": "string",
                                        "format": "date",
                                        "nullable": true
                                      },
                                      "sourceMappings": {
                                        "type": "object",
                                        "properties": {
                                          "productIds": {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          "revenueAccountCodes": {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          }
                                        }
                                      }
                                    }
                                  }
                                },
                                "adjustments": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "required": [
                                      "adjustmentType",
                                      "amount"
                                    ],
                                    "properties": {
                                      "adjustmentType": {
                                        "type": "string",
                                        "enum": [
                                          "acquisition_tax",
                                          "compensation_export",
                                          "deemed_input_tax_deduction",
                                          "margin_taxation",
                                          "method_transition_adjustment"
                                        ]
                                      },
                                      "amount": {
                                        "type": "number"
                                      },
                                      "rate": {
                                        "type": "number"
                                      },
                                      "turnover": {
                                        "type": "number"
                                      },
                                      "currency": {
                                        "type": "string",
                                        "minLength": 3,
                                        "maxLength": 3
                                      },
                                      "applies": {
                                        "type": "boolean"
                                      },
                                      "note": {
                                        "type": "string"
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedBy": {
                            "type": "string"
                          }
                        }
                      }
                    ],
                    "nullable": true
                  },
                  "activeWindow": {
                    "allOf": [
                      {
                        "type": "object",
                        "required": [
                          "key",
                          "reportingMethod",
                          "filingFrequency",
                          "effectiveFrom"
                        ],
                        "properties": {
                          "key": {
                            "type": "string"
                          },
                          "reportingMethod": {
                            "type": "string",
                            "enum": [
                              "effectiveReportingMethod",
                              "netTaxRateMethod",
                              "flatTaxRateMethod",
                              "simpleTaxRateMethod"
                            ]
                          },
                          "filingFrequency": {
                            "type": "string",
                            "enum": [
                              "monthly",
                              "quarterly",
                              "semiannual",
                              "annual"
                            ]
                          },
                          "vatAccountingBasis": {
                            "type": "string",
                            "enum": [
                              "accrual",
                              "cash"
                            ]
                          },
                          "effectiveFrom": {
                            "type": "string",
                            "format": "date"
                          },
                          "effectiveTo": {
                            "type": "string",
                            "format": "date",
                            "nullable": true
                          },
                          "annualFilingApproved": {
                            "type": "boolean"
                          },
                          "annualFilingApprovalRef": {
                            "type": "string",
                            "nullable": true
                          },
                          "netTaxRateActivities": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "activityKey",
                                "label",
                                "approvedRate"
                              ],
                              "properties": {
                                "activityKey": {
                                  "type": "string"
                                },
                                "label": {
                                  "type": "string"
                                },
                                "approvedRate": {
                                  "type": "number"
                                },
                                "estvApprovalRef": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "effectiveFrom": {
                                  "type": "string",
                                  "format": "date"
                                },
                                "effectiveTo": {
                                  "type": "string",
                                  "format": "date",
                                  "nullable": true
                                },
                                "sourceMappings": {
                                  "type": "object",
                                  "properties": {
                                    "productIds": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "revenueAccountCodes": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "adjustments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "adjustmentType",
                                "amount"
                              ],
                              "properties": {
                                "adjustmentType": {
                                  "type": "string",
                                  "enum": [
                                    "acquisition_tax",
                                    "compensation_export",
                                    "deemed_input_tax_deduction",
                                    "margin_taxation",
                                    "method_transition_adjustment"
                                  ]
                                },
                                "amount": {
                                  "type": "number"
                                },
                                "rate": {
                                  "type": "number"
                                },
                                "turnover": {
                                  "type": "number"
                                },
                                "currency": {
                                  "type": "string",
                                  "minLength": 3,
                                  "maxLength": 3
                                },
                                "applies": {
                                  "type": "boolean"
                                },
                                "note": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        }
                      }
                    ],
                    "nullable": true
                  },
                  "activeMethodConfig": {
                    "allOf": [
                      {
                        "type": "object",
                        "required": [
                          "reportingMethod",
                          "boxes",
                          "mappings"
                        ],
                        "properties": {
                          "reportingMethod": {
                            "type": "string",
                            "enum": [
                              "effectiveReportingMethod",
                              "netTaxRateMethod",
                              "flatTaxRateMethod",
                              "simpleTaxRateMethod"
                            ]
                          },
                          "defaultFilingFrequency": {
                            "type": "string",
                            "enum": [
                              "monthly",
                              "quarterly",
                              "semiannual",
                              "annual"
                            ]
                          },
                          "requiresAnnualApproval": {
                            "type": "boolean"
                          },
                          "computationStrategy": {
                            "type": "string",
                            "enum": [
                              "effective",
                              "net_tax_rate"
                            ]
                          },
                          "formNameKey": {
                            "type": "string"
                          },
                          "allowedFilingFrequencies": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "monthly",
                                "quarterly",
                                "semiannual",
                                "annual"
                              ]
                            }
                          },
                          "submissionMode": {
                            "type": "string",
                            "enum": [
                              "skill",
                              "lifecycle"
                            ]
                          },
                          "submissionSkillName": {
                            "type": "string"
                          },
                          "boxes": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "code"
                              ],
                              "properties": {
                                "code": {
                                  "type": "string"
                                },
                                "labelKey": {
                                  "type": "string"
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "base",
                                    "tax",
                                    "calculated"
                                  ]
                                }
                              }
                            }
                          },
                          "mappings": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "vatRuleCode"
                              ],
                              "properties": {
                                "vatRuleCode": {
                                  "type": "string"
                                },
                                "salesBaseBox": {
                                  "type": "string"
                                },
                                "salesTaxBox": {
                                  "type": "string"
                                },
                                "purchaseBaseBox": {
                                  "type": "string"
                                },
                                "purchaseTaxBox": {
                                  "type": "string"
                                },
                                "baseBox": {
                                  "type": "string"
                                },
                                "taxBox": {
                                  "type": "string"
                                },
                                "echSalesTarget": {
                                  "type": "string"
                                },
                                "echPurchaseTarget": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "ech0217": {
                            "type": "object",
                            "required": [
                              "schemaVersion",
                              "profile",
                              "reportingMethod",
                              "formOfReporting"
                            ],
                            "properties": {
                              "schemaVersion": {
                                "type": "string"
                              },
                              "profile": {
                                "type": "string"
                              },
                              "reportingMethod": {
                                "type": "string",
                                "enum": [
                                  "effectiveReportingMethod",
                                  "netTaxRateMethod",
                                  "flatTaxRateMethod",
                                  "simpleTaxRateMethod"
                                ]
                              },
                              "formOfReporting": {
                                "type": "number",
                                "enum": [
                                  1,
                                  2
                                ]
                              },
                              "grossOrNet": {
                                "type": "number",
                                "enum": [
                                  1,
                                  2
                                ]
                              },
                              "initialSubmissionType": {
                                "type": "number",
                                "enum": [
                                  1,
                                  2,
                                  3
                                ]
                              },
                              "correctionSubmissionType": {
                                "type": "number",
                                "enum": [
                                  2,
                                  3
                                ]
                              },
                              "supportedDeclarationTypes": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        }
                      }
                    ],
                    "nullable": true
                  }
                }
              },
              "periodAdjustments": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "id",
                    "companyId",
                    "tenantId",
                    "countryCode",
                    "period",
                    "reportingMethod",
                    "entries",
                    "createdAt",
                    "updatedAt"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "companyId": {
                      "type": "string"
                    },
                    "tenantId": {
                      "type": "string"
                    },
                    "countryCode": {
                      "type": "string"
                    },
                    "period": {
                      "type": "string"
                    },
                    "reportingMethod": {
                      "type": "string",
                      "enum": [
                        "effectiveReportingMethod",
                        "netTaxRateMethod",
                        "flatTaxRateMethod",
                        "simpleTaxRateMethod"
                      ]
                    },
                    "reportingWindowKey": {
                      "type": "string",
                      "nullable": true
                    },
                    "entries": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "adjustmentType",
                          "amount"
                        ],
                        "properties": {
                          "adjustmentType": {
                            "type": "string",
                            "enum": [
                              "acquisition_tax",
                              "compensation_export",
                              "deemed_input_tax_deduction",
                              "margin_taxation",
                              "method_transition_adjustment"
                            ]
                          },
                          "amount": {
                            "type": "number"
                          },
                          "rate": {
                            "type": "number"
                          },
                          "turnover": {
                            "type": "number"
                          },
                          "currency": {
                            "type": "string",
                            "minLength": 3,
                            "maxLength": 3
                          },
                          "applies": {
                            "type": "boolean"
                          },
                          "note": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedBy": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "RecordRelationshipPolicy": {
        "type": "object",
        "required": [
          "direction",
          "onForbidden",
          "emptyBehavior",
          "archivedPolicy"
        ],
        "properties": {
          "direction": {
            "type": "string",
            "enum": [
              "source",
              "target",
              "both"
            ]
          },
          "onForbidden": {
            "type": "string",
            "enum": [
              "hide",
              "teaser"
            ]
          },
          "emptyBehavior": {
            "type": "string",
            "enum": [
              "hide",
              "placeholder",
              "cta"
            ]
          },
          "archivedPolicy": {
            "type": "object",
            "required": [
              "strip",
              "section",
              "list"
            ],
            "properties": {
              "strip": {
                "type": "string",
                "enum": [
                  "exclude"
                ]
              },
              "section": {
                "type": "string",
                "enum": [
                  "exclude",
                  "show_badge"
                ]
              },
              "list": {
                "type": "string",
                "enum": [
                  "exclude",
                  "include"
                ]
              }
            }
          },
          "primarySelection": {
            "type": "string",
            "enum": [
              "primary_flag",
              "active_first",
              "open_first",
              "recent_first"
            ]
          },
          "permission": {
            "type": "string"
          }
        }
      },
      "RelationSummaryBadge": {
        "type": "object",
        "required": [
          "label"
        ],
        "properties": {
          "label": {
            "type": "string"
          },
          "tone": {
            "type": "string",
            "enum": [
              "default",
              "success",
              "warning",
              "destructive",
              "secondary",
              "outline"
            ]
          }
        }
      },
      "RelationSummaryItem": {
        "type": "object",
        "required": [
          "key",
          "label",
          "entityType",
          "policy"
        ],
        "properties": {
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "entityType": {
            "type": "string",
            "enum": [
              "contact_person",
              "contact_organization",
              "crm_lead",
              "crm_opportunity",
              "customer_account",
              "service_contract",
              "project",
              "quote",
              "order",
              "invoice"
            ]
          },
          "entityId": {
            "type": "string"
          },
          "href": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "count": {
            "type": "number"
          },
          "isArchived": {
            "type": "boolean"
          },
          "badges": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "label"
              ],
              "properties": {
                "label": {
                  "type": "string"
                },
                "tone": {
                  "type": "string",
                  "enum": [
                    "default",
                    "success",
                    "warning",
                    "destructive",
                    "secondary",
                    "outline"
                  ]
                }
              }
            }
          },
          "policy": {
            "type": "object",
            "required": [
              "direction",
              "onForbidden",
              "emptyBehavior",
              "archivedPolicy"
            ],
            "properties": {
              "direction": {
                "type": "string",
                "enum": [
                  "source",
                  "target",
                  "both"
                ]
              },
              "onForbidden": {
                "type": "string",
                "enum": [
                  "hide",
                  "teaser"
                ]
              },
              "emptyBehavior": {
                "type": "string",
                "enum": [
                  "hide",
                  "placeholder",
                  "cta"
                ]
              },
              "archivedPolicy": {
                "type": "object",
                "required": [
                  "strip",
                  "section",
                  "list"
                ],
                "properties": {
                  "strip": {
                    "type": "string",
                    "enum": [
                      "exclude"
                    ]
                  },
                  "section": {
                    "type": "string",
                    "enum": [
                      "exclude",
                      "show_badge"
                    ]
                  },
                  "list": {
                    "type": "string",
                    "enum": [
                      "exclude",
                      "include"
                    ]
                  }
                }
              },
              "primarySelection": {
                "type": "string",
                "enum": [
                  "primary_flag",
                  "active_first",
                  "open_first",
                  "recent_first"
                ]
              },
              "permission": {
                "type": "string"
              }
            }
          }
        }
      },
      "RelationSummaryCollection": {
        "type": "object",
        "required": [
          "key",
          "label",
          "items",
          "totalCount",
          "policy"
        ],
        "properties": {
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "totalCount": {
            "type": "number"
          },
          "viewAllHref": {
            "type": "string"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "key",
                "label",
                "entityType",
                "policy"
              ],
              "properties": {
                "key": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "entityType": {
                  "type": "string",
                  "enum": [
                    "contact_person",
                    "contact_organization",
                    "crm_lead",
                    "crm_opportunity",
                    "customer_account",
                    "service_contract",
                    "project",
                    "quote",
                    "order",
                    "invoice"
                  ]
                },
                "entityId": {
                  "type": "string"
                },
                "href": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "count": {
                  "type": "number"
                },
                "isArchived": {
                  "type": "boolean"
                },
                "badges": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "label"
                    ],
                    "properties": {
                      "label": {
                        "type": "string"
                      },
                      "tone": {
                        "type": "string",
                        "enum": [
                          "default",
                          "success",
                          "warning",
                          "destructive",
                          "secondary",
                          "outline"
                        ]
                      }
                    }
                  }
                },
                "policy": {
                  "type": "object",
                  "required": [
                    "direction",
                    "onForbidden",
                    "emptyBehavior",
                    "archivedPolicy"
                  ],
                  "properties": {
                    "direction": {
                      "type": "string",
                      "enum": [
                        "source",
                        "target",
                        "both"
                      ]
                    },
                    "onForbidden": {
                      "type": "string",
                      "enum": [
                        "hide",
                        "teaser"
                      ]
                    },
                    "emptyBehavior": {
                      "type": "string",
                      "enum": [
                        "hide",
                        "placeholder",
                        "cta"
                      ]
                    },
                    "archivedPolicy": {
                      "type": "object",
                      "required": [
                        "strip",
                        "section",
                        "list"
                      ],
                      "properties": {
                        "strip": {
                          "type": "string",
                          "enum": [
                            "exclude"
                          ]
                        },
                        "section": {
                          "type": "string",
                          "enum": [
                            "exclude",
                            "show_badge"
                          ]
                        },
                        "list": {
                          "type": "string",
                          "enum": [
                            "exclude",
                            "include"
                          ]
                        }
                      }
                    },
                    "primarySelection": {
                      "type": "string",
                      "enum": [
                        "primary_flag",
                        "active_first",
                        "open_first",
                        "recent_first"
                      ]
                    },
                    "permission": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "policy": {
            "type": "object",
            "required": [
              "direction",
              "onForbidden",
              "emptyBehavior",
              "archivedPolicy"
            ],
            "properties": {
              "direction": {
                "type": "string",
                "enum": [
                  "source",
                  "target",
                  "both"
                ]
              },
              "onForbidden": {
                "type": "string",
                "enum": [
                  "hide",
                  "teaser"
                ]
              },
              "emptyBehavior": {
                "type": "string",
                "enum": [
                  "hide",
                  "placeholder",
                  "cta"
                ]
              },
              "archivedPolicy": {
                "type": "object",
                "required": [
                  "strip",
                  "section",
                  "list"
                ],
                "properties": {
                  "strip": {
                    "type": "string",
                    "enum": [
                      "exclude"
                    ]
                  },
                  "section": {
                    "type": "string",
                    "enum": [
                      "exclude",
                      "show_badge"
                    ]
                  },
                  "list": {
                    "type": "string",
                    "enum": [
                      "exclude",
                      "include"
                    ]
                  }
                }
              },
              "primarySelection": {
                "type": "string",
                "enum": [
                  "primary_flag",
                  "active_first",
                  "open_first",
                  "recent_first"
                ]
              },
              "permission": {
                "type": "string"
              }
            }
          }
        }
      },
      "RelationSummaryAction": {
        "type": "object",
        "required": [
          "key",
          "relationshipKey",
          "label"
        ],
        "properties": {
          "key": {
            "type": "string"
          },
          "relationshipKey": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "href": {
            "type": "string"
          },
          "intent": {
            "type": "string",
            "enum": [
              "navigation",
              "utility"
            ]
          },
          "variant": {
            "type": "string",
            "enum": [
              "default",
              "secondary",
              "outline"
            ]
          },
          "permission": {
            "type": "string"
          }
        }
      },
      "EntityRelationsSummaryPartialFailure": {
        "type": "object",
        "required": [
          "hasPartialFailure",
          "failedKeys"
        ],
        "properties": {
          "hasPartialFailure": {
            "type": "boolean"
          },
          "failedKeys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "EntityRelationsSummary": {
        "type": "object",
        "required": [
          "routeId",
          "entityType",
          "entityId",
          "primary",
          "collections",
          "actions"
        ],
        "properties": {
          "routeId": {
            "type": "string"
          },
          "entityType": {
            "type": "string",
            "enum": [
              "contact_person",
              "contact_organization",
              "crm_lead",
              "crm_opportunity",
              "customer_account",
              "service_contract",
              "project",
              "quote",
              "order",
              "invoice"
            ]
          },
          "entityId": {
            "type": "string"
          },
          "primary": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "key",
                "label",
                "entityType",
                "policy"
              ],
              "properties": {
                "key": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "entityType": {
                  "type": "string",
                  "enum": [
                    "contact_person",
                    "contact_organization",
                    "crm_lead",
                    "crm_opportunity",
                    "customer_account",
                    "service_contract",
                    "project",
                    "quote",
                    "order",
                    "invoice"
                  ]
                },
                "entityId": {
                  "type": "string"
                },
                "href": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "count": {
                  "type": "number"
                },
                "isArchived": {
                  "type": "boolean"
                },
                "badges": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "label"
                    ],
                    "properties": {
                      "label": {
                        "type": "string"
                      },
                      "tone": {
                        "type": "string",
                        "enum": [
                          "default",
                          "success",
                          "warning",
                          "destructive",
                          "secondary",
                          "outline"
                        ]
                      }
                    }
                  }
                },
                "policy": {
                  "type": "object",
                  "required": [
                    "direction",
                    "onForbidden",
                    "emptyBehavior",
                    "archivedPolicy"
                  ],
                  "properties": {
                    "direction": {
                      "type": "string",
                      "enum": [
                        "source",
                        "target",
                        "both"
                      ]
                    },
                    "onForbidden": {
                      "type": "string",
                      "enum": [
                        "hide",
                        "teaser"
                      ]
                    },
                    "emptyBehavior": {
                      "type": "string",
                      "enum": [
                        "hide",
                        "placeholder",
                        "cta"
                      ]
                    },
                    "archivedPolicy": {
                      "type": "object",
                      "required": [
                        "strip",
                        "section",
                        "list"
                      ],
                      "properties": {
                        "strip": {
                          "type": "string",
                          "enum": [
                            "exclude"
                          ]
                        },
                        "section": {
                          "type": "string",
                          "enum": [
                            "exclude",
                            "show_badge"
                          ]
                        },
                        "list": {
                          "type": "string",
                          "enum": [
                            "exclude",
                            "include"
                          ]
                        }
                      }
                    },
                    "primarySelection": {
                      "type": "string",
                      "enum": [
                        "primary_flag",
                        "active_first",
                        "open_first",
                        "recent_first"
                      ]
                    },
                    "permission": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "collections": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "key",
                "label",
                "items",
                "totalCount",
                "policy"
              ],
              "properties": {
                "key": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "totalCount": {
                  "type": "number"
                },
                "viewAllHref": {
                  "type": "string"
                },
                "items": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "key",
                      "label",
                      "entityType",
                      "policy"
                    ],
                    "properties": {
                      "key": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      },
                      "entityType": {
                        "type": "string",
                        "enum": [
                          "contact_person",
                          "contact_organization",
                          "crm_lead",
                          "crm_opportunity",
                          "customer_account",
                          "service_contract",
                          "project",
                          "quote",
                          "order",
                          "invoice"
                        ]
                      },
                      "entityId": {
                        "type": "string"
                      },
                      "href": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "count": {
                        "type": "number"
                      },
                      "isArchived": {
                        "type": "boolean"
                      },
                      "badges": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "label"
                          ],
                          "properties": {
                            "label": {
                              "type": "string"
                            },
                            "tone": {
                              "type": "string",
                              "enum": [
                                "default",
                                "success",
                                "warning",
                                "destructive",
                                "secondary",
                                "outline"
                              ]
                            }
                          }
                        }
                      },
                      "policy": {
                        "type": "object",
                        "required": [
                          "direction",
                          "onForbidden",
                          "emptyBehavior",
                          "archivedPolicy"
                        ],
                        "properties": {
                          "direction": {
                            "type": "string",
                            "enum": [
                              "source",
                              "target",
                              "both"
                            ]
                          },
                          "onForbidden": {
                            "type": "string",
                            "enum": [
                              "hide",
                              "teaser"
                            ]
                          },
                          "emptyBehavior": {
                            "type": "string",
                            "enum": [
                              "hide",
                              "placeholder",
                              "cta"
                            ]
                          },
                          "archivedPolicy": {
                            "type": "object",
                            "required": [
                              "strip",
                              "section",
                              "list"
                            ],
                            "properties": {
                              "strip": {
                                "type": "string",
                                "enum": [
                                  "exclude"
                                ]
                              },
                              "section": {
                                "type": "string",
                                "enum": [
                                  "exclude",
                                  "show_badge"
                                ]
                              },
                              "list": {
                                "type": "string",
                                "enum": [
                                  "exclude",
                                  "include"
                                ]
                              }
                            }
                          },
                          "primarySelection": {
                            "type": "string",
                            "enum": [
                              "primary_flag",
                              "active_first",
                              "open_first",
                              "recent_first"
                            ]
                          },
                          "permission": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "policy": {
                  "type": "object",
                  "required": [
                    "direction",
                    "onForbidden",
                    "emptyBehavior",
                    "archivedPolicy"
                  ],
                  "properties": {
                    "direction": {
                      "type": "string",
                      "enum": [
                        "source",
                        "target",
                        "both"
                      ]
                    },
                    "onForbidden": {
                      "type": "string",
                      "enum": [
                        "hide",
                        "teaser"
                      ]
                    },
                    "emptyBehavior": {
                      "type": "string",
                      "enum": [
                        "hide",
                        "placeholder",
                        "cta"
                      ]
                    },
                    "archivedPolicy": {
                      "type": "object",
                      "required": [
                        "strip",
                        "section",
                        "list"
                      ],
                      "properties": {
                        "strip": {
                          "type": "string",
                          "enum": [
                            "exclude"
                          ]
                        },
                        "section": {
                          "type": "string",
                          "enum": [
                            "exclude",
                            "show_badge"
                          ]
                        },
                        "list": {
                          "type": "string",
                          "enum": [
                            "exclude",
                            "include"
                          ]
                        }
                      }
                    },
                    "primarySelection": {
                      "type": "string",
                      "enum": [
                        "primary_flag",
                        "active_first",
                        "open_first",
                        "recent_first"
                      ]
                    },
                    "permission": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "actions": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "key",
                "relationshipKey",
                "label"
              ],
              "properties": {
                "key": {
                  "type": "string"
                },
                "relationshipKey": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "href": {
                  "type": "string"
                },
                "intent": {
                  "type": "string",
                  "enum": [
                    "navigation",
                    "utility"
                  ]
                },
                "variant": {
                  "type": "string",
                  "enum": [
                    "default",
                    "secondary",
                    "outline"
                  ]
                },
                "permission": {
                  "type": "string"
                }
              }
            }
          },
          "partialFailure": {
            "type": "object",
            "required": [
              "hasPartialFailure",
              "failedKeys"
            ],
            "properties": {
              "hasPartialFailure": {
                "type": "boolean"
              },
              "failedKeys": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "EntityRelationsSummaryResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "data": {
            "type": "object",
            "required": [
              "summary"
            ],
            "properties": {
              "summary": {
                "type": "object",
                "required": [
                  "routeId",
                  "entityType",
                  "entityId",
                  "primary",
                  "collections",
                  "actions"
                ],
                "properties": {
                  "routeId": {
                    "type": "string"
                  },
                  "entityType": {
                    "type": "string",
                    "enum": [
                      "contact_person",
                      "contact_organization",
                      "crm_lead",
                      "crm_opportunity",
                      "customer_account",
                      "service_contract",
                      "project",
                      "quote",
                      "order",
                      "invoice"
                    ]
                  },
                  "entityId": {
                    "type": "string"
                  },
                  "primary": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "key",
                        "label",
                        "entityType",
                        "policy"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "entityType": {
                          "type": "string",
                          "enum": [
                            "contact_person",
                            "contact_organization",
                            "crm_lead",
                            "crm_opportunity",
                            "customer_account",
                            "service_contract",
                            "project",
                            "quote",
                            "order",
                            "invoice"
                          ]
                        },
                        "entityId": {
                          "type": "string"
                        },
                        "href": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "count": {
                          "type": "number"
                        },
                        "isArchived": {
                          "type": "boolean"
                        },
                        "badges": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "label"
                            ],
                            "properties": {
                              "label": {
                                "type": "string"
                              },
                              "tone": {
                                "type": "string",
                                "enum": [
                                  "default",
                                  "success",
                                  "warning",
                                  "destructive",
                                  "secondary",
                                  "outline"
                                ]
                              }
                            }
                          }
                        },
                        "policy": {
                          "type": "object",
                          "required": [
                            "direction",
                            "onForbidden",
                            "emptyBehavior",
                            "archivedPolicy"
                          ],
                          "properties": {
                            "direction": {
                              "type": "string",
                              "enum": [
                                "source",
                                "target",
                                "both"
                              ]
                            },
                            "onForbidden": {
                              "type": "string",
                              "enum": [
                                "hide",
                                "teaser"
                              ]
                            },
                            "emptyBehavior": {
                              "type": "string",
                              "enum": [
                                "hide",
                                "placeholder",
                                "cta"
                              ]
                            },
                            "archivedPolicy": {
                              "type": "object",
                              "required": [
                                "strip",
                                "section",
                                "list"
                              ],
                              "properties": {
                                "strip": {
                                  "type": "string",
                                  "enum": [
                                    "exclude"
                                  ]
                                },
                                "section": {
                                  "type": "string",
                                  "enum": [
                                    "exclude",
                                    "show_badge"
                                  ]
                                },
                                "list": {
                                  "type": "string",
                                  "enum": [
                                    "exclude",
                                    "include"
                                  ]
                                }
                              }
                            },
                            "primarySelection": {
                              "type": "string",
                              "enum": [
                                "primary_flag",
                                "active_first",
                                "open_first",
                                "recent_first"
                              ]
                            },
                            "permission": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  },
                  "collections": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "key",
                        "label",
                        "items",
                        "totalCount",
                        "policy"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "totalCount": {
                          "type": "number"
                        },
                        "viewAllHref": {
                          "type": "string"
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "key",
                              "label",
                              "entityType",
                              "policy"
                            ],
                            "properties": {
                              "key": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "entityType": {
                                "type": "string",
                                "enum": [
                                  "contact_person",
                                  "contact_organization",
                                  "crm_lead",
                                  "crm_opportunity",
                                  "customer_account",
                                  "service_contract",
                                  "project",
                                  "quote",
                                  "order",
                                  "invoice"
                                ]
                              },
                              "entityId": {
                                "type": "string"
                              },
                              "href": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "count": {
                                "type": "number"
                              },
                              "isArchived": {
                                "type": "boolean"
                              },
                              "badges": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "required": [
                                    "label"
                                  ],
                                  "properties": {
                                    "label": {
                                      "type": "string"
                                    },
                                    "tone": {
                                      "type": "string",
                                      "enum": [
                                        "default",
                                        "success",
                                        "warning",
                                        "destructive",
                                        "secondary",
                                        "outline"
                                      ]
                                    }
                                  }
                                }
                              },
                              "policy": {
                                "type": "object",
                                "required": [
                                  "direction",
                                  "onForbidden",
                                  "emptyBehavior",
                                  "archivedPolicy"
                                ],
                                "properties": {
                                  "direction": {
                                    "type": "string",
                                    "enum": [
                                      "source",
                                      "target",
                                      "both"
                                    ]
                                  },
                                  "onForbidden": {
                                    "type": "string",
                                    "enum": [
                                      "hide",
                                      "teaser"
                                    ]
                                  },
                                  "emptyBehavior": {
                                    "type": "string",
                                    "enum": [
                                      "hide",
                                      "placeholder",
                                      "cta"
                                    ]
                                  },
                                  "archivedPolicy": {
                                    "type": "object",
                                    "required": [
                                      "strip",
                                      "section",
                                      "list"
                                    ],
                                    "properties": {
                                      "strip": {
                                        "type": "string",
                                        "enum": [
                                          "exclude"
                                        ]
                                      },
                                      "section": {
                                        "type": "string",
                                        "enum": [
                                          "exclude",
                                          "show_badge"
                                        ]
                                      },
                                      "list": {
                                        "type": "string",
                                        "enum": [
                                          "exclude",
                                          "include"
                                        ]
                                      }
                                    }
                                  },
                                  "primarySelection": {
                                    "type": "string",
                                    "enum": [
                                      "primary_flag",
                                      "active_first",
                                      "open_first",
                                      "recent_first"
                                    ]
                                  },
                                  "permission": {
                                    "type": "string"
                                  }
                                }
                              }
                            }
                          }
                        },
                        "policy": {
                          "type": "object",
                          "required": [
                            "direction",
                            "onForbidden",
                            "emptyBehavior",
                            "archivedPolicy"
                          ],
                          "properties": {
                            "direction": {
                              "type": "string",
                              "enum": [
                                "source",
                                "target",
                                "both"
                              ]
                            },
                            "onForbidden": {
                              "type": "string",
                              "enum": [
                                "hide",
                                "teaser"
                              ]
                            },
                            "emptyBehavior": {
                              "type": "string",
                              "enum": [
                                "hide",
                                "placeholder",
                                "cta"
                              ]
                            },
                            "archivedPolicy": {
                              "type": "object",
                              "required": [
                                "strip",
                                "section",
                                "list"
                              ],
                              "properties": {
                                "strip": {
                                  "type": "string",
                                  "enum": [
                                    "exclude"
                                  ]
                                },
                                "section": {
                                  "type": "string",
                                  "enum": [
                                    "exclude",
                                    "show_badge"
                                  ]
                                },
                                "list": {
                                  "type": "string",
                                  "enum": [
                                    "exclude",
                                    "include"
                                  ]
                                }
                              }
                            },
                            "primarySelection": {
                              "type": "string",
                              "enum": [
                                "primary_flag",
                                "active_first",
                                "open_first",
                                "recent_first"
                              ]
                            },
                            "permission": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  },
                  "actions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "key",
                        "relationshipKey",
                        "label"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "relationshipKey": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "href": {
                          "type": "string"
                        },
                        "intent": {
                          "type": "string",
                          "enum": [
                            "navigation",
                            "utility"
                          ]
                        },
                        "variant": {
                          "type": "string",
                          "enum": [
                            "default",
                            "secondary",
                            "outline"
                          ]
                        },
                        "permission": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "partialFailure": {
                    "type": "object",
                    "required": [
                      "hasPartialFailure",
                      "failedKeys"
                    ],
                    "properties": {
                      "hasPartialFailure": {
                        "type": "boolean"
                      },
                      "failedKeys": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "AccessPermissionImpactLink": {
        "type": "object",
        "required": [
          "portal",
          "pathTemplate"
        ],
        "properties": {
          "portal": {
            "type": "string"
          },
          "pathTemplate": {
            "type": "string"
          }
        }
      },
      "AccessPermissionItem": {
        "type": "object",
        "required": [
          "code",
          "module",
          "action"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "module": {
            "type": "string"
          },
          "action": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "labelKey": {
            "type": "string"
          },
          "businessDescriptionKey": {
            "type": "string"
          },
          "riskLevel": {
            "type": "string",
            "enum": [
              "read",
              "write",
              "critical"
            ]
          },
          "moduleLabelKey": {
            "type": "string"
          },
          "isInfrastructure": {
            "type": "boolean"
          },
          "linkedPages": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "portal",
                "pathTemplate"
              ],
              "properties": {
                "portal": {
                  "type": "string"
                },
                "pathTemplate": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "AccessPermissionsListData": {
        "type": "object",
        "required": [
          "permissions"
        ],
        "properties": {
          "permissions": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "code",
                "module",
                "action"
              ],
              "properties": {
                "code": {
                  "type": "string"
                },
                "module": {
                  "type": "string"
                },
                "action": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "labelKey": {
                  "type": "string"
                },
                "businessDescriptionKey": {
                  "type": "string"
                },
                "riskLevel": {
                  "type": "string",
                  "enum": [
                    "read",
                    "write",
                    "critical"
                  ]
                },
                "moduleLabelKey": {
                  "type": "string"
                },
                "isInfrastructure": {
                  "type": "boolean"
                },
                "linkedPages": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "portal",
                      "pathTemplate"
                    ],
                    "properties": {
                      "portal": {
                        "type": "string"
                      },
                      "pathTemplate": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "AccessPermissionsListSuccessResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "data": {
            "type": "object",
            "required": [
              "permissions"
            ],
            "properties": {
              "permissions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "code",
                    "module",
                    "action"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "module": {
                      "type": "string"
                    },
                    "action": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "labelKey": {
                      "type": "string"
                    },
                    "businessDescriptionKey": {
                      "type": "string"
                    },
                    "riskLevel": {
                      "type": "string",
                      "enum": [
                        "read",
                        "write",
                        "critical"
                      ]
                    },
                    "moduleLabelKey": {
                      "type": "string"
                    },
                    "isInfrastructure": {
                      "type": "boolean"
                    },
                    "linkedPages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "portal",
                          "pathTemplate"
                        ],
                        "properties": {
                          "portal": {
                            "type": "string"
                          },
                          "pathTemplate": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ContactsCompanySummaryView": {
        "type": "object",
        "required": [
          "id",
          "displayName"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          }
        }
      },
      "ContactsPersonSummaryView": {
        "type": "object",
        "required": [
          "id",
          "displayName"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          }
        }
      },
      "ContactsPersonView": {
        "type": "object",
        "required": [
          "id",
          "tenantId",
          "companyId",
          "status",
          "firstName",
          "lastName",
          "displayName",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "ARCHIVED"
            ]
          },
          "lifecycleReason": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "salutation": {
            "type": "string"
          },
          "jobTitle": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "mobile": {
            "type": "string"
          },
          "countryCode": {
            "type": "string"
          },
          "fiscalIdentifier": {
            "type": "string"
          },
          "iban": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "PRIVATE",
              "PROFESSIONAL"
            ]
          },
          "notes": {
            "type": "string"
          },
          "primaryOrganization": {
            "type": "object",
            "required": [
              "id",
              "displayName"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "displayName": {
                "type": "string"
              }
            }
          },
          "archivedAt": {
            "type": "string",
            "format": "date-time"
          },
          "archivedBy": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ContactsCompanyContactView": {
        "type": "object",
        "required": [
          "id",
          "tenantId",
          "companyId",
          "personId",
          "type",
          "displayName",
          "name",
          "roles",
          "isPrimary",
          "createdAt",
          "updatedAt",
          "person"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "personId": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "PERSON"
            ]
          },
          "displayName": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "CLIENT",
                "SUPPLIER",
                "EMPLOYEE",
                "LEGAL_REP",
                "BILLING_CONTACT",
                "SHIPPING_CONTACT",
                "ACCOUNTING_CONTACT",
                "ADMIN"
              ]
            }
          },
          "isPrimary": {
            "type": "boolean"
          },
          "notes": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "person": {
            "type": "object",
            "required": [
              "id",
              "displayName"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "displayName": {
                "type": "string"
              },
              "firstName": {
                "type": "string"
              },
              "lastName": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "phone": {
                "type": "string"
              }
            }
          },
          "company": {
            "type": "object",
            "required": [
              "id",
              "displayName"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "displayName": {
                "type": "string"
              }
            }
          },
          "companyName": {
            "type": "string"
          }
        }
      },
      "ContactsAddressView": {
        "type": "object",
        "required": [
          "id",
          "tenantId",
          "companyId",
          "status",
          "street",
          "postalCode",
          "city",
          "country",
          "formatted",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "ARCHIVED"
            ]
          },
          "lifecycleReason": {
            "type": "string"
          },
          "street": {
            "type": "string"
          },
          "streetNumber": {
            "type": "string"
          },
          "postalCode": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "formatted": {
            "type": "string"
          },
          "archivedAt": {
            "type": "string",
            "format": "date-time"
          },
          "archivedBy": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ContactsAddressOwnerView": {
        "type": "object",
        "required": [
          "type",
          "id",
          "displayName"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "Owner type label mirror (PERSON or COMPANY)"
          },
          "id": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          }
        }
      },
      "ContactsAddressLinkView": {
        "type": "object",
        "required": [
          "id",
          "tenantId",
          "addressId",
          "ownerType",
          "ownerId",
          "usage",
          "isPrimary",
          "createdAt",
          "updatedAt",
          "address",
          "owner",
          "addressFormatted",
          "ownerDisplayName"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "addressId": {
            "type": "string"
          },
          "ownerType": {
            "type": "string",
            "enum": [
              "PERSON",
              "COMPANY"
            ]
          },
          "ownerId": {
            "type": "string"
          },
          "usage": {
            "type": "string",
            "enum": [
              "BILLING",
              "SHIPPING",
              "LEGAL",
              "PRIVATE",
              "OTHER"
            ]
          },
          "isPrimary": {
            "type": "boolean"
          },
          "notes": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "address": {
            "type": "object",
            "required": [
              "id",
              "tenantId",
              "companyId",
              "status",
              "street",
              "postalCode",
              "city",
              "country",
              "formatted",
              "createdAt",
              "updatedAt"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "tenantId": {
                "type": "string"
              },
              "companyId": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "ACTIVE",
                  "ARCHIVED"
                ]
              },
              "lifecycleReason": {
                "type": "string"
              },
              "street": {
                "type": "string"
              },
              "streetNumber": {
                "type": "string"
              },
              "postalCode": {
                "type": "string"
              },
              "city": {
                "type": "string"
              },
              "state": {
                "type": "string"
              },
              "country": {
                "type": "string"
              },
              "notes": {
                "type": "string"
              },
              "formatted": {
                "type": "string"
              },
              "archivedAt": {
                "type": "string",
                "format": "date-time"
              },
              "archivedBy": {
                "type": "string"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "owner": {
            "type": "object",
            "required": [
              "type",
              "id",
              "displayName"
            ],
            "properties": {
              "type": {
                "type": "string",
                "description": "Owner type label mirror (PERSON or COMPANY)"
              },
              "id": {
                "type": "string"
              },
              "displayName": {
                "type": "string"
              }
            }
          },
          "addressFormatted": {
            "type": "string"
          },
          "ownerDisplayName": {
            "type": "string"
          }
        }
      },
      "ContactsPersonsListData": {
        "type": "object",
        "required": [
          "persons",
          "total"
        ],
        "properties": {
          "persons": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "tenantId",
                "companyId",
                "status",
                "firstName",
                "lastName",
                "displayName",
                "createdAt",
                "updatedAt"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "tenantId": {
                  "type": "string"
                },
                "companyId": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "ACTIVE",
                    "ARCHIVED"
                  ]
                },
                "lifecycleReason": {
                  "type": "string"
                },
                "firstName": {
                  "type": "string"
                },
                "lastName": {
                  "type": "string"
                },
                "salutation": {
                  "type": "string"
                },
                "jobTitle": {
                  "type": "string"
                },
                "displayName": {
                  "type": "string"
                },
                "email": {
                  "type": "string"
                },
                "phone": {
                  "type": "string"
                },
                "mobile": {
                  "type": "string"
                },
                "countryCode": {
                  "type": "string"
                },
                "fiscalIdentifier": {
                  "type": "string"
                },
                "iban": {
                  "type": "string"
                },
                "language": {
                  "type": "string"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "PRIVATE",
                    "PROFESSIONAL"
                  ]
                },
                "notes": {
                  "type": "string"
                },
                "primaryOrganization": {
                  "type": "object",
                  "required": [
                    "id",
                    "displayName"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "displayName": {
                      "type": "string"
                    }
                  }
                },
                "archivedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "archivedBy": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "total": {
            "type": "integer"
          }
        }
      },
      "ContactsPersonData": {
        "type": "object",
        "required": [
          "person"
        ],
        "properties": {
          "person": {
            "type": "object",
            "required": [
              "id",
              "tenantId",
              "companyId",
              "status",
              "firstName",
              "lastName",
              "displayName",
              "createdAt",
              "updatedAt"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "tenantId": {
                "type": "string"
              },
              "companyId": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "ACTIVE",
                  "ARCHIVED"
                ]
              },
              "lifecycleReason": {
                "type": "string"
              },
              "firstName": {
                "type": "string"
              },
              "lastName": {
                "type": "string"
              },
              "salutation": {
                "type": "string"
              },
              "jobTitle": {
                "type": "string"
              },
              "displayName": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "phone": {
                "type": "string"
              },
              "mobile": {
                "type": "string"
              },
              "countryCode": {
                "type": "string"
              },
              "fiscalIdentifier": {
                "type": "string"
              },
              "iban": {
                "type": "string"
              },
              "language": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "PRIVATE",
                  "PROFESSIONAL"
                ]
              },
              "notes": {
                "type": "string"
              },
              "primaryOrganization": {
                "type": "object",
                "required": [
                  "id",
                  "displayName"
                ],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "displayName": {
                    "type": "string"
                  }
                }
              },
              "archivedAt": {
                "type": "string",
                "format": "date-time"
              },
              "archivedBy": {
                "type": "string"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "ContactsCompanyContactsListData": {
        "type": "object",
        "required": [
          "contacts",
          "total"
        ],
        "properties": {
          "contacts": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "tenantId",
                "companyId",
                "personId",
                "type",
                "displayName",
                "name",
                "roles",
                "isPrimary",
                "createdAt",
                "updatedAt",
                "person"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "tenantId": {
                  "type": "string"
                },
                "companyId": {
                  "type": "string"
                },
                "personId": {
                  "type": "string"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "PERSON"
                  ]
                },
                "displayName": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "email": {
                  "type": "string"
                },
                "phone": {
                  "type": "string"
                },
                "roles": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "CLIENT",
                      "SUPPLIER",
                      "EMPLOYEE",
                      "LEGAL_REP",
                      "BILLING_CONTACT",
                      "SHIPPING_CONTACT",
                      "ACCOUNTING_CONTACT",
                      "ADMIN"
                    ]
                  }
                },
                "isPrimary": {
                  "type": "boolean"
                },
                "notes": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "person": {
                  "type": "object",
                  "required": [
                    "id",
                    "displayName"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "displayName": {
                      "type": "string"
                    },
                    "firstName": {
                      "type": "string"
                    },
                    "lastName": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string"
                    },
                    "phone": {
                      "type": "string"
                    }
                  }
                },
                "company": {
                  "type": "object",
                  "required": [
                    "id",
                    "displayName"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "displayName": {
                      "type": "string"
                    }
                  }
                },
                "companyName": {
                  "type": "string"
                }
              }
            }
          },
          "total": {
            "type": "integer"
          }
        }
      },
      "ContactsCompanyContactsCollectionData": {
        "type": "object",
        "required": [
          "contacts"
        ],
        "properties": {
          "contacts": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "tenantId",
                "companyId",
                "personId",
                "type",
                "displayName",
                "name",
                "roles",
                "isPrimary",
                "createdAt",
                "updatedAt",
                "person"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "tenantId": {
                  "type": "string"
                },
                "companyId": {
                  "type": "string"
                },
                "personId": {
                  "type": "string"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "PERSON"
                  ]
                },
                "displayName": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "email": {
                  "type": "string"
                },
                "phone": {
                  "type": "string"
                },
                "roles": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "CLIENT",
                      "SUPPLIER",
                      "EMPLOYEE",
                      "LEGAL_REP",
                      "BILLING_CONTACT",
                      "SHIPPING_CONTACT",
                      "ACCOUNTING_CONTACT",
                      "ADMIN"
                    ]
                  }
                },
                "isPrimary": {
                  "type": "boolean"
                },
                "notes": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "person": {
                  "type": "object",
                  "required": [
                    "id",
                    "displayName"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "displayName": {
                      "type": "string"
                    },
                    "firstName": {
                      "type": "string"
                    },
                    "lastName": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string"
                    },
                    "phone": {
                      "type": "string"
                    }
                  }
                },
                "company": {
                  "type": "object",
                  "required": [
                    "id",
                    "displayName"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "displayName": {
                      "type": "string"
                    }
                  }
                },
                "companyName": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "ContactsCompanyContactData": {
        "type": "object",
        "required": [
          "contact"
        ],
        "properties": {
          "contact": {
            "type": "object",
            "required": [
              "id",
              "tenantId",
              "companyId",
              "personId",
              "type",
              "displayName",
              "name",
              "roles",
              "isPrimary",
              "createdAt",
              "updatedAt",
              "person"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "tenantId": {
                "type": "string"
              },
              "companyId": {
                "type": "string"
              },
              "personId": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "PERSON"
                ]
              },
              "displayName": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "phone": {
                "type": "string"
              },
              "roles": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "CLIENT",
                    "SUPPLIER",
                    "EMPLOYEE",
                    "LEGAL_REP",
                    "BILLING_CONTACT",
                    "SHIPPING_CONTACT",
                    "ACCOUNTING_CONTACT",
                    "ADMIN"
                  ]
                }
              },
              "isPrimary": {
                "type": "boolean"
              },
              "notes": {
                "type": "string"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              },
              "person": {
                "type": "object",
                "required": [
                  "id",
                  "displayName"
                ],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "displayName": {
                    "type": "string"
                  },
                  "firstName": {
                    "type": "string"
                  },
                  "lastName": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  }
                }
              },
              "company": {
                "type": "object",
                "required": [
                  "id",
                  "displayName"
                ],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "displayName": {
                    "type": "string"
                  }
                }
              },
              "companyName": {
                "type": "string"
              }
            }
          }
        }
      },
      "ContactsAddressesListData": {
        "type": "object",
        "required": [
          "addresses",
          "total"
        ],
        "properties": {
          "addresses": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "tenantId",
                "companyId",
                "status",
                "street",
                "postalCode",
                "city",
                "country",
                "formatted",
                "createdAt",
                "updatedAt"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "tenantId": {
                  "type": "string"
                },
                "companyId": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "ACTIVE",
                    "ARCHIVED"
                  ]
                },
                "lifecycleReason": {
                  "type": "string"
                },
                "street": {
                  "type": "string"
                },
                "streetNumber": {
                  "type": "string"
                },
                "postalCode": {
                  "type": "string"
                },
                "city": {
                  "type": "string"
                },
                "state": {
                  "type": "string"
                },
                "country": {
                  "type": "string"
                },
                "notes": {
                  "type": "string"
                },
                "formatted": {
                  "type": "string"
                },
                "archivedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "archivedBy": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "total": {
            "type": "integer"
          }
        }
      },
      "ContactsAddressData": {
        "type": "object",
        "required": [
          "address"
        ],
        "properties": {
          "address": {
            "type": "object",
            "required": [
              "id",
              "tenantId",
              "companyId",
              "status",
              "street",
              "postalCode",
              "city",
              "country",
              "formatted",
              "createdAt",
              "updatedAt"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "tenantId": {
                "type": "string"
              },
              "companyId": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "ACTIVE",
                  "ARCHIVED"
                ]
              },
              "lifecycleReason": {
                "type": "string"
              },
              "street": {
                "type": "string"
              },
              "streetNumber": {
                "type": "string"
              },
              "postalCode": {
                "type": "string"
              },
              "city": {
                "type": "string"
              },
              "state": {
                "type": "string"
              },
              "country": {
                "type": "string"
              },
              "notes": {
                "type": "string"
              },
              "formatted": {
                "type": "string"
              },
              "archivedAt": {
                "type": "string",
                "format": "date-time"
              },
              "archivedBy": {
                "type": "string"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "ContactsAddressLinksCollectionData": {
        "type": "object",
        "required": [
          "links"
        ],
        "properties": {
          "links": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "tenantId",
                "addressId",
                "ownerType",
                "ownerId",
                "usage",
                "isPrimary",
                "createdAt",
                "updatedAt",
                "address",
                "owner",
                "addressFormatted",
                "ownerDisplayName"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "tenantId": {
                  "type": "string"
                },
                "addressId": {
                  "type": "string"
                },
                "ownerType": {
                  "type": "string",
                  "enum": [
                    "PERSON",
                    "COMPANY"
                  ]
                },
                "ownerId": {
                  "type": "string"
                },
                "usage": {
                  "type": "string",
                  "enum": [
                    "BILLING",
                    "SHIPPING",
                    "LEGAL",
                    "PRIVATE",
                    "OTHER"
                  ]
                },
                "isPrimary": {
                  "type": "boolean"
                },
                "notes": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "address": {
                  "type": "object",
                  "required": [
                    "id",
                    "tenantId",
                    "companyId",
                    "status",
                    "street",
                    "postalCode",
                    "city",
                    "country",
                    "formatted",
                    "createdAt",
                    "updatedAt"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "tenantId": {
                      "type": "string"
                    },
                    "companyId": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "ACTIVE",
                        "ARCHIVED"
                      ]
                    },
                    "lifecycleReason": {
                      "type": "string"
                    },
                    "street": {
                      "type": "string"
                    },
                    "streetNumber": {
                      "type": "string"
                    },
                    "postalCode": {
                      "type": "string"
                    },
                    "city": {
                      "type": "string"
                    },
                    "state": {
                      "type": "string"
                    },
                    "country": {
                      "type": "string"
                    },
                    "notes": {
                      "type": "string"
                    },
                    "formatted": {
                      "type": "string"
                    },
                    "archivedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "archivedBy": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                },
                "owner": {
                  "type": "object",
                  "required": [
                    "type",
                    "id",
                    "displayName"
                  ],
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "Owner type label mirror (PERSON or COMPANY)"
                    },
                    "id": {
                      "type": "string"
                    },
                    "displayName": {
                      "type": "string"
                    }
                  }
                },
                "addressFormatted": {
                  "type": "string"
                },
                "ownerDisplayName": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "ContactsAddressLinkData": {
        "type": "object",
        "required": [
          "link"
        ],
        "properties": {
          "link": {
            "type": "object",
            "required": [
              "id",
              "tenantId",
              "addressId",
              "ownerType",
              "ownerId",
              "usage",
              "isPrimary",
              "createdAt",
              "updatedAt",
              "address",
              "owner",
              "addressFormatted",
              "ownerDisplayName"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "tenantId": {
                "type": "string"
              },
              "addressId": {
                "type": "string"
              },
              "ownerType": {
                "type": "string",
                "enum": [
                  "PERSON",
                  "COMPANY"
                ]
              },
              "ownerId": {
                "type": "string"
              },
              "usage": {
                "type": "string",
                "enum": [
                  "BILLING",
                  "SHIPPING",
                  "LEGAL",
                  "PRIVATE",
                  "OTHER"
                ]
              },
              "isPrimary": {
                "type": "boolean"
              },
              "notes": {
                "type": "string"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              },
              "address": {
                "type": "object",
                "required": [
                  "id",
                  "tenantId",
                  "companyId",
                  "status",
                  "street",
                  "postalCode",
                  "city",
                  "country",
                  "formatted",
                  "createdAt",
                  "updatedAt"
                ],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "tenantId": {
                    "type": "string"
                  },
                  "companyId": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "ACTIVE",
                      "ARCHIVED"
                    ]
                  },
                  "lifecycleReason": {
                    "type": "string"
                  },
                  "street": {
                    "type": "string"
                  },
                  "streetNumber": {
                    "type": "string"
                  },
                  "postalCode": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "state": {
                    "type": "string"
                  },
                  "country": {
                    "type": "string"
                  },
                  "notes": {
                    "type": "string"
                  },
                  "formatted": {
                    "type": "string"
                  },
                  "archivedAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "archivedBy": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              },
              "owner": {
                "type": "object",
                "required": [
                  "type",
                  "id",
                  "displayName"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "description": "Owner type label mirror (PERSON or COMPANY)"
                  },
                  "id": {
                    "type": "string"
                  },
                  "displayName": {
                    "type": "string"
                  }
                }
              },
              "addressFormatted": {
                "type": "string"
              },
              "ownerDisplayName": {
                "type": "string"
              }
            }
          }
        }
      },
      "ContactsPersonsListResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "data": {
            "type": "object",
            "required": [
              "persons",
              "total"
            ],
            "properties": {
              "persons": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "id",
                    "tenantId",
                    "companyId",
                    "status",
                    "firstName",
                    "lastName",
                    "displayName",
                    "createdAt",
                    "updatedAt"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "tenantId": {
                      "type": "string"
                    },
                    "companyId": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "ACTIVE",
                        "ARCHIVED"
                      ]
                    },
                    "lifecycleReason": {
                      "type": "string"
                    },
                    "firstName": {
                      "type": "string"
                    },
                    "lastName": {
                      "type": "string"
                    },
                    "salutation": {
                      "type": "string"
                    },
                    "jobTitle": {
                      "type": "string"
                    },
                    "displayName": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string"
                    },
                    "phone": {
                      "type": "string"
                    },
                    "mobile": {
                      "type": "string"
                    },
                    "countryCode": {
                      "type": "string"
                    },
                    "fiscalIdentifier": {
                      "type": "string"
                    },
                    "iban": {
                      "type": "string"
                    },
                    "language": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "PRIVATE",
                        "PROFESSIONAL"
                      ]
                    },
                    "notes": {
                      "type": "string"
                    },
                    "primaryOrganization": {
                      "type": "object",
                      "required": [
                        "id",
                        "displayName"
                      ],
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "displayName": {
                          "type": "string"
                        }
                      }
                    },
                    "archivedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "archivedBy": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              },
              "total": {
                "type": "integer"
              }
            }
          }
        }
      },
      "ContactsPersonResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "data": {
            "type": "object",
            "required": [
              "person"
            ],
            "properties": {
              "person": {
                "type": "object",
                "required": [
                  "id",
                  "tenantId",
                  "companyId",
                  "status",
                  "firstName",
                  "lastName",
                  "displayName",
                  "createdAt",
                  "updatedAt"
                ],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "tenantId": {
                    "type": "string"
                  },
                  "companyId": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "ACTIVE",
                      "ARCHIVED"
                    ]
                  },
                  "lifecycleReason": {
                    "type": "string"
                  },
                  "firstName": {
                    "type": "string"
                  },
                  "lastName": {
                    "type": "string"
                  },
                  "salutation": {
                    "type": "string"
                  },
                  "jobTitle": {
                    "type": "string"
                  },
                  "displayName": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "mobile": {
                    "type": "string"
                  },
                  "countryCode": {
                    "type": "string"
                  },
                  "fiscalIdentifier": {
                    "type": "string"
                  },
                  "iban": {
                    "type": "string"
                  },
                  "language": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "PRIVATE",
                      "PROFESSIONAL"
                    ]
                  },
                  "notes": {
                    "type": "string"
                  },
                  "primaryOrganization": {
                    "type": "object",
                    "required": [
                      "id",
                      "displayName"
                    ],
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "displayName": {
                        "type": "string"
                      }
                    }
                  },
                  "archivedAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "archivedBy": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              }
            }
          }
        }
      },
      "ContactsCompanyContactsListResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "data": {
            "type": "object",
            "required": [
              "contacts",
              "total"
            ],
            "properties": {
              "contacts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "id",
                    "tenantId",
                    "companyId",
                    "personId",
                    "type",
                    "displayName",
                    "name",
                    "roles",
                    "isPrimary",
                    "createdAt",
                    "updatedAt",
                    "person"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "tenantId": {
                      "type": "string"
                    },
                    "companyId": {
                      "type": "string"
                    },
                    "personId": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "PERSON"
                      ]
                    },
                    "displayName": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string"
                    },
                    "phone": {
                      "type": "string"
                    },
                    "roles": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "CLIENT",
                          "SUPPLIER",
                          "EMPLOYEE",
                          "LEGAL_REP",
                          "BILLING_CONTACT",
                          "SHIPPING_CONTACT",
                          "ACCOUNTING_CONTACT",
                          "ADMIN"
                        ]
                      }
                    },
                    "isPrimary": {
                      "type": "boolean"
                    },
                    "notes": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "person": {
                      "type": "object",
                      "required": [
                        "id",
                        "displayName"
                      ],
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "displayName": {
                          "type": "string"
                        },
                        "firstName": {
                          "type": "string"
                        },
                        "lastName": {
                          "type": "string"
                        },
                        "email": {
                          "type": "string"
                        },
                        "phone": {
                          "type": "string"
                        }
                      }
                    },
                    "company": {
                      "type": "object",
                      "required": [
                        "id",
                        "displayName"
                      ],
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "displayName": {
                          "type": "string"
                        }
                      }
                    },
                    "companyName": {
                      "type": "string"
                    }
                  }
                }
              },
              "total": {
                "type": "integer"
              }
            }
          }
        }
      },
      "ContactsCompanyContactsCollectionResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "data": {
            "type": "object",
            "required": [
              "contacts"
            ],
            "properties": {
              "contacts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "id",
                    "tenantId",
                    "companyId",
                    "personId",
                    "type",
                    "displayName",
                    "name",
                    "roles",
                    "isPrimary",
                    "createdAt",
                    "updatedAt",
                    "person"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "tenantId": {
                      "type": "string"
                    },
                    "companyId": {
                      "type": "string"
                    },
                    "personId": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "PERSON"
                      ]
                    },
                    "displayName": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string"
                    },
                    "phone": {
                      "type": "string"
                    },
                    "roles": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "CLIENT",
                          "SUPPLIER",
                          "EMPLOYEE",
                          "LEGAL_REP",
                          "BILLING_CONTACT",
                          "SHIPPING_CONTACT",
                          "ACCOUNTING_CONTACT",
                          "ADMIN"
                        ]
                      }
                    },
                    "isPrimary": {
                      "type": "boolean"
                    },
                    "notes": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "person": {
                      "type": "object",
                      "required": [
                        "id",
                        "displayName"
                      ],
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "displayName": {
                          "type": "string"
                        },
                        "firstName": {
                          "type": "string"
                        },
                        "lastName": {
                          "type": "string"
                        },
                        "email": {
                          "type": "string"
                        },
                        "phone": {
                          "type": "string"
                        }
                      }
                    },
                    "company": {
                      "type": "object",
                      "required": [
                        "id",
                        "displayName"
                      ],
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "displayName": {
                          "type": "string"
                        }
                      }
                    },
                    "companyName": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ContactsCompanyContactResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "data": {
            "type": "object",
            "required": [
              "contact"
            ],
            "properties": {
              "contact": {
                "type": "object",
                "required": [
                  "id",
                  "tenantId",
                  "companyId",
                  "personId",
                  "type",
                  "displayName",
                  "name",
                  "roles",
                  "isPrimary",
                  "createdAt",
                  "updatedAt",
                  "person"
                ],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "tenantId": {
                    "type": "string"
                  },
                  "companyId": {
                    "type": "string"
                  },
                  "personId": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "PERSON"
                    ]
                  },
                  "displayName": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "roles": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "CLIENT",
                        "SUPPLIER",
                        "EMPLOYEE",
                        "LEGAL_REP",
                        "BILLING_CONTACT",
                        "SHIPPING_CONTACT",
                        "ACCOUNTING_CONTACT",
                        "ADMIN"
                      ]
                    }
                  },
                  "isPrimary": {
                    "type": "boolean"
                  },
                  "notes": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "person": {
                    "type": "object",
                    "required": [
                      "id",
                      "displayName"
                    ],
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "displayName": {
                        "type": "string"
                      },
                      "firstName": {
                        "type": "string"
                      },
                      "lastName": {
                        "type": "string"
                      },
                      "email": {
                        "type": "string"
                      },
                      "phone": {
                        "type": "string"
                      }
                    }
                  },
                  "company": {
                    "type": "object",
                    "required": [
                      "id",
                      "displayName"
                    ],
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "displayName": {
                        "type": "string"
                      }
                    }
                  },
                  "companyName": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      },
      "ContactsAddressesListResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "data": {
            "type": "object",
            "required": [
              "addresses",
              "total"
            ],
            "properties": {
              "addresses": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "id",
                    "tenantId",
                    "companyId",
                    "status",
                    "street",
                    "postalCode",
                    "city",
                    "country",
                    "formatted",
                    "createdAt",
                    "updatedAt"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "tenantId": {
                      "type": "string"
                    },
                    "companyId": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "ACTIVE",
                        "ARCHIVED"
                      ]
                    },
                    "lifecycleReason": {
                      "type": "string"
                    },
                    "street": {
                      "type": "string"
                    },
                    "streetNumber": {
                      "type": "string"
                    },
                    "postalCode": {
                      "type": "string"
                    },
                    "city": {
                      "type": "string"
                    },
                    "state": {
                      "type": "string"
                    },
                    "country": {
                      "type": "string"
                    },
                    "notes": {
                      "type": "string"
                    },
                    "formatted": {
                      "type": "string"
                    },
                    "archivedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "archivedBy": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              },
              "total": {
                "type": "integer"
              }
            }
          }
        }
      },
      "ContactsAddressResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "data": {
            "type": "object",
            "required": [
              "address"
            ],
            "properties": {
              "address": {
                "type": "object",
                "required": [
                  "id",
                  "tenantId",
                  "companyId",
                  "status",
                  "street",
                  "postalCode",
                  "city",
                  "country",
                  "formatted",
                  "createdAt",
                  "updatedAt"
                ],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "tenantId": {
                    "type": "string"
                  },
                  "companyId": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "ACTIVE",
                      "ARCHIVED"
                    ]
                  },
                  "lifecycleReason": {
                    "type": "string"
                  },
                  "street": {
                    "type": "string"
                  },
                  "streetNumber": {
                    "type": "string"
                  },
                  "postalCode": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "state": {
                    "type": "string"
                  },
                  "country": {
                    "type": "string"
                  },
                  "notes": {
                    "type": "string"
                  },
                  "formatted": {
                    "type": "string"
                  },
                  "archivedAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "archivedBy": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              }
            }
          }
        }
      },
      "ContactsAddressLinksCollectionResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "data": {
            "type": "object",
            "required": [
              "links"
            ],
            "properties": {
              "links": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "id",
                    "tenantId",
                    "addressId",
                    "ownerType",
                    "ownerId",
                    "usage",
                    "isPrimary",
                    "createdAt",
                    "updatedAt",
                    "address",
                    "owner",
                    "addressFormatted",
                    "ownerDisplayName"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "tenantId": {
                      "type": "string"
                    },
                    "addressId": {
                      "type": "string"
                    },
                    "ownerType": {
                      "type": "string",
                      "enum": [
                        "PERSON",
                        "COMPANY"
                      ]
                    },
                    "ownerId": {
                      "type": "string"
                    },
                    "usage": {
                      "type": "string",
                      "enum": [
                        "BILLING",
                        "SHIPPING",
                        "LEGAL",
                        "PRIVATE",
                        "OTHER"
                      ]
                    },
                    "isPrimary": {
                      "type": "boolean"
                    },
                    "notes": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "address": {
                      "type": "object",
                      "required": [
                        "id",
                        "tenantId",
                        "companyId",
                        "status",
                        "street",
                        "postalCode",
                        "city",
                        "country",
                        "formatted",
                        "createdAt",
                        "updatedAt"
                      ],
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "tenantId": {
                          "type": "string"
                        },
                        "companyId": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "ACTIVE",
                            "ARCHIVED"
                          ]
                        },
                        "lifecycleReason": {
                          "type": "string"
                        },
                        "street": {
                          "type": "string"
                        },
                        "streetNumber": {
                          "type": "string"
                        },
                        "postalCode": {
                          "type": "string"
                        },
                        "city": {
                          "type": "string"
                        },
                        "state": {
                          "type": "string"
                        },
                        "country": {
                          "type": "string"
                        },
                        "notes": {
                          "type": "string"
                        },
                        "formatted": {
                          "type": "string"
                        },
                        "archivedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "archivedBy": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "owner": {
                      "type": "object",
                      "required": [
                        "type",
                        "id",
                        "displayName"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "Owner type label mirror (PERSON or COMPANY)"
                        },
                        "id": {
                          "type": "string"
                        },
                        "displayName": {
                          "type": "string"
                        }
                      }
                    },
                    "addressFormatted": {
                      "type": "string"
                    },
                    "ownerDisplayName": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ContactsAddressLinkResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "data": {
            "type": "object",
            "required": [
              "link"
            ],
            "properties": {
              "link": {
                "type": "object",
                "required": [
                  "id",
                  "tenantId",
                  "addressId",
                  "ownerType",
                  "ownerId",
                  "usage",
                  "isPrimary",
                  "createdAt",
                  "updatedAt",
                  "address",
                  "owner",
                  "addressFormatted",
                  "ownerDisplayName"
                ],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "tenantId": {
                    "type": "string"
                  },
                  "addressId": {
                    "type": "string"
                  },
                  "ownerType": {
                    "type": "string",
                    "enum": [
                      "PERSON",
                      "COMPANY"
                    ]
                  },
                  "ownerId": {
                    "type": "string"
                  },
                  "usage": {
                    "type": "string",
                    "enum": [
                      "BILLING",
                      "SHIPPING",
                      "LEGAL",
                      "PRIVATE",
                      "OTHER"
                    ]
                  },
                  "isPrimary": {
                    "type": "boolean"
                  },
                  "notes": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "address": {
                    "type": "object",
                    "required": [
                      "id",
                      "tenantId",
                      "companyId",
                      "status",
                      "street",
                      "postalCode",
                      "city",
                      "country",
                      "formatted",
                      "createdAt",
                      "updatedAt"
                    ],
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "tenantId": {
                        "type": "string"
                      },
                      "companyId": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "ACTIVE",
                          "ARCHIVED"
                        ]
                      },
                      "lifecycleReason": {
                        "type": "string"
                      },
                      "street": {
                        "type": "string"
                      },
                      "streetNumber": {
                        "type": "string"
                      },
                      "postalCode": {
                        "type": "string"
                      },
                      "city": {
                        "type": "string"
                      },
                      "state": {
                        "type": "string"
                      },
                      "country": {
                        "type": "string"
                      },
                      "notes": {
                        "type": "string"
                      },
                      "formatted": {
                        "type": "string"
                      },
                      "archivedAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "archivedBy": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date-time"
                      }
                    }
                  },
                  "owner": {
                    "type": "object",
                    "required": [
                      "type",
                      "id",
                      "displayName"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "description": "Owner type label mirror (PERSON or COMPANY)"
                      },
                      "id": {
                        "type": "string"
                      },
                      "displayName": {
                        "type": "string"
                      }
                    }
                  },
                  "addressFormatted": {
                    "type": "string"
                  },
                  "ownerDisplayName": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      },
      "PaginationQuery": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 20,
            "description": "Maximum number of items to return"
          },
          "offset": {
            "type": "integer",
            "minimum": 0,
            "default": 0,
            "description": "Number of items to skip"
          }
        }
      },
      "PaginationResponse": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "integer",
            "example": 20
          },
          "offset": {
            "type": "integer",
            "example": 0
          },
          "total": {
            "type": "integer",
            "example": 100,
            "description": "Total number of items available"
          },
          "hasMore": {
            "type": "boolean",
            "example": true,
            "description": "Whether there are more items available"
          }
        }
      },
      "CompanyAccessMode": {
        "type": "object",
        "description": "AccessMode for Company Portal (/c). Automatically resolved by backend.",
        "properties": {
          "portal": {
            "type": "string",
            "enum": [
              "company"
            ],
            "example": "company"
          },
          "userId": {
            "type": "string",
            "description": "User ID"
          },
          "tenantId": {
            "type": "string",
            "description": "Tenant ID"
          },
          "companyId": {
            "type": "string",
            "description": "Company ID"
          }
        }
      },
      "TenantAccessMode": {
        "type": "object",
        "description": "AccessMode for Tenant Portal (/t). Automatically resolved by backend.",
        "properties": {
          "portal": {
            "type": "string",
            "enum": [
              "tenant"
            ],
            "example": "tenant"
          },
          "userId": {
            "type": "string",
            "description": "User ID"
          },
          "tenantId": {
            "type": "string",
            "description": "Tenant ID"
          }
        }
      },
      "PartnerAccessMode": {
        "type": "object",
        "description": "AccessMode for Partner Portal (/p). Automatically resolved by backend.",
        "properties": {
          "portal": {
            "type": "string",
            "enum": [
              "partner"
            ],
            "example": "partner"
          },
          "userId": {
            "type": "string",
            "description": "User ID"
          },
          "accessibleCompanyIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of company IDs accessible by this partner"
          }
        }
      },
      "SuperadminAccessMode": {
        "type": "object",
        "description": "AccessMode for Superadmin Portal (/s). Automatically resolved by backend.",
        "properties": {
          "portal": {
            "type": "string",
            "enum": [
              "superadmin"
            ],
            "example": "superadmin"
          },
          "userId": {
            "type": "string",
            "description": "Superadmin user ID"
          }
        }
      },
      "InternalAccessMode": {
        "type": "object",
        "description": "AccessMode for Internal Portal (/i). Automatically resolved by backend.",
        "properties": {
          "portal": {
            "type": "string",
            "enum": [
              "internal"
            ],
            "example": "internal"
          },
          "userId": {
            "type": "string",
            "description": "Internal user ID"
          }
        }
      },
      "LocalizedText": {
        "type": "object",
        "required": [
          "resolvedTitle"
        ],
        "properties": {
          "titleKey": {
            "type": "string",
            "nullable": true,
            "description": "Optional i18n key for title"
          },
          "descriptionKey": {
            "type": "string",
            "nullable": true,
            "description": "Optional i18n key for description"
          },
          "resolvedTitle": {
            "type": "string",
            "description": "Resolved display title for the current locale"
          },
          "resolvedDescription": {
            "type": "string",
            "nullable": true,
            "description": "Resolved display description for the current locale"
          }
        }
      },
      "Task": {
        "type": "object",
        "required": [
          "id",
          "entityType",
          "entityId",
          "title",
          "status",
          "priority",
          "createdByUserId",
          "tenantId",
          "portal",
          "createdAt",
          "updatedAt",
          "resolvedTitle"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Task ID"
          },
          "entityType": {
            "type": "string",
            "enum": [
              "invoice",
              "document",
              "task",
              "user",
              "order",
              "company",
              "tenant"
            ],
            "description": "Entity type this task is associated with"
          },
          "entityId": {
            "type": "string",
            "description": "Entity ID this task is associated with"
          },
          "title": {
            "type": "string",
            "description": "Task title"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Task description"
          },
          "titleKey": {
            "type": "string",
            "nullable": true,
            "description": "Optional i18n key backing the task title"
          },
          "descriptionKey": {
            "type": "string",
            "nullable": true,
            "description": "Optional i18n key backing the task description"
          },
          "resolvedTitle": {
            "type": "string",
            "description": "Resolved display title for the current locale"
          },
          "resolvedDescription": {
            "type": "string",
            "nullable": true,
            "description": "Resolved display description for the current locale"
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "in_progress",
              "blocked",
              "done"
            ],
            "description": "Task status"
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "urgent"
            ],
            "nullable": true,
            "description": "Task priority"
          },
          "assigneeUserId": {
            "type": "string",
            "nullable": true,
            "description": "User ID assigned to this task"
          },
          "createdByUserId": {
            "type": "string",
            "description": "User ID who created this task"
          },
          "dueDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Task due date"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Task completion date"
          },
          "tenantId": {
            "type": "string",
            "description": "Tenant ID"
          },
          "companyId": {
            "type": "string",
            "nullable": true,
            "description": "Company ID"
          },
          "portal": {
            "type": "string",
            "enum": [
              "company",
              "tenant",
              "partner",
              "internal",
              "superadmin"
            ],
            "description": "Portal this task belongs to"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Task creation date"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Task last update date"
          }
        }
      },
      "CompanyFollowUpEventBadge": {
        "type": "object",
        "required": [
          "kind",
          "key"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "type",
              "category"
            ]
          },
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "CompanyFollowUpEventAction": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "complete",
              "reopen"
            ]
          }
        }
      },
      "CompanyFollowUpEvent": {
        "type": "object",
        "required": [
          "id",
          "sourceType",
          "sourceId",
          "title",
          "resolvedTitle",
          "dueAt",
          "status",
          "priority",
          "deepLink",
          "badges",
          "actions"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Follow-up event identifier (<sourceType>:<sourceId>)"
          },
          "sourceType": {
            "type": "string",
            "enum": [
              "compliance",
              "task",
              "approval"
            ]
          },
          "sourceId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "titleKey": {
            "type": "string",
            "nullable": true
          },
          "descriptionKey": {
            "type": "string",
            "nullable": true
          },
          "resolvedTitle": {
            "type": "string"
          },
          "resolvedDescription": {
            "type": "string",
            "nullable": true
          },
          "dueAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "due_soon",
              "overdue",
              "blocked",
              "done"
            ]
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "urgent"
            ]
          },
          "assigneeUserId": {
            "type": "string",
            "nullable": true
          },
          "deepLink": {
            "type": "string"
          },
          "badges": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "kind",
                "key"
              ],
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "type",
                    "category"
                  ]
                },
                "key": {
                  "type": "string"
                },
                "label": {
                  "type": "string",
                  "nullable": true
                }
              }
            }
          },
          "actions": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "type"
              ],
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "complete",
                    "reopen"
                  ]
                }
              }
            }
          }
        }
      },
      "PrepareUploadRequest": {
        "type": "object",
        "properties": {
          "filename": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "contentType": {
            "type": "string",
            "enum": [
              "application/pdf",
              "image/jpeg",
              "image/png",
              "image/tiff",
              "image/bmp",
              "image/gif",
              "image/webp",
              "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
              "application/vnd.openxmlformats-officedocument.presentationml.presentation",
              "text/plain",
              "text/csv",
              "application/csv"
            ]
          },
          "folderId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "nullable": true
          }
        },
        "required": [
          "filename",
          "contentType"
        ]
      },
      "ConfirmUploadRequest": {
        "type": "object",
        "properties": {
          "storageKey": {
            "type": "string",
            "minLength": 1
          },
          "filename": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "contentType": {
            "type": "string",
            "enum": [
              "application/pdf",
              "image/jpeg",
              "image/png",
              "image/tiff",
              "image/bmp",
              "image/gif",
              "image/webp",
              "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
              "application/vnd.openxmlformats-officedocument.presentationml.presentation",
              "text/plain",
              "text/csv",
              "application/csv"
            ]
          },
          "size": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "folderId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "nullable": true
          },
          "metadata": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "invoice",
                  "receipt",
                  "contract",
                  "statement",
                  "payslip",
                  "employee_contract",
                  "social_security_declaration",
                  "salary_certificate",
                  "work_certificate",
                  "other"
                ]
              },
              "relatedEntityType": {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "bill",
                      "expense",
                      "invoice",
                      "order",
                      "quote",
                      "closing_run",
                      "closing_note",
                      "service_contract",
                      "payroll_run",
                      "payroll_declaration",
                      "contract"
                    ]
                  },
                  {
                    "type": "string",
                    "enum": [
                      "payroll.run",
                      "employee_contract",
                      "social_security_declaration"
                    ]
                  }
                ]
              },
              "relatedEntityId": {
                "type": "string",
                "pattern": "^[0-9a-fA-F]{24}$"
              }
            }
          }
        },
        "required": [
          "storageKey",
          "filename",
          "contentType",
          "size"
        ]
      },
      "UpdateDocumentRequest": {
        "type": "object",
        "properties": {
          "filename": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "type": {
            "type": "string",
            "enum": [
              "invoice",
              "receipt",
              "contract",
              "statement",
              "payslip",
              "employee_contract",
              "social_security_declaration",
              "salary_certificate",
              "work_certificate",
              "other"
            ]
          },
          "folderId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "nullable": true
          },
          "metadata": {
            "type": "object",
            "properties": {
              "relatedEntityType": {
                "oneOf": [
                  {
                    "type": "string",
                    "enum": [
                      "bill",
                      "expense",
                      "invoice",
                      "order",
                      "quote",
                      "closing_run",
                      "closing_note",
                      "service_contract",
                      "payroll_run",
                      "payroll_declaration",
                      "contract"
                    ]
                  },
                  {
                    "type": "string",
                    "enum": [
                      "payroll.run",
                      "employee_contract",
                      "social_security_declaration"
                    ]
                  }
                ]
              },
              "relatedEntityId": {
                "type": "string",
                "pattern": "^[0-9a-fA-F]{24}$"
              }
            }
          }
        }
      },
      "ListDocumentsQuery": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "invoice",
              "receipt",
              "contract",
              "statement",
              "payslip",
              "employee_contract",
              "social_security_declaration",
              "salary_certificate",
              "work_certificate",
              "other"
            ]
          },
          "status": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "pending_processing",
                "processing",
                "processed",
                "processing_failed",
                "deleted"
              ]
            }
          },
          "folderId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "nullable": true
          },
          "libraryRoot": {
            "type": "boolean"
          },
          "recordState": {
            "type": "string",
            "enum": [
              "active",
              "archived"
            ]
          },
          "includeArchived": {
            "type": "boolean"
          },
          "archivedOnly": {
            "type": "boolean"
          },
          "relatedEntityType": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "bill",
                  "expense",
                  "invoice",
                  "order",
                  "quote",
                  "closing_run",
                  "closing_note",
                  "service_contract",
                  "payroll_run",
                  "payroll_declaration",
                  "contract"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "payroll.run",
                  "employee_contract",
                  "social_security_declaration"
                ]
              }
            ]
          },
          "relatedEntityId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "lifecycleStage": {
            "type": "string",
            "enum": [
              "document_only",
              "processing",
              "classified",
              "routed",
              "work_item_created",
              "draft_created",
              "pending_approval",
              "finalized",
              "exception"
            ]
          },
          "automationOutcome": {
            "type": "string",
            "enum": [
              "none",
              "manual_only",
              "auto_draft_created",
              "blocked_by_policy",
              "blocked_by_confidence",
              "blocked_by_duplicates"
            ]
          },
          "folderRoutingStatus": {
            "type": "string",
            "enum": [
              "disabled",
              "no_folders",
              "no_suggestion",
              "suggested",
              "applied",
              "failed",
              "rejected"
            ]
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "offset": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "ClassifyDocumentInput": {
        "type": "object",
        "properties": {
          "extractedText": {
            "type": "string",
            "minLength": 1
          },
          "extractedEntities": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "minLength": 1
                },
                "value": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "type",
                "value"
              ]
            }
          },
          "filename": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "contentType": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "extractedText"
        ]
      },
      "CreateInvoiceRequest": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "currency": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "sent",
              "paid",
              "cancelled"
            ]
          },
          "description": {
            "type": "string"
          },
          "invoiceDate": {
            "type": "string",
            "format": "date-time"
          },
          "dueDate": {
            "type": "string",
            "format": "date-time"
          },
          "servicePeriodStart": {
            "type": "string",
            "format": "date-time"
          },
          "servicePeriodEnd": {
            "type": "string",
            "format": "date-time"
          },
          "recognitionPolicyRef": {
            "type": "string",
            "minLength": 1
          },
          "taxPointDate": {
            "type": "string",
            "format": "date-time"
          },
          "deliveryTermId": {
            "type": "string",
            "minLength": 1
          },
          "paymentTermId": {
            "type": "string",
            "minLength": 1
          },
          "incotermCode": {
            "type": "string",
            "minLength": 1
          },
          "taxMode": {
            "type": "string",
            "enum": [
              "exclusive",
              "inclusive"
            ]
          },
          "taxConfiguration": {
            "type": "string",
            "enum": [
              "exclusive",
              "inclusive"
            ]
          },
          "invoiceNumber": {
            "type": "string"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "description": {
                  "type": "string",
                  "minLength": 1
                },
                "quantity": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "unitPrice": {
                  "type": "number",
                  "minimum": 0
                },
                "vatRate": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                },
                "vatRuleCode": {
                  "type": "string",
                  "minLength": 1
                },
                "vatReportingActivityKey": {
                  "type": "string",
                  "minLength": 1
                },
                "productId": {
                  "type": "string"
                },
                "categoryId": {
                  "type": "string"
                }
              },
              "required": [
                "description",
                "quantity",
                "unitPrice",
                "vatRate"
              ]
            }
          },
          "counterparty": {
            "type": "object",
            "properties": {
              "entityType": {
                "type": "string",
                "enum": [
                  "PERSON",
                  "ORGANIZATION"
                ]
              },
              "entityId": {
                "type": "string",
                "pattern": "^[0-9a-fA-F]{24}$"
              }
            },
            "required": [
              "entityType",
              "entityId"
            ]
          },
          "paymentReference": {
            "type": "string"
          },
          "qrIban": {
            "type": "string"
          },
          "qrReference": {
            "type": "string"
          },
          "customerAccountId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "sourceOrderId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "sourceOrderLineRefs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "orderLineIndex": {
                  "type": "integer",
                  "minimum": 0
                },
                "quantity": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                }
              },
              "required": [
                "orderLineIndex",
                "quantity"
              ]
            }
          },
          "sourceProjectId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "sourceQuoteId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "sourceOpportunityId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "type": {
            "type": "string",
            "enum": [
              "invoice",
              "credit_note"
            ]
          },
          "originalInvoiceId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "customFieldValues": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "items",
          "counterparty"
        ]
      },
      "UpdateInvoiceRequest": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "currency": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "sent",
              "paid",
              "cancelled"
            ]
          },
          "description": {
            "type": "string"
          },
          "invoiceDate": {
            "type": "string",
            "format": "date-time"
          },
          "dueDate": {
            "type": "string",
            "format": "date-time"
          },
          "servicePeriodStart": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "servicePeriodEnd": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "recognitionPolicyRef": {
            "type": "string",
            "minLength": 1,
            "nullable": true
          },
          "taxPointDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "deliveryTermId": {
            "type": "string",
            "minLength": 1
          },
          "paymentTermId": {
            "type": "string",
            "minLength": 1
          },
          "incotermCode": {
            "type": "string",
            "minLength": 1
          },
          "taxMode": {
            "type": "string",
            "enum": [
              "exclusive",
              "inclusive"
            ]
          },
          "taxConfiguration": {
            "type": "string",
            "enum": [
              "exclusive",
              "inclusive"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "description": {
                  "type": "string",
                  "minLength": 1
                },
                "quantity": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "unitPrice": {
                  "type": "number",
                  "minimum": 0
                },
                "vatRate": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                },
                "vatRuleCode": {
                  "type": "string",
                  "minLength": 1
                },
                "vatReportingActivityKey": {
                  "type": "string",
                  "minLength": 1
                },
                "productId": {
                  "type": "string"
                },
                "categoryId": {
                  "type": "string"
                }
              },
              "required": [
                "description",
                "quantity",
                "unitPrice",
                "vatRate"
              ]
            }
          },
          "counterparty": {
            "type": "object",
            "properties": {
              "entityType": {
                "type": "string",
                "enum": [
                  "PERSON",
                  "ORGANIZATION"
                ]
              },
              "entityId": {
                "type": "string",
                "pattern": "^[0-9a-fA-F]{24}$"
              }
            },
            "required": [
              "entityType",
              "entityId"
            ]
          },
          "paymentReference": {
            "type": "string"
          },
          "qrIban": {
            "type": "string"
          },
          "qrReference": {
            "type": "string"
          },
          "customerAccountId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "type": {
            "type": "string",
            "enum": [
              "invoice",
              "credit_note"
            ]
          },
          "originalInvoiceId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "sourceProjectId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "sourceOpportunityId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "nullable": true
          },
          "customFieldValues": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      },
      "CreateOrderRequest": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "currency": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "pending",
              "confirmed",
              "in_progress",
              "shipped",
              "delivered",
              "cancelled"
            ]
          },
          "description": {
            "type": "string"
          },
          "orderDate": {
            "type": "string",
            "format": "date-time"
          },
          "deliveryDate": {
            "type": "string",
            "format": "date-time"
          },
          "deliveryTermId": {
            "type": "string",
            "minLength": 1
          },
          "paymentTermId": {
            "type": "string",
            "minLength": 1
          },
          "incotermCode": {
            "type": "string",
            "minLength": 1
          },
          "taxMode": {
            "type": "string",
            "enum": [
              "exclusive",
              "inclusive"
            ]
          },
          "warehouseId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "orderNumber": {
            "type": "string"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "description": {
                  "type": "string",
                  "minLength": 1
                },
                "quantity": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "unitPrice": {
                  "type": "number",
                  "minimum": 0
                },
                "vatRate": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                },
                "vatRuleCode": {
                  "type": "string",
                  "minLength": 1
                },
                "vatReportingActivityKey": {
                  "type": "string",
                  "minLength": 1
                },
                "productId": {
                  "type": "string"
                }
              },
              "required": [
                "description",
                "quantity",
                "unitPrice",
                "vatRate"
              ]
            }
          },
          "counterparty": {
            "type": "object",
            "properties": {
              "entityType": {
                "type": "string",
                "enum": [
                  "PERSON",
                  "ORGANIZATION"
                ]
              },
              "entityId": {
                "type": "string",
                "pattern": "^[0-9a-fA-F]{24}$"
              }
            },
            "required": [
              "entityType",
              "entityId"
            ]
          },
          "customerAccountId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "sourceQuoteId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "sourceOpportunityId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "customFieldValues": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "items",
          "counterparty"
        ]
      },
      "UpdateOrderRequest": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "currency": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "pending",
              "confirmed",
              "in_progress",
              "shipped",
              "delivered",
              "cancelled"
            ]
          },
          "description": {
            "type": "string"
          },
          "orderDate": {
            "type": "string",
            "format": "date-time"
          },
          "deliveryDate": {
            "type": "string",
            "format": "date-time"
          },
          "deliveryTermId": {
            "type": "string",
            "minLength": 1
          },
          "paymentTermId": {
            "type": "string",
            "minLength": 1
          },
          "incotermCode": {
            "type": "string",
            "minLength": 1
          },
          "taxMode": {
            "type": "string",
            "enum": [
              "exclusive",
              "inclusive"
            ]
          },
          "warehouseId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "description": {
                  "type": "string",
                  "minLength": 1
                },
                "quantity": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "unitPrice": {
                  "type": "number",
                  "minimum": 0
                },
                "vatRate": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                },
                "vatRuleCode": {
                  "type": "string",
                  "minLength": 1
                },
                "vatReportingActivityKey": {
                  "type": "string",
                  "minLength": 1
                },
                "productId": {
                  "type": "string"
                }
              },
              "required": [
                "description",
                "quantity",
                "unitPrice",
                "vatRate"
              ]
            }
          },
          "counterparty": {
            "type": "object",
            "properties": {
              "entityType": {
                "type": "string",
                "enum": [
                  "PERSON",
                  "ORGANIZATION"
                ]
              },
              "entityId": {
                "type": "string",
                "pattern": "^[0-9a-fA-F]{24}$"
              }
            },
            "required": [
              "entityType",
              "entityId"
            ]
          },
          "customerAccountId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "sourceOpportunityId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "nullable": true
          },
          "customFieldValues": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      },
      "CreateCommentRequest": {
        "type": "object",
        "properties": {
          "entityType": {
            "type": "string",
            "enum": [
              "invoice",
              "document",
              "task",
              "user",
              "order",
              "company",
              "tenant",
              "bank_account",
              "payment",
              "approval",
              "crm_lead",
              "crm_deal",
              "quote",
              "bill",
              "expense",
              "purchase_order",
              "expense_report",
              "credit_note",
              "budget",
              "vendor",
              "project",
              "time_entry",
              "project_expense",
              "project_task",
              "product",
              "warehouse",
              "stock_transfer",
              "adjustment",
              "stocktake",
              "batch_tracking",
              "serial_tracking",
              "return",
              "inventory_category",
              "employee",
              "leave_request",
              "performance_review",
              "payroll_run",
              "payroll_declaration",
              "contract",
              "ledger_entry",
              "journal",
              "ledger_sequence",
              "fiscal_period",
              "fixed_asset",
              "netting_batch",
              "closing_run",
              "closing_note",
              "approval_automation",
              "approval_template",
              "contact_person",
              "contact_organization",
              "contact_address",
              "contact_address_link",
              "customer_account",
              "service_contract",
              "service_portfolio",
              "country",
              "module",
              "document_template"
            ]
          },
          "entityId": {
            "type": "string",
            "minLength": 1
          },
          "parentId": {
            "type": "string"
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10000
          },
          "mentions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "entityType",
          "entityId",
          "message"
        ]
      },
      "UpdateCommentRequest": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10000
          }
        }
      },
      "CreateTaskRequest": {
        "type": "object",
        "properties": {
          "entityType": {
            "type": "string",
            "minLength": 1,
            "maxLength": 50
          },
          "entityId": {
            "type": "string",
            "minLength": 1
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "maxLength": 1000
          },
          "assigneeUserId": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "in_progress",
              "blocked",
              "done"
            ]
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "urgent"
            ]
          },
          "blockedReason": {
            "type": "string",
            "enum": [
              "missing_client_info",
              "waiting_approval",
              "dependency_blocked",
              "other"
            ]
          },
          "waitingOn": {
            "type": "string",
            "enum": [
              "client",
              "partner",
              "internal",
              "none"
            ]
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {}
          },
          "dueDate": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "entityType",
          "entityId",
          "title"
        ]
      },
      "UpdateTaskRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "maxLength": 1000
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "in_progress",
              "blocked",
              "done"
            ]
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "urgent"
            ]
          },
          "blockedReason": {
            "type": "string",
            "enum": [
              "missing_client_info",
              "waiting_approval",
              "dependency_blocked",
              "other"
            ]
          },
          "waitingOn": {
            "type": "string",
            "enum": [
              "client",
              "partner",
              "internal",
              "none"
            ]
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {}
          },
          "assigneeUserId": {
            "type": "string"
          },
          "dueDate": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ListTasksQuery": {
        "type": "object",
        "properties": {
          "entityType": {
            "type": "string",
            "minLength": 1
          },
          "entityId": {
            "type": "string",
            "minLength": 1
          },
          "assigneeUserId": {
            "type": "string",
            "minLength": 1
          },
          "assignedToMe": {
            "type": "boolean"
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "in_progress",
              "blocked",
              "done"
            ]
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "urgent"
            ]
          },
          "dueDateFrom": {
            "type": "string",
            "format": "date-time"
          },
          "dueDateTo": {
            "type": "string",
            "format": "date-time"
          },
          "search": {
            "type": "string",
            "minLength": 1
          },
          "createdByUserId": {
            "type": "string",
            "minLength": 1
          },
          "createdAfter": {
            "type": "string",
            "format": "date-time"
          },
          "createdBefore": {
            "type": "string",
            "format": "date-time"
          },
          "hasAssignee": {
            "type": "boolean"
          },
          "blockedReason": {
            "type": "string",
            "enum": [
              "missing_client_info",
              "waiting_approval",
              "dependency_blocked",
              "other"
            ]
          },
          "waitingOn": {
            "type": "string",
            "enum": [
              "client",
              "partner",
              "internal",
              "none"
            ]
          },
          "limit": {
            "type": "integer",
            "minimum": 0,
            "exclusiveMinimum": true,
            "maximum": 100
          },
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "cursor": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "CreatePersonRequest": {
        "type": "object",
        "properties": {
          "salutation": {
            "type": "string"
          },
          "firstName": {
            "type": "string",
            "minLength": 1
          },
          "lastName": {
            "type": "string",
            "minLength": 1
          },
          "jobTitle": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "phone": {
            "type": "string"
          },
          "mobile": {
            "type": "string"
          },
          "countryCode": {
            "type": "string"
          },
          "fiscalIdentifier": {
            "type": "string",
            "minLength": 1
          },
          "iban": {
            "type": "string",
            "minLength": 5,
            "maxLength": 34
          },
          "language": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "PRIVATE",
              "PROFESSIONAL"
            ]
          },
          "notes": {
            "type": "string"
          },
          "recordState": {
            "type": "string",
            "enum": [
              "active",
              "archived"
            ]
          },
          "customFieldValues": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "firstName",
          "lastName"
        ]
      },
      "UpdatePersonRequest": {
        "type": "object",
        "properties": {
          "salutation": {
            "type": "string"
          },
          "firstName": {
            "type": "string",
            "minLength": 1
          },
          "lastName": {
            "type": "string",
            "minLength": 1
          },
          "jobTitle": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "phone": {
            "type": "string"
          },
          "mobile": {
            "type": "string"
          },
          "countryCode": {
            "type": "string"
          },
          "fiscalIdentifier": {
            "type": "string",
            "minLength": 1
          },
          "iban": {
            "type": "string",
            "minLength": 5,
            "maxLength": 34
          },
          "language": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "PRIVATE",
              "PROFESSIONAL"
            ]
          },
          "notes": {
            "type": "string"
          },
          "recordState": {
            "type": "string",
            "enum": [
              "active",
              "archived"
            ]
          },
          "customFieldValues": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      },
      "CreateCompanyContactRequest": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string",
            "minLength": 1
          },
          "personId": {
            "type": "string",
            "minLength": 1
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "CLIENT",
                "SUPPLIER",
                "EMPLOYEE",
                "LEGAL_REP",
                "BILLING_CONTACT",
                "SHIPPING_CONTACT",
                "ACCOUNTING_CONTACT",
                "ADMIN"
              ]
            }
          },
          "isPrimary": {
            "type": "boolean"
          },
          "notes": {
            "type": "string"
          }
        },
        "required": [
          "personId",
          "roles"
        ]
      },
      "UpdateCompanyContactRequest": {
        "type": "object",
        "properties": {
          "roles": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "CLIENT",
                "SUPPLIER",
                "EMPLOYEE",
                "LEGAL_REP",
                "BILLING_CONTACT",
                "SHIPPING_CONTACT",
                "ACCOUNTING_CONTACT",
                "ADMIN"
              ]
            }
          },
          "isPrimary": {
            "type": "boolean"
          },
          "notes": {
            "type": "string"
          }
        }
      },
      "CreateAddressRequest": {
        "type": "object",
        "properties": {
          "street": {
            "type": "string",
            "minLength": 1
          },
          "streetNumber": {
            "type": "string"
          },
          "postalCode": {
            "type": "string",
            "minLength": 1
          },
          "city": {
            "type": "string",
            "minLength": 1
          },
          "state": {
            "type": "string"
          },
          "country": {
            "type": "string",
            "pattern": "^[A-Z]{2}$"
          },
          "notes": {
            "type": "string"
          },
          "recordState": {
            "type": "string",
            "enum": [
              "active",
              "archived"
            ]
          }
        },
        "required": [
          "street",
          "postalCode",
          "city",
          "country"
        ]
      },
      "UpdateAddressRequest": {
        "type": "object",
        "properties": {
          "street": {
            "type": "string",
            "minLength": 1
          },
          "streetNumber": {
            "type": "string"
          },
          "postalCode": {
            "type": "string",
            "minLength": 1
          },
          "city": {
            "type": "string",
            "minLength": 1
          },
          "state": {
            "type": "string"
          },
          "country": {
            "type": "string",
            "pattern": "^[A-Z]{2}$"
          },
          "notes": {
            "type": "string"
          },
          "recordState": {
            "type": "string",
            "enum": [
              "active",
              "archived"
            ]
          }
        }
      },
      "CreateAddressLinkRequest": {
        "type": "object",
        "properties": {
          "addressId": {
            "type": "string",
            "minLength": 1
          },
          "ownerType": {
            "type": "string",
            "enum": [
              "PERSON",
              "COMPANY",
              "ORGANIZATION"
            ]
          },
          "ownerId": {
            "type": "string",
            "minLength": 1
          },
          "usage": {
            "type": "string",
            "enum": [
              "REGISTERED",
              "BILLING",
              "SHIPPING",
              "LEGAL",
              "BRANCH",
              "WAREHOUSE",
              "PRIVATE",
              "OTHER"
            ]
          },
          "isPrimary": {
            "type": "boolean"
          },
          "notes": {
            "type": "string"
          }
        },
        "required": [
          "addressId",
          "ownerType",
          "ownerId",
          "usage"
        ]
      },
      "UpdateAddressLinkRequest": {
        "type": "object",
        "properties": {
          "usage": {
            "type": "string",
            "enum": [
              "REGISTERED",
              "BILLING",
              "SHIPPING",
              "LEGAL",
              "BRANCH",
              "WAREHOUSE",
              "PRIVATE",
              "OTHER"
            ]
          },
          "isPrimary": {
            "type": "boolean"
          },
          "notes": {
            "type": "string"
          }
        }
      },
      "UpdateTenantRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "domain": {
            "type": "string",
            "minLength": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "INACTIVE"
            ]
          },
          "recordState": {
            "type": "string",
            "enum": [
              "active",
              "inactive",
              "archived"
            ]
          },
          "billingInfo": {
            "type": "object",
            "properties": {
              "planId": {
                "type": "string"
              },
              "subscriptionId": {
                "type": "string"
              },
              "stripeCustomerId": {
                "type": "string"
              },
              "billingCycle": {
                "type": "string",
                "enum": [
                  "monthly",
                  "annual"
                ]
              },
              "subscriptionStatus": {
                "type": "string"
              },
              "billingType": {
                "type": "string",
                "enum": [
                  "tenant_plan",
                  "partner_tiered"
                ]
              },
              "subscriptionItemId": {
                "type": "string"
              },
              "seatQuantity": {
                "type": "integer",
                "minimum": 0
              },
              "seatSyncUpdatedAt": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "settings": {
            "type": "object",
            "additionalProperties": {}
          },
          "featureOverrides": {
            "type": "object",
            "additionalProperties": {}
          },
          "billingOverride": {
            "type": "object",
            "properties": {
              "planId": {
                "type": "string",
                "enum": [
                  "starter",
                  "plus",
                  "pro",
                  "enterprise"
                ]
              },
              "mode": {
                "type": "string",
                "enum": [
                  "internal_force",
                  "comped_stripe"
                ]
              },
              "startsAt": {
                "type": "string",
                "format": "date-time"
              },
              "endsAt": {
                "type": "string",
                "format": "date-time",
                "nullable": true
              },
              "reason": {
                "type": "string",
                "minLength": 3,
                "maxLength": 500
              },
              "createdBy": {
                "type": "string",
                "minLength": 1
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time"
              },
              "stripeCouponId": {
                "type": "string"
              },
              "stripeSubscriptionId": {
                "type": "string"
              },
              "stripeDiscountAppliedAt": {
                "type": "string",
                "format": "date-time"
              },
              "removeStripeDiscountOnExpiry": {
                "type": "boolean"
              }
            },
            "required": [
              "planId",
              "mode",
              "startsAt",
              "reason",
              "createdBy",
              "createdAt",
              "updatedAt"
            ]
          }
        }
      },
      "UpdateNotificationPreferencesRequest": {
        "type": "object",
        "properties": {
          "preferences": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "email": {
                  "type": "boolean"
                },
                "in_app": {
                  "type": "boolean"
                }
              },
              "required": [
                "email",
                "in_app"
              ]
            }
          },
          "emailEnabled": {
            "type": "boolean"
          },
          "inAppEnabled": {
            "type": "boolean"
          },
          "quietHours": {
            "type": "object",
            "properties": {
              "start": {
                "type": "string",
                "pattern": "^([0-1][0-9]|2[0-3]):[0-5][0-9]$"
              },
              "end": {
                "type": "string",
                "pattern": "^([0-1][0-9]|2[0-3]):[0-5][0-9]$"
              },
              "timezone": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "start",
              "end",
              "timezone"
            ],
            "nullable": true
          }
        }
      },
      "UpdateUserPreferencesRequest": {
        "type": "object",
        "properties": {
          "theme": {
            "type": "string",
            "enum": [
              "system",
              "light",
              "dark"
            ]
          },
          "tablePreferences": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "tableId": {
                  "type": "string",
                  "minLength": 1
                },
                "metadataVersion": {
                  "type": "integer",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "visibleColumnKeys": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "columnOrder": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "columns": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "visible": {
                        "type": "boolean"
                      },
                      "width": {
                        "type": "number"
                      },
                      "order": {
                        "type": "integer"
                      },
                      "pinning": {
                        "type": "string",
                        "enum": [
                          "left",
                          "right"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "visible"
                    ]
                  }
                },
                "sort": {
                  "type": "object",
                  "properties": {
                    "column": {
                      "type": "string",
                      "minLength": 1
                    },
                    "direction": {
                      "type": "string",
                      "enum": [
                        "asc",
                        "desc"
                      ]
                    }
                  },
                  "required": [
                    "column",
                    "direction"
                  ]
                },
                "pageSize": {
                  "type": "integer",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "updatedAt": {
                  "type": "string"
                }
              },
              "required": [
                "columns"
              ]
            }
          },
          "uiPreferences": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      },
      "TablePreferenceRequest": {
        "type": "object",
        "properties": {
          "tableId": {
            "type": "string",
            "minLength": 1
          },
          "metadataVersion": {
            "type": "integer",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "visibleColumnKeys": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "columnOrder": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "columns": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "visible": {
                  "type": "boolean"
                },
                "width": {
                  "type": "number"
                },
                "order": {
                  "type": "integer"
                },
                "pinning": {
                  "type": "string",
                  "enum": [
                    "left",
                    "right"
                  ]
                }
              },
              "required": [
                "id",
                "visible"
              ]
            }
          },
          "sort": {
            "type": "object",
            "properties": {
              "column": {
                "type": "string",
                "minLength": 1
              },
              "direction": {
                "type": "string",
                "enum": [
                  "asc",
                  "desc"
                ]
              }
            },
            "required": [
              "column",
              "direction"
            ]
          },
          "pageSize": {
            "type": "integer",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "columns"
        ]
      },
      "CreateCompanyRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "countryCode": {
            "type": "string",
            "pattern": "^[A-Z]{2}$"
          },
          "canton": {
            "type": "string"
          },
          "legalIdentifiers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "value": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "type",
                "value"
              ]
            }
          },
          "legalForm": {
            "type": "string",
            "minLength": 1
          },
          "fiscalYearStart": {
            "type": "object",
            "properties": {
              "month": {
                "type": "integer",
                "minimum": 1,
                "maximum": 12
              },
              "day": {
                "type": "integer",
                "minimum": 1,
                "maximum": 31
              }
            },
            "required": [
              "month",
              "day"
            ]
          },
          "cctApplicability": {
            "type": "string",
            "enum": [
              "unknown",
              "not_applicable",
              "applicable"
            ]
          },
          "defaultCctFamilyCode": {
            "type": "string",
            "minLength": 1,
            "nullable": true
          },
          "cctNonApplicabilityReason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000,
            "nullable": true
          },
          "vatRegistered": {
            "type": "boolean"
          },
          "vatRegistrationDate": {
            "type": "string",
            "format": "date-time"
          },
          "vatFilingFrequency": {
            "type": "string",
            "enum": [
              "monthly",
              "quarterly",
              "semiannual",
              "annual"
            ]
          },
          "vatReportingMethod": {
            "type": "string",
            "enum": [
              "effectiveReportingMethod",
              "netTaxRateMethod"
            ]
          },
          "hasEmployees": {
            "type": "boolean"
          },
          "firstPayrollMonth": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}$"
          },
          "selectedCct": {
            "type": "string",
            "minLength": 1,
            "nullable": true
          }
        },
        "required": [
          "name",
          "countryCode"
        ]
      },
      "UpdateCompanyRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "countryCode": {
            "type": "string",
            "pattern": "^[A-Z]{2}$"
          },
          "settings": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      },
      "InviteTenantUserRequest": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          },
          "role": {
            "type": "string",
            "enum": [
              "TENANT_ADMIN",
              "COMPANY_ADMIN",
              "COMPANY_USER"
            ]
          },
          "companyId": {
            "type": "string"
          },
          "groupIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "email"
        ]
      },
      "UpdateTenantUserRequest": {
        "type": "object",
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "TENANT_ADMIN",
              "COMPANY_ADMIN",
              "COMPANY_USER"
            ]
          },
          "companyIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "groupIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "SUSPENDED",
              "INVITED"
            ]
          },
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "InviteCompanyUserRequest": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          },
          "role": {
            "type": "string",
            "enum": [
              "COMPANY_ADMIN",
              "COMPANY_USER"
            ]
          },
          "groupIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "email",
          "role"
        ]
      },
      "UpdateCompanyUserRequest": {
        "type": "object",
        "properties": {
          "groupIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "SUSPENDED",
              "INVITED"
            ]
          },
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "InvitePartnerUserRequest": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          },
          "role": {
            "type": "string",
            "enum": [
              "PARTNER_ADMIN",
              "PARTNER_STAFF"
            ]
          },
          "groupIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "email",
          "role"
        ]
      },
      "UpdatePartnerUserRequest": {
        "type": "object",
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "PARTNER_ADMIN",
              "PARTNER_STAFF"
            ]
          },
          "groupIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "allowedCompanyIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "SUSPENDED",
              "INVITED"
            ]
          },
          "profile": {
            "type": "object",
            "properties": {
              "firstName": {
                "type": "string"
              },
              "lastName": {
                "type": "string"
              },
              "language": {
                "type": "string",
                "enum": [
                  "fr",
                  "en",
                  "de",
                  "it"
                ]
              },
              "timezone": {
                "type": "string"
              }
            }
          },
          "operationsProfile": {
            "type": "object",
            "properties": {
              "defaultGrade": {
                "type": "string",
                "enum": [
                  "assistant",
                  "associate",
                  "senior",
                  "manager",
                  "director",
                  "partner"
                ]
              },
              "defaultRole": {
                "type": "string",
                "enum": [
                  "lead",
                  "delivery",
                  "review",
                  "backup"
                ]
              },
              "defaultHourlyRate": {
                "type": "number",
                "minimum": 0
              },
              "defaultMonthlyCapacityHours": {
                "type": "number",
                "minimum": 0
              },
              "defaultScopeProcesses": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "operationsActive": {
                "type": "boolean"
              }
            }
          },
          "expectedUpdatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CreateGroupRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string"
          },
          "permissionCodes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "name"
        ]
      },
      "UpdateGroupRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string"
          },
          "permissionCodes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "userIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "TenantSettingsGeneralRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "countryCode": {
            "type": "string"
          },
          "timezone": {
            "type": "string",
            "minLength": 1
          },
          "locale": {
            "type": "string",
            "enum": [
              "fr",
              "en",
              "de",
              "it"
            ]
          },
          "currency": {
            "type": "string"
          },
          "dateFormat": {
            "type": "string",
            "minLength": 1
          },
          "numberFormat": {
            "type": "string",
            "minLength": 1
          },
          "branding": {
            "type": "object",
            "properties": {
              "logoStorageKey": {
                "type": "string",
                "minLength": 1,
                "nullable": true
              },
              "logoUrl": {
                "type": "string",
                "format": "uri",
                "nullable": true
              }
            }
          }
        }
      },
      "CompanySettingsGeneralRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "countryCode": {
            "type": "string",
            "pattern": "^[A-Z]{2}$"
          },
          "businessLocale": {
            "type": "string",
            "minLength": 5,
            "maxLength": 32,
            "nullable": true
          },
          "canton": {
            "type": "string"
          },
          "legalIdentifiers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "value": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "type",
                "value"
              ]
            }
          },
          "fiscalYearStart": {
            "type": "object",
            "properties": {
              "month": {
                "type": "number",
                "minimum": 1,
                "maximum": 12
              },
              "day": {
                "type": "number",
                "minimum": 1,
                "maximum": 31
              }
            },
            "required": [
              "month",
              "day"
            ]
          },
          "cctApplicability": {
            "type": "string",
            "enum": [
              "unknown",
              "not_applicable",
              "applicable"
            ]
          },
          "defaultCctFamilyCode": {
            "type": "string",
            "minLength": 1,
            "nullable": true
          },
          "cctNonApplicabilityReason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000,
            "nullable": true
          },
          "selectedCct": {
            "type": "string",
            "minLength": 1,
            "nullable": true
          },
          "settings": {
            "type": "object",
            "properties": {
              "contact": {
                "type": "object",
                "properties": {
                  "phone": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "website": {
                    "type": "string",
                    "format": "uri"
                  }
                }
              },
              "address": {
                "type": "object",
                "properties": {
                  "street": {
                    "type": "string"
                  },
                  "streetNumber": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "postalCode": {
                    "type": "string"
                  },
                  "state": {
                    "type": "string"
                  },
                  "canton": {
                    "type": "string"
                  },
                  "countryCode": {
                    "type": "string",
                    "pattern": "^[A-Z]{2}$"
                  }
                }
              },
              "legal": {
                "type": "object",
                "properties": {
                  "legalForm": {
                    "type": "string"
                  },
                  "registryNumber": {
                    "type": "string"
                  }
                }
              },
              "branding": {
                "type": "object",
                "properties": {
                  "logoStorageKey": {
                    "type": "string",
                    "minLength": 1,
                    "nullable": true
                  },
                  "logoUrl": {
                    "type": "string",
                    "format": "uri",
                    "nullable": true
                  },
                  "primaryColor": {
                    "type": "string",
                    "pattern": "^#[0-9a-fA-F]{6}$",
                    "nullable": true
                  },
                  "secondaryColor": {
                    "type": "string",
                    "pattern": "^#[0-9a-fA-F]{6}$",
                    "nullable": true
                  },
                  "fontFamily": {
                    "type": "string",
                    "minLength": 1,
                    "nullable": true
                  },
                  "footerText": {
                    "type": "string",
                    "maxLength": 500,
                    "nullable": true
                  }
                }
              },
              "banking": {
                "type": "object",
                "properties": {
                  "iban": {
                    "oneOf": [
                      {
                        "type": "string",
                        "pattern": "^[A-Za-z]{2}[0-9]{2}[A-Za-z0-9 ]{11,30}$"
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      }
                    ],
                    "nullable": true
                  }
                },
                "required": [
                  "iban"
                ]
              }
            }
          }
        }
      },
      "PartnerSettingsGeneralRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "settings": {
            "type": "object",
            "properties": {
              "logoUrl": {
                "type": "string",
                "format": "uri"
              },
              "defaultLocale": {
                "type": "string",
                "enum": [
                  "fr",
                  "en",
                  "de",
                  "it"
                ]
              },
              "timezone": {
                "type": "string",
                "minLength": 1
              },
              "countryCode": {
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              },
              "legalIdentifiers": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "minLength": 1
                    },
                    "value": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "type",
                    "value"
                  ]
                }
              },
              "contact": {
                "type": "object",
                "properties": {
                  "phone": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "website": {
                    "type": "string",
                    "format": "uri"
                  }
                }
              },
              "address": {
                "type": "object",
                "properties": {
                  "street": {
                    "type": "string"
                  },
                  "streetNumber": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "postalCode": {
                    "type": "string"
                  },
                  "state": {
                    "type": "string"
                  },
                  "canton": {
                    "type": "string"
                  },
                  "countryCode": {
                    "type": "string",
                    "pattern": "^[A-Z]{2}$"
                  }
                }
              },
              "legal": {
                "type": "object",
                "properties": {
                  "legalForm": {
                    "type": "string"
                  },
                  "registryNumber": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      },
      "MfaPolicyRequest": {
        "type": "object",
        "properties": {
          "enforcement": {
            "type": "string",
            "enum": [
              "optional",
              "recommended",
              "grace_period",
              "required"
            ]
          },
          "gracePeriodEndsAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "allowBackupCodes": {
            "type": "boolean"
          },
          "codeValidityDuration": {
            "type": "string",
            "enum": [
              "30",
              "60"
            ]
          },
          "trustedDevices": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "ttlDaysAdmin": {
                "type": "integer",
                "minimum": 1,
                "maximum": 90
              },
              "ttlDaysUser": {
                "type": "integer",
                "minimum": 1,
                "maximum": 90
              },
              "allowedPortals": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "company",
                    "tenant",
                    "partner"
                  ]
                }
              }
            }
          }
        }
      },
      "PasswordPolicyRequest": {
        "type": "object",
        "properties": {
          "minLength": {
            "type": "number",
            "minimum": 8,
            "maximum": 20
          },
          "requireUppercase": {
            "type": "boolean"
          },
          "requireLowercase": {
            "type": "boolean"
          },
          "requireNumbers": {
            "type": "boolean"
          },
          "requireSymbols": {
            "type": "boolean"
          },
          "maxAgeDays": {
            "type": "number",
            "minimum": 0,
            "nullable": true
          },
          "historyCount": {
            "type": "number",
            "minimum": 0,
            "maximum": 10
          },
          "checkBreached": {
            "type": "boolean"
          }
        }
      },
      "CreateConversationRequest": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "role": {
                  "type": "string",
                  "enum": [
                    "user",
                    "assistant",
                    "system",
                    "tool"
                  ]
                },
                "content": {
                  "type": "string",
                  "minLength": 1
                },
                "timestamp": {
                  "type": "string",
                  "format": "date-time"
                },
                "toolName": {
                  "type": "string",
                  "minLength": 1
                },
                "toolCallId": {
                  "type": "string",
                  "minLength": 1
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "success",
                    "error"
                  ]
                },
                "structuredContent": {},
                "toolCalls": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "args": {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "running",
                          "success",
                          "error",
                          "pending_approval"
                        ]
                      },
                      "output": {},
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "review": {
                        "type": "object",
                        "properties": {
                          "approvalId": {
                            "type": "string",
                            "minLength": 1,
                            "nullable": true
                          },
                          "risk": {
                            "type": "string",
                            "enum": [
                              "read",
                              "write_direct",
                              "write_reversible",
                              "write_approval_required",
                              "write_irreversible"
                            ]
                          },
                          "reversible": {
                            "type": "boolean"
                          },
                          "summary": {
                            "type": "string",
                            "minLength": 1
                          },
                          "preview": {},
                          "frozenToolCall": {
                            "type": "object",
                            "properties": {
                              "toolName": {
                                "type": "string",
                                "minLength": 1
                              },
                              "args": {
                                "type": "object",
                                "additionalProperties": {}
                              }
                            },
                            "required": [
                              "toolName",
                              "args"
                            ],
                            "nullable": true
                          }
                        }
                      }
                    },
                    "required": [
                      "name",
                      "args",
                      "status"
                    ]
                  }
                }
              },
              "required": [
                "role",
                "content"
              ]
            }
          },
          "title": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "contextSnapshot": {
            "type": "object",
            "properties": {
              "entity": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string"
                  },
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "type",
                  "id"
                ]
              },
              "accessMode": {
                "type": "string"
              },
              "filters": {
                "type": "object",
                "additionalProperties": {}
              },
              "pageUrl": {
                "type": "string"
              },
              "threadId": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "accessMode"
            ]
          },
          "threadStatus": {
            "type": "string",
            "enum": [
              "running",
              "error",
              "completed_unread",
              "completed_read"
            ]
          },
          "readAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "archivedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastRunStatus": {
            "type": "string",
            "enum": [
              "running",
              "completed",
              "error",
              "cancelled"
            ]
          }
        },
        "required": [
          "messages"
        ]
      },
      "AgentConversationCreate": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "role": {
                  "type": "string",
                  "enum": [
                    "user",
                    "assistant",
                    "system",
                    "tool"
                  ]
                },
                "content": {
                  "type": "string",
                  "minLength": 1
                },
                "timestamp": {
                  "type": "string",
                  "format": "date-time"
                },
                "toolName": {
                  "type": "string",
                  "minLength": 1
                },
                "toolCallId": {
                  "type": "string",
                  "minLength": 1
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "success",
                    "error"
                  ]
                },
                "structuredContent": {},
                "toolCalls": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "args": {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "running",
                          "success",
                          "error",
                          "pending_approval"
                        ]
                      },
                      "output": {},
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "review": {
                        "type": "object",
                        "properties": {
                          "approvalId": {
                            "type": "string",
                            "minLength": 1,
                            "nullable": true
                          },
                          "risk": {
                            "type": "string",
                            "enum": [
                              "read",
                              "write_direct",
                              "write_reversible",
                              "write_approval_required",
                              "write_irreversible"
                            ]
                          },
                          "reversible": {
                            "type": "boolean"
                          },
                          "summary": {
                            "type": "string",
                            "minLength": 1
                          },
                          "preview": {},
                          "frozenToolCall": {
                            "type": "object",
                            "properties": {
                              "toolName": {
                                "type": "string",
                                "minLength": 1
                              },
                              "args": {
                                "type": "object",
                                "additionalProperties": {}
                              }
                            },
                            "required": [
                              "toolName",
                              "args"
                            ],
                            "nullable": true
                          }
                        }
                      }
                    },
                    "required": [
                      "name",
                      "args",
                      "status"
                    ]
                  }
                }
              },
              "required": [
                "role",
                "content"
              ]
            }
          },
          "title": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "contextSnapshot": {
            "type": "object",
            "properties": {
              "entity": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string"
                  },
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "type",
                  "id"
                ]
              },
              "accessMode": {
                "type": "string"
              },
              "filters": {
                "type": "object",
                "additionalProperties": {}
              },
              "pageUrl": {
                "type": "string"
              },
              "threadId": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "accessMode"
            ]
          },
          "threadStatus": {
            "type": "string",
            "enum": [
              "running",
              "error",
              "completed_unread",
              "completed_read"
            ]
          },
          "readAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "archivedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastRunStatus": {
            "type": "string",
            "enum": [
              "running",
              "completed",
              "error",
              "cancelled"
            ]
          }
        },
        "required": [
          "messages"
        ]
      },
      "UpdateConversationRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1
          },
          "summary": {
            "type": "string"
          },
          "pinned": {
            "type": "boolean"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "role": {
                  "type": "string",
                  "enum": [
                    "user",
                    "assistant",
                    "system",
                    "tool"
                  ]
                },
                "content": {
                  "type": "string",
                  "minLength": 1
                },
                "timestamp": {
                  "type": "string",
                  "format": "date-time"
                },
                "toolName": {
                  "type": "string",
                  "minLength": 1
                },
                "toolCallId": {
                  "type": "string",
                  "minLength": 1
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "success",
                    "error"
                  ]
                },
                "structuredContent": {},
                "toolCalls": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "args": {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "running",
                          "success",
                          "error",
                          "pending_approval"
                        ]
                      },
                      "output": {},
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "review": {
                        "type": "object",
                        "properties": {
                          "approvalId": {
                            "type": "string",
                            "minLength": 1,
                            "nullable": true
                          },
                          "risk": {
                            "type": "string",
                            "enum": [
                              "read",
                              "write_direct",
                              "write_reversible",
                              "write_approval_required",
                              "write_irreversible"
                            ]
                          },
                          "reversible": {
                            "type": "boolean"
                          },
                          "summary": {
                            "type": "string",
                            "minLength": 1
                          },
                          "preview": {},
                          "frozenToolCall": {
                            "type": "object",
                            "properties": {
                              "toolName": {
                                "type": "string",
                                "minLength": 1
                              },
                              "args": {
                                "type": "object",
                                "additionalProperties": {}
                              }
                            },
                            "required": [
                              "toolName",
                              "args"
                            ],
                            "nullable": true
                          }
                        }
                      }
                    },
                    "required": [
                      "name",
                      "args",
                      "status"
                    ]
                  }
                }
              },
              "required": [
                "role",
                "content"
              ]
            }
          },
          "contextSnapshot": {
            "type": "object",
            "properties": {
              "entity": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string"
                  },
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "type",
                  "id"
                ]
              },
              "accessMode": {
                "type": "string"
              },
              "filters": {
                "type": "object",
                "additionalProperties": {}
              },
              "pageUrl": {
                "type": "string"
              },
              "threadId": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "accessMode"
            ]
          },
          "threadStatus": {
            "type": "string",
            "enum": [
              "running",
              "error",
              "completed_unread",
              "completed_read"
            ]
          },
          "readAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "archivedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastRunStatus": {
            "type": "string",
            "enum": [
              "running",
              "completed",
              "error",
              "cancelled"
            ]
          }
        }
      },
      "AgentConversationUpdate": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1
          },
          "summary": {
            "type": "string"
          },
          "pinned": {
            "type": "boolean"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "role": {
                  "type": "string",
                  "enum": [
                    "user",
                    "assistant",
                    "system",
                    "tool"
                  ]
                },
                "content": {
                  "type": "string",
                  "minLength": 1
                },
                "timestamp": {
                  "type": "string",
                  "format": "date-time"
                },
                "toolName": {
                  "type": "string",
                  "minLength": 1
                },
                "toolCallId": {
                  "type": "string",
                  "minLength": 1
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "success",
                    "error"
                  ]
                },
                "structuredContent": {},
                "toolCalls": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "args": {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "running",
                          "success",
                          "error",
                          "pending_approval"
                        ]
                      },
                      "output": {},
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "review": {
                        "type": "object",
                        "properties": {
                          "approvalId": {
                            "type": "string",
                            "minLength": 1,
                            "nullable": true
                          },
                          "risk": {
                            "type": "string",
                            "enum": [
                              "read",
                              "write_direct",
                              "write_reversible",
                              "write_approval_required",
                              "write_irreversible"
                            ]
                          },
                          "reversible": {
                            "type": "boolean"
                          },
                          "summary": {
                            "type": "string",
                            "minLength": 1
                          },
                          "preview": {},
                          "frozenToolCall": {
                            "type": "object",
                            "properties": {
                              "toolName": {
                                "type": "string",
                                "minLength": 1
                              },
                              "args": {
                                "type": "object",
                                "additionalProperties": {}
                              }
                            },
                            "required": [
                              "toolName",
                              "args"
                            ],
                            "nullable": true
                          }
                        }
                      }
                    },
                    "required": [
                      "name",
                      "args",
                      "status"
                    ]
                  }
                }
              },
              "required": [
                "role",
                "content"
              ]
            }
          },
          "contextSnapshot": {
            "type": "object",
            "properties": {
              "entity": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string"
                  },
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "type",
                  "id"
                ]
              },
              "accessMode": {
                "type": "string"
              },
              "filters": {
                "type": "object",
                "additionalProperties": {}
              },
              "pageUrl": {
                "type": "string"
              },
              "threadId": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "accessMode"
            ]
          },
          "threadStatus": {
            "type": "string",
            "enum": [
              "running",
              "error",
              "completed_unread",
              "completed_read"
            ]
          },
          "readAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "archivedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastRunStatus": {
            "type": "string",
            "enum": [
              "running",
              "completed",
              "error",
              "cancelled"
            ]
          }
        }
      },
      "CreateMemoryRequest": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "content": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10000
          },
          "type": {
            "type": "string",
            "enum": [
              "preference",
              "fact",
              "instruction",
              "context"
            ]
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {}
          },
          "pinned": {
            "type": "boolean"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "key",
          "content"
        ]
      },
      "AgentMemoryCreate": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "content": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10000
          },
          "type": {
            "type": "string",
            "enum": [
              "preference",
              "fact",
              "instruction",
              "context"
            ]
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {}
          },
          "pinned": {
            "type": "boolean"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "key",
          "content"
        ]
      },
      "UpdateMemoryRequest": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10000
          },
          "type": {
            "type": "string",
            "enum": [
              "preference",
              "fact",
              "instruction",
              "context"
            ]
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {}
          },
          "pinned": {
            "type": "boolean"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "AgentMemoryUpdate": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10000
          },
          "type": {
            "type": "string",
            "enum": [
              "preference",
              "fact",
              "instruction",
              "context"
            ]
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {}
          },
          "pinned": {
            "type": "boolean"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "UpdatePayrollConfigRequest": {
        "type": "object",
        "properties": {
          "processing": {
            "type": "object",
            "properties": {
              "frequency": {
                "type": "string",
                "enum": [
                  "monthly",
                  "biweekly",
                  "weekly"
                ]
              },
              "payday": {
                "type": "integer",
                "minimum": 1,
                "maximum": 31
              },
              "autoCalculate": {
                "type": "boolean"
              },
              "requireApproval": {
                "type": "boolean"
              },
              "requireApprovalAbove": {
                "type": "number",
                "minimum": 0
              },
              "allowRetroactiveCorrections": {
                "type": "boolean"
              },
              "generateAccountingEntries": {
                "type": "boolean"
              },
              "generateBankTransfers": {
                "type": "boolean"
              },
              "requireHREventForAllRuns": {
                "type": "boolean"
              }
            }
          },
          "contributions": {
            "type": "object",
            "properties": {
              "autoCalculateEmployer": {
                "type": "boolean"
              },
              "autoCalculateEmployee": {
                "type": "boolean"
              },
              "disabledTypes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "payslips": {
            "type": "object",
            "properties": {
              "autoGenerate": {
                "type": "boolean"
              },
              "autoDeliver": {
                "type": "boolean"
              },
              "templateId": {
                "type": "string"
              }
            }
          },
          "integrity": {
            "type": "object",
            "properties": {
              "enableIntegrityHash": {
                "type": "boolean"
              },
              "enableHashChaining": {
                "type": "boolean"
              }
            }
          },
          "socialSecurity": {
            "type": "object",
            "properties": {
              "lpp": {
                "type": "object",
                "properties": {
                  "rate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "employerRate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "employeeRate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  }
                },
                "required": [
                  "rate",
                  "employerRate",
                  "employeeRate"
                ]
              },
              "alv2": {
                "type": "object",
                "properties": {
                  "rate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "thresholdAnnual": {
                    "type": "number",
                    "minimum": 0
                  },
                  "employerRate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "employeeRate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  }
                },
                "required": [
                  "rate",
                  "thresholdAnnual"
                ]
              },
              "bvg": {
                "type": "object",
                "properties": {
                  "entryThresholdAnnual": {
                    "type": "number",
                    "minimum": 0
                  },
                  "coordinationDeductionAnnual": {
                    "type": "number",
                    "minimum": 0
                  },
                  "maxInsuredSalaryAnnual": {
                    "type": "number",
                    "minimum": 0
                  },
                  "ageRates": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "minAge": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 120
                        },
                        "maxAge": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 120
                        },
                        "rate": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1
                        }
                      },
                      "required": [
                        "minAge",
                        "maxAge",
                        "rate"
                      ]
                    }
                  },
                  "employerRateShare": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  }
                },
                "required": [
                  "entryThresholdAnnual",
                  "coordinationDeductionAnnual",
                  "maxInsuredSalaryAnnual",
                  "ageRates"
                ]
              },
              "uvg": {
                "type": "object",
                "properties": {
                  "maxBaseAnnual": {
                    "type": "number",
                    "minimum": 0
                  },
                  "buRate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "nbuRate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "nbuPaidByEmployee": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "maxBaseAnnual",
                  "buRate",
                  "nbuRate"
                ]
              },
              "fak": {
                "type": "object",
                "properties": {
                  "rate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  }
                },
                "required": [
                  "rate"
                ]
              },
              "healthInsurance": {
                "type": "object",
                "properties": {
                  "rate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  }
                },
                "required": [
                  "rate"
                ]
              },
              "customContributions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "minLength": 1
                    },
                    "nameKey": {
                      "type": "string",
                      "minLength": 1
                    },
                    "rate": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    "employerRate": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    "employeeRate": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    "maxBase": {
                      "type": "number",
                      "minimum": 0
                    },
                    "minBase": {
                      "type": "number",
                      "minimum": 0
                    },
                    "applyTo": {
                      "type": "string",
                      "enum": [
                        "all",
                        "specific_employees"
                      ]
                    },
                    "employeeIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "active": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "code",
                    "nameKey",
                    "rate",
                    "employerRate",
                    "employeeRate",
                    "applyTo",
                    "active"
                  ]
                }
              }
            }
          },
          "customDeductions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "minLength": 1
                },
                "nameKey": {
                  "type": "string",
                  "minLength": 1
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "fixed",
                    "percentage",
                    "custom"
                  ]
                },
                "amount": {
                  "type": "number",
                  "minimum": 0
                },
                "rate": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                "maxAmount": {
                  "type": "number",
                  "minimum": 0
                },
                "minAmount": {
                  "type": "number",
                  "minimum": 0
                },
                "applyTo": {
                  "type": "string",
                  "enum": [
                    "all",
                    "specific_employees"
                  ]
                },
                "employeeIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "startDate": {
                  "type": "string",
                  "format": "date-time"
                },
                "endDate": {
                  "type": "string",
                  "format": "date-time"
                },
                "priority": {
                  "type": "number",
                  "minimum": 0
                },
                "active": {
                  "type": "boolean"
                }
              },
              "required": [
                "code",
                "nameKey",
                "type",
                "applyTo",
                "priority",
                "active"
              ]
            }
          },
          "swissdec": {
            "type": "object",
            "properties": {
              "elmVersion": {
                "type": "string",
                "enum": [
                  "5.5.0"
                ]
              },
              "certificate": {
                "type": "string",
                "minLength": 1
              },
              "standardWeeklyHours": {
                "type": "number",
                "minimum": 1,
                "maximum": 80
              },
              "monthTotal": {
                "type": "object",
                "properties": {
                  "ahvAvs": {
                    "type": "object",
                    "properties": {
                      "institutionId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "branchNumber": {
                        "type": "string",
                        "minLength": 1
                      },
                      "customerNumber": {
                        "type": "string",
                        "minLength": 1
                      },
                      "subNumber": {
                        "type": "string",
                        "minLength": 1
                      }
                    }
                  },
                  "fakCaf": {
                    "type": "object",
                    "properties": {
                      "institutionId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "branchNumber": {
                        "type": "string",
                        "minLength": 1
                      },
                      "customerNumber": {
                        "type": "string",
                        "minLength": 1
                      },
                      "subNumber": {
                        "type": "string",
                        "minLength": 1
                      }
                    }
                  }
                }
              },
              "insurers": {
                "type": "object",
                "properties": {
                  "uvgLaa": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "uid": {
                        "type": "string",
                        "pattern": "^CHE-\\d{3}\\.\\d{3}\\.\\d{3}$"
                      }
                    }
                  },
                  "bvgLpp": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "uid": {
                        "type": "string",
                        "pattern": "^CHE-\\d{3}\\.\\d{3}\\.\\d{3}$"
                      }
                    }
                  }
                }
              },
              "declareSalary": {
                "type": "object",
                "properties": {
                  "uvgLaa": {
                    "type": "object",
                    "properties": {
                      "institutionId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "insuranceId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "insuranceCompanyName": {
                        "type": "string",
                        "minLength": 1
                      },
                      "customerIdentity": {
                        "type": "string",
                        "minLength": 1
                      },
                      "contractIdentity": {
                        "type": "string",
                        "minLength": 1
                      }
                    }
                  },
                  "bvgLpp": {
                    "type": "object",
                    "properties": {
                      "institutionId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "insuranceId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "insuranceCompanyName": {
                        "type": "string",
                        "minLength": 1
                      },
                      "customerIdentity": {
                        "type": "string",
                        "minLength": 1
                      },
                      "contractIdentity": {
                        "type": "string",
                        "minLength": 1
                      },
                      "generalValidAsOf": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "payrollUnit": {
                        "type": "string",
                        "minLength": 1
                      }
                    }
                  },
                  "taxAtSource": {
                    "type": "object",
                    "properties": {
                      "workMunicipalityId": {
                        "type": "string",
                        "pattern": "^[0-9]{1,6}$"
                      },
                      "institutions": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "institutionId": {
                              "type": "string",
                              "minLength": 1
                            },
                            "cantonId": {
                              "type": "string",
                              "enum": [
                                "AG",
                                "AI",
                                "AR",
                                "BE",
                                "BL",
                                "BS",
                                "FR",
                                "GE",
                                "GL",
                                "GR",
                                "JU",
                                "LU",
                                "NE",
                                "NW",
                                "OW",
                                "SG",
                                "SH",
                                "SO",
                                "SZ",
                                "TG",
                                "TI",
                                "UR",
                                "VD",
                                "VS",
                                "ZG",
                                "ZH"
                              ]
                            },
                            "customerIdentity": {
                              "type": "string",
                              "minLength": 1
                            },
                            "payrollUnit": {
                              "type": "string",
                              "minLength": 1
                            },
                            "taxAtSourceMunicipalityId": {
                              "type": "string",
                              "pattern": "^[0-9]{1,6}$"
                            },
                            "commissionRate": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1
                            }
                          },
                          "required": [
                            "institutionId",
                            "cantonId",
                            "customerIdentity",
                            "payrollUnit"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "CreateWebhookRequest": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ]
          }
        },
        "required": [
          "url",
          "events"
        ]
      },
      "UpdateWebhookRequest": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ]
          }
        }
      },
      "CreateAccountingEventRequest": {
        "type": "object",
        "properties": {
          "ledgerId": {
            "type": "string",
            "enum": [
              "statutory",
              "management",
              "simulation"
            ]
          },
          "targetLedgerIds": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "statutory",
                "management",
                "simulation"
              ]
            }
          },
          "generationMode": {
            "type": "string",
            "enum": [
              "single",
              "multi"
            ]
          },
          "sourceDomain": {
            "type": "string",
            "enum": [
              "sales",
              "purchases",
              "banking",
              "fixed_assets",
              "manual",
              "hr",
              "inventory",
              "projects",
              "closing"
            ]
          },
          "sourceEntityType": {
            "type": "string",
            "minLength": 1
          },
          "sourceEntityId": {
            "type": "string",
            "minLength": 1
          },
          "eventType": {
            "type": "string",
            "minLength": 1
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "eventData": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "sourceDomain",
          "sourceEntityType",
          "sourceEntityId",
          "eventType",
          "occurredAt",
          "eventData"
        ]
      },
      "CreateLedgerEntryRequest": {
        "type": "object",
        "properties": {
          "ledgerId": {
            "type": "string",
            "enum": [
              "statutory",
              "management",
              "simulation"
            ]
          },
          "accountingEventId": {
            "type": "string",
            "minLength": 1
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "journal": {
            "type": "string",
            "minLength": 1
          },
          "journalId": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ledgerLineId": {
                  "type": "string",
                  "minLength": 1
                },
                "accountCode": {
                  "type": "string",
                  "minLength": 1
                },
                "debit": {
                  "type": "number",
                  "minimum": 0
                },
                "credit": {
                  "type": "number",
                  "minimum": 0
                },
                "description": {
                  "type": "string"
                },
                "dimensions": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "accountCode",
                "debit",
                "credit"
              ]
            }
          },
          "description": {
            "type": "string"
          }
        },
        "required": [
          "accountingEventId",
          "date",
          "lines"
        ]
      },
      "UpdateCompanyVatReportingConfigRequest": {
        "type": "object",
        "properties": {
          "countryCode": {
            "type": "string"
          },
          "windows": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "minLength": 1
                },
                "reportingMethod": {
                  "type": "string",
                  "enum": [
                    "effectiveReportingMethod",
                    "netTaxRateMethod",
                    "flatTaxRateMethod",
                    "simpleTaxRateMethod"
                  ]
                },
                "filingFrequency": {
                  "type": "string",
                  "enum": [
                    "monthly",
                    "quarterly",
                    "semiannual",
                    "annual"
                  ]
                },
                "vatAccountingBasis": {
                  "type": "string",
                  "enum": [
                    "accrual",
                    "cash"
                  ]
                },
                "effectiveFrom": {
                  "type": "string",
                  "format": "date-time"
                },
                "effectiveTo": {
                  "type": "string",
                  "format": "date-time",
                  "nullable": true
                },
                "annualFilingApproved": {
                  "type": "boolean"
                },
                "annualFilingApprovalRef": {
                  "type": "string",
                  "minLength": 1,
                  "nullable": true
                },
                "netTaxRateActivities": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "activityKey": {
                        "type": "string",
                        "minLength": 1
                      },
                      "label": {
                        "type": "string",
                        "minLength": 1
                      },
                      "approvedRate": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100
                      },
                      "estvApprovalRef": {
                        "type": "string",
                        "minLength": 1,
                        "nullable": true
                      },
                      "effectiveFrom": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "effectiveTo": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true
                      },
                      "sourceMappings": {
                        "type": "object",
                        "properties": {
                          "productIds": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "revenueAccountCodes": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          }
                        }
                      }
                    },
                    "required": [
                      "activityKey",
                      "label",
                      "approvedRate"
                    ]
                  }
                },
                "adjustments": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "adjustmentType": {
                        "type": "string",
                        "enum": [
                          "acquisition_tax",
                          "compensation_export",
                          "deemed_input_tax_deduction",
                          "margin_taxation",
                          "method_transition_adjustment"
                        ]
                      },
                      "amount": {
                        "type": "number"
                      },
                      "rate": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100
                      },
                      "turnover": {
                        "type": "number"
                      },
                      "currency": {
                        "type": "string"
                      },
                      "applies": {
                        "type": "boolean"
                      },
                      "note": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "adjustmentType",
                      "amount"
                    ]
                  }
                }
              },
              "required": [
                "key",
                "reportingMethod",
                "filingFrequency",
                "effectiveFrom"
              ]
            }
          },
          "updatedBy": {
            "type": "string"
          },
          "periodAdjustments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "period": {
                  "type": "string",
                  "pattern": "^(\\d{4}-\\d{2}|\\d{4}-Q[1-4]|\\d{4}-H[1-2]|\\d{4})$"
                },
                "reportingMethod": {
                  "type": "string",
                  "enum": [
                    "effectiveReportingMethod",
                    "netTaxRateMethod",
                    "flatTaxRateMethod",
                    "simpleTaxRateMethod"
                  ]
                },
                "reportingWindowKey": {
                  "type": "string",
                  "minLength": 1,
                  "nullable": true
                },
                "entries": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "adjustmentType": {
                        "type": "string",
                        "enum": [
                          "acquisition_tax",
                          "compensation_export",
                          "deemed_input_tax_deduction",
                          "margin_taxation",
                          "method_transition_adjustment"
                        ]
                      },
                      "amount": {
                        "type": "number"
                      },
                      "rate": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100
                      },
                      "turnover": {
                        "type": "number"
                      },
                      "currency": {
                        "type": "string"
                      },
                      "applies": {
                        "type": "boolean"
                      },
                      "note": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "adjustmentType",
                      "amount"
                    ]
                  }
                }
              },
              "required": [
                "period",
                "reportingMethod",
                "entries"
              ]
            }
          }
        },
        "required": [
          "countryCode",
          "windows"
        ]
      },
      "UpdateLedgerEntryRequest": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "journal": {
            "type": "string",
            "minLength": 1
          },
          "journalId": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ledgerLineId": {
                  "type": "string",
                  "minLength": 1
                },
                "accountCode": {
                  "type": "string",
                  "minLength": 1
                },
                "debit": {
                  "type": "number",
                  "minimum": 0
                },
                "credit": {
                  "type": "number",
                  "minimum": 0
                },
                "description": {
                  "type": "string"
                },
                "dimensions": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "accountCode",
                "debit",
                "credit"
              ]
            }
          },
          "description": {
            "type": "string"
          }
        }
      },
      "CreateAccountRequest": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 1,
            "pattern": "^\\d+(\\.\\d+)*$"
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "type": {
            "type": "string",
            "enum": [
              "asset",
              "liability",
              "equity",
              "revenue",
              "expense"
            ]
          },
          "parentCode": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "dimensions": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "isSystem": {
            "type": "boolean"
          },
          "isActive": {
            "type": "boolean"
          }
        },
        "required": [
          "code",
          "name",
          "type"
        ]
      },
      "CreateBankAccountRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "bankName": {
            "type": "string",
            "minLength": 1
          },
          "iban": {
            "type": "string"
          },
          "accountNumber": {
            "type": "string"
          },
          "bankClearingNumber": {
            "type": "string"
          },
          "accountType": {
            "type": "string",
            "enum": [
              "checking",
              "savings",
              "credit",
              "investment",
              "other"
            ]
          },
          "currency": {
            "type": "string"
          },
          "openingBalance": {
            "type": "number"
          },
          "openingDate": {
            "type": "string",
            "format": "date-time"
          },
          "isDefault": {
            "type": "boolean"
          },
          "linkedAccountCode": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "bankName",
          "iban",
          "accountType",
          "currency"
        ]
      },
      "CreatePurchaseEventRequest": {
        "type": "object",
        "properties": {
          "sourceEntityType": {
            "type": "string",
            "enum": [
              "expense",
              "bill",
              "credit_note",
              "purchase_order",
              "expense_report",
              "budget"
            ]
          },
          "sourceEntityId": {
            "type": "string",
            "minLength": 1
          },
          "eventType": {
            "type": "string",
            "enum": [
              "expense_created",
              "expense_submitted",
              "expense_approved",
              "expense_rejected",
              "expense_paid",
              "bill_received",
              "bill_submitted",
              "bill_approved",
              "bill_rejected",
              "bill_posted",
              "bill_paid",
              "bill_reversed",
              "credit_note_created",
              "credit_note_submitted",
              "credit_note_approved",
              "credit_note_rejected",
              "credit_note_paid",
              "purchase_order_created",
              "purchase_order_sent",
              "purchase_order_received",
              "expense_report_created",
              "expense_report_submitted",
              "expense_report_approved",
              "expense_report_rejected",
              "expense_report_paid",
              "budget_created",
              "budget_updated",
              "budget_exceeded"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "eventData": {
            "type": "object",
            "additionalProperties": {}
          },
          "accountingEventId": {
            "type": "string"
          }
        },
        "required": [
          "sourceEntityType",
          "sourceEntityId",
          "eventType",
          "occurredAt"
        ]
      },
      "CreatePurchaseOrderRequest": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "currency": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "deliveryDate": {
            "type": "string",
            "format": "date-time"
          },
          "incotermCode": {
            "type": "string",
            "minLength": 1
          },
          "paymentTermId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "deliveryTermId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "description": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "productId": {
                  "type": "string"
                },
                "quantity": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "unitPrice": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "amount": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "vatRate": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                },
                "vatRuleCode": {
                  "type": "string",
                  "minLength": 1
                },
                "receivedQuantity": {
                  "type": "number",
                  "minimum": 0
                },
                "receivedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "billLineId": {
                  "type": "string",
                  "pattern": "^[0-9a-fA-F]{24}$"
                }
              },
              "required": [
                "description",
                "quantity",
                "unitPrice",
                "amount"
              ]
            }
          },
          "budgetId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "orderNumber": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "sent",
              "partially_received",
              "received",
              "cancelled"
            ]
          },
          "merchantName": {
            "type": "string",
            "minLength": 1
          },
          "counterparty": {
            "type": "object",
            "properties": {
              "entityType": {
                "type": "string",
                "enum": [
                  "PERSON",
                  "ORGANIZATION"
                ]
              },
              "entityId": {
                "type": "string",
                "pattern": "^[0-9a-fA-F]{24}$"
              }
            },
            "required": [
              "entityType",
              "entityId"
            ]
          },
          "matchStatus": {
            "type": "string",
            "enum": [
              "unmatched",
              "auto_matched",
              "confirmed",
              "rejected"
            ]
          },
          "matchConfidence": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "matchedBy": {
            "type": "string",
            "enum": [
              "ocr",
              "rule",
              "user"
            ]
          }
        },
        "required": [
          "amount",
          "currency",
          "date",
          "deliveryDate",
          "items"
        ]
      },
      "UpdatePurchaseOrderRequest": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "currency": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "deliveryDate": {
            "type": "string",
            "format": "date-time"
          },
          "incotermCode": {
            "type": "string",
            "minLength": 1
          },
          "paymentTermId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "deliveryTermId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "description": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "productId": {
                  "type": "string"
                },
                "quantity": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "unitPrice": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "amount": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "vatRate": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                },
                "vatRuleCode": {
                  "type": "string",
                  "minLength": 1
                },
                "receivedQuantity": {
                  "type": "number",
                  "minimum": 0
                },
                "receivedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "billLineId": {
                  "type": "string",
                  "pattern": "^[0-9a-fA-F]{24}$"
                }
              },
              "required": [
                "description",
                "quantity",
                "unitPrice",
                "amount"
              ]
            }
          },
          "budgetId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "sent",
              "partially_received",
              "received",
              "cancelled"
            ]
          },
          "merchantName": {
            "type": "string",
            "minLength": 1,
            "nullable": true
          },
          "counterparty": {
            "type": "object",
            "properties": {
              "entityType": {
                "type": "string",
                "enum": [
                  "PERSON",
                  "ORGANIZATION"
                ]
              },
              "entityId": {
                "type": "string",
                "pattern": "^[0-9a-fA-F]{24}$"
              }
            },
            "required": [
              "entityType",
              "entityId"
            ]
          },
          "matchStatus": {
            "type": "string",
            "enum": [
              "unmatched",
              "auto_matched",
              "confirmed",
              "rejected"
            ]
          },
          "matchConfidence": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "nullable": true
          },
          "matchedBy": {
            "type": "string",
            "enum": [
              "ocr",
              "rule",
              "user"
            ],
            "nullable": true
          }
        }
      },
      "ReceivePurchaseOrderRequest": {
        "type": "object",
        "properties": {
          "receivedLines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "lineId": {
                  "type": "string",
                  "minLength": 1
                },
                "receivedQuantity": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                }
              },
              "required": [
                "lineId",
                "receivedQuantity"
              ]
            }
          }
        },
        "required": [
          "receivedLines"
        ]
      },
      "MatchOrderToBillRequest": {
        "type": "object",
        "properties": {
          "billId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          }
        },
        "required": [
          "billId"
        ]
      },
      "CreateExpenseRequest": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "currency": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "categoryId": {
            "type": "string",
            "minLength": 1
          },
          "category": {
            "type": "string",
            "enum": [
              "office_supplies",
              "travel",
              "meals",
              "utilities",
              "other"
            ]
          },
          "description": {
            "type": "string",
            "minLength": 1
          },
          "vatRate": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "vatRuleCode": {
            "type": "string",
            "minLength": 1
          },
          "receiptDocumentId": {
            "type": "string"
          },
          "employeeId": {
            "type": "string"
          },
          "expenseNumber": {
            "type": "string"
          },
          "notes": {
            "type": "string",
            "maxLength": 2000
          },
          "paymentMethod": {
            "type": "string",
            "maxLength": 50
          },
          "receiptNumber": {
            "type": "string",
            "maxLength": 50
          },
          "merchantName": {
            "type": "string",
            "minLength": 1
          },
          "counterparty": {
            "type": "object",
            "properties": {
              "entityType": {
                "type": "string",
                "enum": [
                  "PERSON",
                  "ORGANIZATION"
                ]
              },
              "entityId": {
                "type": "string",
                "pattern": "^[0-9a-fA-F]{24}$"
              }
            },
            "required": [
              "entityType",
              "entityId"
            ]
          },
          "matchStatus": {
            "type": "string",
            "enum": [
              "unmatched",
              "auto_matched",
              "confirmed",
              "rejected"
            ]
          },
          "matchConfidence": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "matchedBy": {
            "type": "string",
            "enum": [
              "ocr",
              "rule",
              "user"
            ]
          }
        },
        "required": [
          "amount",
          "date",
          "description"
        ]
      },
      "UpdateExpenseRequest": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "currency": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "categoryId": {
            "type": "string",
            "minLength": 1
          },
          "category": {
            "type": "string",
            "enum": [
              "office_supplies",
              "travel",
              "meals",
              "utilities",
              "other"
            ]
          },
          "description": {
            "type": "string",
            "minLength": 1
          },
          "vatRate": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "vatRuleCode": {
            "type": "string",
            "minLength": 1
          },
          "receiptDocumentId": {
            "type": "string",
            "nullable": true
          },
          "employeeId": {
            "type": "string"
          },
          "notes": {
            "type": "string",
            "maxLength": 2000
          },
          "paymentMethod": {
            "type": "string",
            "maxLength": 50
          },
          "receiptNumber": {
            "type": "string",
            "maxLength": 50
          },
          "merchantName": {
            "type": "string",
            "minLength": 1,
            "nullable": true
          },
          "counterparty": {
            "type": "object",
            "properties": {
              "entityType": {
                "type": "string",
                "enum": [
                  "PERSON",
                  "ORGANIZATION"
                ]
              },
              "entityId": {
                "type": "string",
                "pattern": "^[0-9a-fA-F]{24}$"
              }
            },
            "required": [
              "entityType",
              "entityId"
            ]
          },
          "matchStatus": {
            "type": "string",
            "enum": [
              "unmatched",
              "auto_matched",
              "confirmed",
              "rejected"
            ]
          },
          "matchConfidence": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "nullable": true
          },
          "matchedBy": {
            "type": "string",
            "enum": [
              "ocr",
              "rule",
              "user"
            ],
            "nullable": true
          }
        }
      },
      "CreateExpenseReportRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "maxLength": 500
          },
          "expenseIds": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            }
          },
          "employeeId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "currency": {
            "type": "string"
          },
          "reportNumber": {
            "type": "string"
          }
        },
        "required": [
          "expenseIds"
        ]
      },
      "UpdateExpenseReportRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "maxLength": 500
          },
          "expenseIds": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{24}$"
            }
          },
          "employeeId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          }
        }
      },
      "RejectExpenseReportRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "reason"
        ]
      },
      "CreateCreditNoteRequest": {
        "type": "object",
        "properties": {
          "originalBillId": {
            "type": "string",
            "minLength": 1
          },
          "amount": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "currency": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "dueDate": {
            "type": "string",
            "format": "date-time"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "description": {
                  "type": "string",
                  "minLength": 1
                },
                "amount": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "vatRate": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                },
                "vatRuleCode": {
                  "type": "string",
                  "minLength": 1
                },
                "accountCode": {
                  "type": "string"
                },
                "categoryId": {
                  "type": "string",
                  "minLength": 1
                },
                "expenseCategoryId": {
                  "type": "string",
                  "minLength": 1
                },
                "category": {
                  "type": "string"
                },
                "productId": {
                  "type": "string"
                },
                "quantity": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "unitCost": {
                  "type": "number",
                  "minimum": 0
                }
              },
              "required": [
                "description",
                "amount",
                "vatRate"
              ]
            }
          },
          "reason": {
            "type": "string"
          },
          "paymentReference": {
            "type": "string",
            "maxLength": 35
          },
          "qrIban": {
            "type": "string"
          },
          "qrReference": {
            "type": "string"
          }
        },
        "required": [
          "originalBillId",
          "date",
          "items"
        ]
      },
      "UpdateCreditNoteRequest": {
        "type": "object",
        "properties": {
          "originalBillId": {
            "type": "string",
            "minLength": 1
          },
          "amount": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "currency": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "dueDate": {
            "type": "string",
            "format": "date-time"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "description": {
                  "type": "string",
                  "minLength": 1
                },
                "amount": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "vatRate": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                },
                "vatRuleCode": {
                  "type": "string",
                  "minLength": 1
                },
                "accountCode": {
                  "type": "string"
                },
                "categoryId": {
                  "type": "string",
                  "minLength": 1
                },
                "expenseCategoryId": {
                  "type": "string",
                  "minLength": 1
                },
                "category": {
                  "type": "string"
                },
                "productId": {
                  "type": "string"
                },
                "quantity": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "unitCost": {
                  "type": "number",
                  "minimum": 0
                }
              },
              "required": [
                "description",
                "amount",
                "vatRate"
              ]
            }
          },
          "reason": {
            "type": "string"
          },
          "paymentReference": {
            "type": "string",
            "maxLength": 35
          },
          "qrIban": {
            "type": "string"
          },
          "qrReference": {
            "type": "string"
          }
        }
      },
      "SubmitCreditNoteRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          }
        }
      },
      "ApproveCreditNoteRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          }
        }
      },
      "RejectCreditNoteRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "reason"
        ]
      },
      "PayCreditNoteRequest": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "paymentDate": {
            "type": "string",
            "format": "date-time"
          },
          "paymentMethod": {
            "type": "string",
            "enum": [
              "bank_transfer",
              "cash",
              "card",
              "other"
            ]
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "paymentReference": {
            "type": "string",
            "maxLength": 140
          },
          "note": {
            "type": "string",
            "maxLength": 2000
          },
          "sourceType": {
            "type": "string",
            "enum": [
              "bank_account",
              "ledger_account"
            ]
          },
          "sourceBankAccountId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "sourceLiquidityAccountCode": {
            "type": "string",
            "maxLength": 40
          },
          "paymentDifferenceHandling": {
            "type": "string",
            "enum": [
              "keep_open",
              "mark_fully_paid"
            ]
          },
          "differenceAccountCode": {
            "type": "string",
            "maxLength": 40
          },
          "differenceLabel": {
            "type": "string",
            "maxLength": 200
          }
        },
        "required": [
          "amount",
          "paymentDate",
          "paymentMethod",
          "idempotencyKey",
          "sourceType"
        ]
      },
      "CreateBudgetRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "maxLength": 500
          },
          "category": {
            "type": "string",
            "enum": [
              "expenses",
              "bills",
              "purchase_orders",
              "all"
            ]
          },
          "period": {
            "type": "string",
            "enum": [
              "monthly",
              "quarterly",
              "yearly"
            ]
          },
          "amount": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "currency": {
            "type": "string"
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "format": "date-time"
          },
          "warningThreshold": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "blockThreshold": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          }
        },
        "required": [
          "name",
          "category",
          "period",
          "amount",
          "currency",
          "startDate",
          "endDate"
        ]
      },
      "UpdateBudgetRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "maxLength": 500
          },
          "category": {
            "type": "string",
            "enum": [
              "expenses",
              "bills",
              "purchase_orders",
              "all"
            ]
          },
          "period": {
            "type": "string",
            "enum": [
              "monthly",
              "quarterly",
              "yearly"
            ]
          },
          "amount": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "currency": {
            "type": "string"
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "format": "date-time"
          },
          "warningThreshold": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "blockThreshold": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          }
        }
      },
      "CreateBillRequest": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "invoice",
              "credit_note"
            ]
          },
          "amount": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "currency": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "accountingDate": {
            "type": "string",
            "format": "date-time"
          },
          "dueDate": {
            "type": "string",
            "format": "date-time"
          },
          "paymentTermId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "vendorReference": {
            "type": "string",
            "minLength": 1
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "description": {
                  "type": "string",
                  "minLength": 1
                },
                "amount": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "vatRate": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                },
                "vatRuleCode": {
                  "type": "string",
                  "minLength": 1
                },
                "accountCode": {
                  "type": "string"
                },
                "categoryId": {
                  "type": "string",
                  "minLength": 1
                },
                "expenseCategoryId": {
                  "type": "string",
                  "minLength": 1
                },
                "category": {
                  "type": "string"
                },
                "productId": {
                  "type": "string"
                },
                "quantity": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "unitCost": {
                  "type": "number",
                  "minimum": 0
                }
              },
              "required": [
                "description",
                "amount",
                "vatRate"
              ]
            }
          },
          "billNumber": {
            "type": "string"
          },
          "paymentReference": {
            "type": "string",
            "maxLength": 35
          },
          "qrIban": {
            "type": "string"
          },
          "qrReference": {
            "type": "string"
          },
          "originalBillId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "documentId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "purchaseOrderId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "vendorVatId": {
            "type": "string",
            "minLength": 1
          },
          "vendorCompanyId": {
            "type": "string",
            "minLength": 1
          },
          "iban": {
            "type": "string",
            "minLength": 5,
            "maxLength": 34
          },
          "bicSwift": {
            "type": "string",
            "minLength": 8,
            "maxLength": 11
          },
          "bankName": {
            "type": "string",
            "maxLength": 100
          },
          "buyerName": {
            "type": "string",
            "maxLength": 200
          },
          "buyerAddress": {
            "type": "string",
            "maxLength": 500
          },
          "buyerVatId": {
            "type": "string",
            "minLength": 1
          },
          "invoiceNumber": {
            "type": "string",
            "maxLength": 50
          },
          "notes": {
            "type": "string",
            "maxLength": 2000
          },
          "paymentMethod": {
            "type": "string",
            "maxLength": 50
          },
          "orderNumber": {
            "type": "string",
            "maxLength": 50
          },
          "subtotal": {
            "type": "number",
            "minimum": 0
          },
          "discount": {
            "type": "number",
            "minimum": 0
          },
          "merchantName": {
            "type": "string",
            "minLength": 1
          },
          "counterparty": {
            "type": "object",
            "properties": {
              "entityType": {
                "type": "string",
                "enum": [
                  "PERSON",
                  "ORGANIZATION"
                ]
              },
              "entityId": {
                "type": "string",
                "pattern": "^[0-9a-fA-F]{24}$"
              }
            },
            "required": [
              "entityType",
              "entityId"
            ]
          },
          "matchStatus": {
            "type": "string",
            "enum": [
              "unmatched",
              "auto_matched",
              "confirmed",
              "rejected"
            ]
          },
          "matchConfidence": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "matchedBy": {
            "type": "string",
            "enum": [
              "ocr",
              "rule",
              "user"
            ]
          }
        },
        "required": [
          "amount",
          "date",
          "dueDate",
          "items"
        ]
      },
      "UpdatePurchaseConfigRequest": {
        "type": "object",
        "properties": {
          "expenses": {
            "type": "object",
            "properties": {
              "requireReceiptForAmountAbove": {
                "type": "number",
                "minimum": 0
              },
              "defaultExpenseCategoryId": {
                "type": "string",
                "minLength": 1
              },
              "defaultVatRuleId": {
                "type": "string",
                "minLength": 1
              },
              "enableOcr": {
                "type": "boolean"
              },
              "enableAutoClassification": {
                "type": "boolean"
              },
              "maxExpenseAmount": {
                "type": "number",
                "minimum": 0,
                "exclusiveMinimum": true
              },
              "allowForeignCurrency": {
                "type": "boolean"
              },
              "defaultCurrency": {
                "type": "string"
              }
            }
          },
          "bills": {
            "type": "object",
            "properties": {
              "requireTaxValidationForAmountAbove": {
                "type": "number",
                "minimum": 0
              },
              "defaultVatRuleId": {
                "type": "string",
                "minLength": 1
              },
              "defaultExpenseAccountId": {
                "type": "string",
                "minLength": 1
              },
              "enableAutoMatching": {
                "type": "boolean"
              },
              "enableOcr": {
                "type": "boolean"
              },
              "requireIbanValidation": {
                "type": "boolean"
              },
              "requireVatValidation": {
                "type": "boolean"
              },
              "allowManualTaxOverride": {
                "type": "boolean"
              }
            }
          },
          "purchaseOrders": {
            "type": "object",
            "properties": {
              "allowPartialReceipt": {
                "type": "boolean"
              },
              "allowOverReceipt": {
                "type": "boolean"
              },
              "maxOverReceiptPercentage": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "enableIncoterms": {
                "type": "boolean"
              },
              "enableBudgetCheck": {
                "type": "boolean"
              }
            }
          },
          "budgets": {
            "type": "object",
            "properties": {
              "enableBudgetControl": {
                "type": "boolean"
              },
              "budgetWarningThreshold": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "budgetBlockThreshold": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "allowOverBudget": {
                "type": "boolean"
              },
              "requireApprovalForOverBudget": {
                "type": "boolean"
              },
              "defaultBudgetPeriod": {
                "type": "string",
                "enum": [
                  "monthly",
                  "quarterly",
                  "yearly"
                ]
              },
              "enableMultiDimensionBudgets": {
                "type": "boolean"
              }
            }
          },
          "compliance": {
            "type": "object",
            "properties": {
              "requireVatValidation": {
                "type": "boolean"
              },
              "requireIbanValidation": {
                "type": "boolean"
              },
              "roundingMode": {
                "type": "string",
                "enum": [
                  "HALF_UP",
                  "HALF_DOWN",
                  "HALF_EVEN",
                  "CEILING",
                  "FLOOR"
                ]
              },
              "allowRetroactiveCorrections": {
                "type": "boolean"
              },
              "requireTaxValidationAbove": {
                "type": "number",
                "minimum": 0
              },
              "autoCalculateTax": {
                "type": "boolean"
              },
              "requireQrBillForSwissInvoices": {
                "type": "boolean"
              }
            }
          },
          "expenseRecognition": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "trigger": {
                "type": "string",
                "enum": [
                  "on_bill",
                  "on_payment",
                  "on_order_receipt"
                ]
              },
              "method": {
                "type": "string",
                "enum": [
                  "point_in_time",
                  "straight_line",
                  "milestone"
                ]
              },
              "prepaidExpenseAccountId": {
                "type": "string",
                "minLength": 1
              },
              "grniAccountId": {
                "type": "string",
                "minLength": 1
              }
            }
          }
        }
      },
      "UpdateAccountingConfigRequest": {
        "type": "object",
        "properties": {
          "ledger": {
            "type": "object",
            "properties": {
              "defaultLedgerId": {
                "type": "string",
                "enum": [
                  "statutory",
                  "management",
                  "simulation"
                ]
              },
              "activeLedgerIds": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "statutory",
                    "management",
                    "simulation"
                  ]
                }
              },
              "enableMultiLedger": {
                "type": "boolean"
              },
              "enableIntegrityHash": {
                "type": "boolean"
              },
              "enableHashChaining": {
                "type": "boolean"
              },
              "allowManualEntries": {
                "type": "boolean"
              },
              "requireAccountingEventForAllEntries": {
                "type": "boolean"
              }
            }
          },
          "banking": {
            "type": "object",
            "properties": {
              "matchingThresholdAuto": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "matchingThresholdSuggest": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "dateToleranceDays": {
                "type": "integer",
                "minimum": 0
              },
              "requireReconciliationBeforeClosing": {
                "type": "boolean"
              },
              "allowManualTransactions": {
                "type": "boolean"
              },
              "paymentPostingMode": {
                "type": "string",
                "enum": [
                  "direct",
                  "two_step"
                ]
              },
              "transitAlertThresholdDays": {
                "type": "integer",
                "minimum": 0,
                "maximum": 365
              }
            }
          },
          "compliance": {
            "type": "object",
            "properties": {
              "profile": {
                "type": "string",
                "enum": [
                  "STANDARD",
                  "CH_STATUTORY_AUDIT_READY"
                ]
              },
              "runtimeProfile": {
                "type": "string",
                "enum": [
                  "STANDARD",
                  "AUDIT_READY"
                ]
              },
              "frameworkKey": {
                "type": "string",
                "minLength": 1
              },
              "frameworkVersion": {
                "type": "string",
                "minLength": 1
              },
              "roundingMode": {
                "type": "string",
                "enum": [
                  "HALF_UP",
                  "HALF_DOWN",
                  "HALF_EVEN",
                  "CEILING",
                  "FLOOR"
                ]
              },
              "allowRetroactiveCorrections": {
                "type": "boolean"
              },
              "requireTaxValidationAbove": {
                "type": "number",
                "minimum": 0
              },
              "autoCalculateTax": {
                "type": "boolean"
              }
            }
          },
          "closing": {
            "type": "object",
            "properties": {
              "requireSecondApprover": {
                "type": "boolean"
              },
              "trialBalanceTolerance": {
                "type": "number",
                "minimum": 0
              },
              "autoGenerateDepreciation": {
                "type": "boolean"
              },
              "blockOnVatMismatch": {
                "type": "boolean"
              },
              "allowAllocationOverride": {
                "type": "boolean"
              }
            }
          },
          "currency": {
            "type": "object",
            "properties": {
              "multiCurrencyEnabled": {
                "type": "boolean"
              },
              "baseCurrency": {
                "type": "string"
              },
              "allowedCurrencies": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "salesDefaultCurrency": {
                "type": "string"
              },
              "purchasesDefaultCurrency": {
                "type": "string"
              },
              "allowManualRateOverride": {
                "type": "boolean"
              },
              "rateSource": {
                "type": "string",
                "enum": [
                  "manual",
                  "ecb"
                ]
              },
              "fxAccounts": {
                "type": "object",
                "properties": {
                  "realizedGain": {
                    "type": "string",
                    "minLength": 1
                  },
                  "realizedLoss": {
                    "type": "string",
                    "minLength": 1
                  },
                  "unrealizedGain": {
                    "type": "string",
                    "minLength": 1
                  },
                  "unrealizedLoss": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          }
        }
      },
      "UpdateContactsConfigRequest": {
        "type": "object",
        "properties": {
          "persons": {
            "type": "object",
            "properties": {
              "defaultType": {
                "type": "string",
                "enum": [
                  "PRIVATE",
                  "PROFESSIONAL"
                ]
              },
              "requireEmail": {
                "type": "boolean"
              },
              "requirePhone": {
                "type": "boolean"
              }
            }
          },
          "addresses": {
            "type": "object",
            "properties": {
              "defaultCountrySource": {
                "type": "string",
                "enum": [
                  "company",
                  "custom"
                ]
              },
              "customDefaultCountryCode": {
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              },
              "enforceCantonRequirementForCompanyCountry": {
                "type": "boolean"
              },
              "googleAutocompleteEnabled": {
                "type": "boolean"
              }
            }
          },
          "addressLinks": {
            "type": "object",
            "properties": {
              "defaultUsage": {
                "type": "string",
                "enum": [
                  "BILLING",
                  "SHIPPING",
                  "LEGAL",
                  "PRIVATE",
                  "OTHER"
                ]
              },
              "autoSetPrimaryOnFirstLinkForUsage": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "UpdateCommunicationConfigRequest": {
        "type": "object",
        "properties": {
          "approvals": {
            "type": "object",
            "properties": {
              "autoAssignApprover": {
                "type": "boolean"
              },
              "slaHours": {
                "type": "integer",
                "minimum": 1,
                "maximum": 720
              },
              "requireCommentOnReject": {
                "type": "boolean"
              },
              "enableAutomations": {
                "type": "boolean"
              }
            }
          },
          "tasks": {
            "type": "object",
            "properties": {
              "defaultAssigneeRole": {
                "type": "string",
                "enum": [
                  "creator",
                  "manager",
                  "none"
                ]
              },
              "allowDueDates": {
                "type": "boolean"
              },
              "reminderHoursBeforeDue": {
                "type": "integer",
                "minimum": 0,
                "maximum": 720
              },
              "allowCrossCompanyMentions": {
                "type": "boolean"
              }
            }
          },
          "comments": {
            "type": "object",
            "properties": {
              "allowMentions": {
                "type": "boolean"
              },
              "allowAttachments": {
                "type": "boolean"
              },
              "moderationEnabled": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "UpdateDocumentsConfigRequest": {
        "type": "object",
        "properties": {
          "documents": {
            "type": "object",
            "properties": {
              "processingApprovals": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "defaultAssigneeUserId": {
                    "type": "string"
                  },
                  "defaultAssigneeGroupId": {
                    "type": "string"
                  },
                  "rules": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "documentType": {
                          "type": "string",
                          "enum": [
                            "invoice",
                            "receipt",
                            "contract",
                            "statement",
                            "payslip",
                            "employee_contract",
                            "social_security_declaration",
                            "salary_certificate",
                            "work_certificate",
                            "other"
                          ]
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "action": {
                          "type": "string",
                          "enum": [
                            "none",
                            "create_bill_from_ocr",
                            "create_expense_from_ocr",
                            "create_purchase_order_from_ocr",
                            "create_sales_invoice_from_ocr",
                            "create_sales_order_from_ocr"
                          ]
                        },
                        "assignedToUserId": {
                          "type": "string"
                        },
                        "assignedToGroupId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "documentType",
                        "enabled",
                        "action"
                      ]
                    }
                  }
                }
              },
              "intakeRouting": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "defaultAssigneeUserId": {
                    "type": "string"
                  },
                  "defaultAssigneeGroupId": {
                    "type": "string"
                  },
                  "rules": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "documentType": {
                          "type": "string",
                          "enum": [
                            "invoice",
                            "receipt",
                            "contract",
                            "statement",
                            "payslip",
                            "employee_contract",
                            "social_security_declaration",
                            "salary_certificate",
                            "work_certificate",
                            "other"
                          ]
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "action": {
                          "type": "string",
                          "enum": [
                            "none",
                            "prepare_bill",
                            "prepare_expense",
                            "prepare_purchase_order",
                            "prepare_sales_invoice",
                            "prepare_sales_order"
                          ]
                        },
                        "targetEntityType": {
                          "type": "string",
                          "enum": [
                            "bill",
                            "expense",
                            "purchase_order",
                            "sales_invoice",
                            "sales_order"
                          ]
                        },
                        "defaultQueue": {
                          "type": "string"
                        },
                        "assignedToUserId": {
                          "type": "string"
                        },
                        "assignedToGroupId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "documentType",
                        "enabled",
                        "action"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      },
      "CreateQuoteRequest": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "currency": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "sent",
              "accepted",
              "rejected",
              "cancelled",
              "expired",
              "converted"
            ]
          },
          "description": {
            "type": "string"
          },
          "incotermCode": {
            "type": "string",
            "minLength": 1
          },
          "deliveryTermId": {
            "type": "string",
            "minLength": 1
          },
          "paymentTermId": {
            "type": "string",
            "minLength": 1
          },
          "pricelistId": {
            "type": "string",
            "minLength": 1
          },
          "taxMode": {
            "type": "string",
            "enum": [
              "exclusive",
              "inclusive"
            ]
          },
          "validUntil": {
            "type": "string",
            "format": "date-time"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "description": {
                  "type": "string",
                  "minLength": 1
                },
                "quantity": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "unitPrice": {
                  "type": "number",
                  "minimum": 0
                },
                "vatRate": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                },
                "vatRuleCode": {
                  "type": "string",
                  "minLength": 1
                },
                "vatReportingActivityKey": {
                  "type": "string",
                  "minLength": 1
                },
                "productId": {
                  "type": "string"
                }
              },
              "required": [
                "description",
                "quantity",
                "unitPrice",
                "vatRate"
              ]
            }
          },
          "quoteNumber": {
            "type": "string"
          },
          "counterparty": {
            "type": "object",
            "properties": {
              "entityType": {
                "type": "string",
                "enum": [
                  "PERSON",
                  "ORGANIZATION"
                ]
              },
              "entityId": {
                "type": "string",
                "pattern": "^[0-9a-fA-F]{24}$"
              }
            },
            "required": [
              "entityType",
              "entityId"
            ]
          },
          "sourceOpportunityId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$"
          },
          "customFieldValues": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "validUntil",
          "items",
          "counterparty"
        ]
      },
      "UpdateQuoteRequest": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "currency": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "sent",
              "accepted",
              "rejected",
              "cancelled",
              "expired",
              "converted"
            ]
          },
          "description": {
            "type": "string"
          },
          "incotermCode": {
            "type": "string",
            "minLength": 1
          },
          "deliveryTermId": {
            "type": "string",
            "minLength": 1
          },
          "paymentTermId": {
            "type": "string",
            "minLength": 1
          },
          "pricelistId": {
            "type": "string",
            "minLength": 1
          },
          "taxMode": {
            "type": "string",
            "enum": [
              "exclusive",
              "inclusive"
            ]
          },
          "validUntil": {
            "type": "string",
            "format": "date-time"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "description": {
                  "type": "string",
                  "minLength": 1
                },
                "quantity": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "unitPrice": {
                  "type": "number",
                  "minimum": 0
                },
                "vatRate": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                },
                "vatRuleCode": {
                  "type": "string",
                  "minLength": 1
                },
                "vatReportingActivityKey": {
                  "type": "string",
                  "minLength": 1
                },
                "productId": {
                  "type": "string"
                }
              },
              "required": [
                "description",
                "quantity",
                "unitPrice",
                "vatRate"
              ]
            }
          },
          "counterparty": {
            "type": "object",
            "properties": {
              "entityType": {
                "type": "string",
                "enum": [
                  "PERSON",
                  "ORGANIZATION"
                ]
              },
              "entityId": {
                "type": "string",
                "pattern": "^[0-9a-fA-F]{24}$"
              }
            },
            "required": [
              "entityType",
              "entityId"
            ]
          },
          "sourceOpportunityId": {
            "type": "string",
            "pattern": "^[0-9a-fA-F]{24}$",
            "nullable": true
          },
          "customFieldValues": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      },
      "UpdateSalesConfigRequest": {
        "type": "object",
        "properties": {
          "invoices": {
            "type": "object",
            "properties": {
              "requireTaxValidationForAmountAbove": {
                "type": "number",
                "minimum": 0
              },
              "requireQrBillForSwissInvoices": {
                "type": "boolean"
              },
              "requireIbanValidation": {
                "type": "boolean"
              },
              "requireVatValidation": {
                "type": "boolean"
              },
              "allowManualTaxOverride": {
                "type": "boolean"
              },
              "defaultRevenueAccountId": {
                "type": "string",
                "minLength": 1
              },
              "enableRecurringInvoices": {
                "type": "boolean"
              },
              "recurring": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "draftOnly": {
                    "type": "boolean"
                  },
                  "catchUpMissedPeriods": {
                    "type": "boolean"
                  },
                  "maxCatchUpPeriods": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 12
                  }
                },
                "required": [
                  "enabled",
                  "draftOnly",
                  "catchUpMissedPeriods",
                  "maxCatchUpPeriods"
                ]
              }
            }
          },
          "orders": {
            "type": "object",
            "properties": {
              "allowPartialDelivery": {
                "type": "boolean"
              },
              "allowOverDelivery": {
                "type": "boolean"
              },
              "maxOverDeliveryPercentage": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "enableIncoterms": {
                "type": "boolean"
              },
              "enableInventoryCheck": {
                "type": "boolean"
              },
              "autoConvertToInvoice": {
                "type": "boolean"
              }
            }
          },
          "quotes": {
            "type": "object",
            "properties": {
              "defaultValidityDays": {
                "type": "integer",
                "minimum": 1
              },
              "enableAutoExpiration": {
                "type": "boolean"
              },
              "allowPriceNegotiation": {
                "type": "boolean"
              },
              "enableConversionTracking": {
                "type": "boolean"
              }
            }
          },
          "compliance": {
            "type": "object",
            "properties": {
              "requireVatValidation": {
                "type": "boolean"
              },
              "requireIbanValidation": {
                "type": "boolean"
              },
              "roundingMode": {
                "type": "string",
                "enum": [
                  "HALF_UP",
                  "HALF_DOWN",
                  "HALF_EVEN",
                  "CEILING",
                  "FLOOR"
                ]
              },
              "allowRetroactiveCorrections": {
                "type": "boolean"
              },
              "requireTaxValidationAbove": {
                "type": "number",
                "minimum": 0
              },
              "autoCalculateTax": {
                "type": "boolean"
              },
              "requireQrBillForSwissInvoices": {
                "type": "boolean"
              },
              "defaultSalesVatRuleId": {
                "type": "string",
                "minLength": 1
              }
            }
          },
          "revenueRecognition": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "trigger": {
                "type": "string",
                "enum": [
                  "on_invoice",
                  "on_payment",
                  "on_order"
                ]
              },
              "method": {
                "type": "string",
                "enum": [
                  "point_in_time",
                  "straight_line",
                  "milestone",
                  "percentage_of_completion"
                ]
              },
              "deferredRevenueAccountId": {
                "type": "string",
                "minLength": 1
              },
              "contractAssetAccountId": {
                "type": "string",
                "minLength": 1
              },
              "contractLiabilityAccountId": {
                "type": "string",
                "minLength": 1
              }
            }
          }
        }
      },
      "UpdateInventoryConfigRequest": {
        "type": "object",
        "properties": {
          "valuation": {
            "type": "object",
            "properties": {
              "defaultMethod": {
                "type": "string",
                "enum": [
                  "FIFO",
                  "LIFO",
                  "average",
                  "standard"
                ]
              },
              "allowMethodChange": {
                "type": "boolean"
              },
              "requireApprovalForMethodChange": {
                "type": "boolean"
              },
              "allowNegativeStock": {
                "type": "boolean"
              },
              "requireCostForMovements": {
                "type": "boolean"
              }
            }
          },
          "tracking": {
            "type": "object",
            "properties": {
              "requireSerialTracking": {
                "type": "boolean"
              },
              "requireBatchTracking": {
                "type": "boolean"
              },
              "requireExpirationDates": {
                "type": "boolean"
              },
              "expirationAlertDays": {
                "type": "integer",
                "minimum": 0
              },
              "allowSerialDuplicates": {
                "type": "boolean"
              },
              "allowBatchDuplicates": {
                "type": "boolean"
              }
            }
          },
          "replenishment": {
            "type": "object",
            "properties": {
              "enableAutoReplenishment": {
                "type": "boolean"
              },
              "defaultReorderPoint": {
                "type": "number",
                "minimum": 0
              },
              "defaultReorderQuantity": {
                "type": "number",
                "minimum": 0
              },
              "requireApprovalForOrders": {
                "type": "boolean"
              },
              "enableForecasting": {
                "type": "boolean"
              },
              "forecastingMethod": {
                "type": "string",
                "enum": [
                  "moving_average",
                  "exponential_smoothing",
                  "linear_regression"
                ]
              }
            }
          },
          "units": {
            "type": "object",
            "properties": {
              "defaultUnit": {
                "type": "string",
                "minLength": 1
              },
              "supportedUnits": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "minLength": 1
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1
                    },
                    "symbol": {
                      "type": "string",
                      "minLength": 1
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "count",
                        "weight",
                        "volume",
                        "area",
                        "length"
                      ]
                    },
                    "isBase": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "code",
                    "name",
                    "symbol",
                    "type",
                    "isBase"
                  ]
                }
              },
              "allowCustomUnits": {
                "type": "boolean"
              },
              "conversionRules": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "fromUnit": {
                      "type": "string",
                      "minLength": 1
                    },
                    "toUnit": {
                      "type": "string",
                      "minLength": 1
                    },
                    "factor": {
                      "type": "number",
                      "minimum": 0,
                      "exclusiveMinimum": true
                    }
                  },
                  "required": [
                    "fromUnit",
                    "toUnit",
                    "factor"
                  ]
                }
              }
            }
          },
          "barcodes": {
            "type": "object",
            "properties": {
              "enableBarcodeScanning": {
                "type": "boolean"
              },
              "supportedFormats": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "EAN-13",
                    "EAN-8",
                    "UPC-A",
                    "Code-128",
                    "QR-Code",
                    "Data-Matrix"
                  ]
                }
              },
              "requireUniqueBarcodes": {
                "type": "boolean"
              },
              "allowMultipleBarcodesPerProduct": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "UpdateProjectsConfigRequest": {
        "type": "object",
        "properties": {
          "projects": {
            "type": "object",
            "properties": {
              "defaultBudget": {
                "type": "number",
                "minimum": 0
              },
              "requireClientForProjects": {
                "type": "boolean"
              },
              "allowProjectsWithoutClient": {
                "type": "boolean"
              },
              "maxProjectDurationDays": {
                "type": "integer",
                "minimum": 1
              },
              "enableProjectTemplates": {
                "type": "boolean"
              },
              "requireBudgetForProjects": {
                "type": "boolean"
              },
              "enableProjectPhases": {
                "type": "boolean"
              },
              "enableProjectMilestones": {
                "type": "boolean"
              }
            }
          },
          "timeEntries": {
            "type": "object",
            "properties": {
              "defaultHourlyRate": {
                "type": "number",
                "minimum": 0
              },
              "requireTaskForTimeEntry": {
                "type": "boolean"
              },
              "requireDescriptionForTimeEntry": {
                "type": "boolean"
              },
              "maxHoursPerDay": {
                "type": "number",
                "minimum": 0
              },
              "maxHoursPerWeek": {
                "type": "number",
                "minimum": 0
              },
              "enableTimeRounding": {
                "type": "boolean"
              },
              "timeRoundingInterval": {
                "type": "integer",
                "minimum": 1
              },
              "allowFutureTimeEntries": {
                "type": "boolean"
              },
              "allowPastTimeEntriesDays": {
                "type": "integer",
                "minimum": 0
              },
              "enableBillableTimeTracking": {
                "type": "boolean"
              },
              "defaultTimeEntryType": {
                "type": "string",
                "enum": [
                  "billable",
                  "non_billable",
                  "administrative"
                ]
              }
            }
          },
          "projectExpenses": {
            "type": "object",
            "properties": {
              "requireReceiptForAmountAbove": {
                "type": "number",
                "minimum": 0
              },
              "defaultExpenseCategory": {
                "type": "string",
                "minLength": 1
              },
              "maxExpenseAmount": {
                "type": "number",
                "minimum": 0
              },
              "allowForeignCurrency": {
                "type": "boolean"
              },
              "defaultCurrency": {
                "type": "string"
              },
              "requireDescriptionForExpense": {
                "type": "boolean"
              },
              "enableOcr": {
                "type": "boolean"
              },
              "enableAutoClassification": {
                "type": "boolean"
              }
            }
          },
          "budgets": {
            "type": "object",
            "properties": {
              "enableBudgetControl": {
                "type": "boolean"
              },
              "budgetWarningThreshold": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "budgetBlockThreshold": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "allowOverBudget": {
                "type": "boolean"
              },
              "requireApprovalForOverBudget": {
                "type": "boolean"
              },
              "enableBudgetByPhase": {
                "type": "boolean"
              },
              "enableBudgetByResource": {
                "type": "boolean"
              },
              "enableBudgetByCategory": {
                "type": "boolean"
              }
            }
          },
          "compliance": {
            "type": "object",
            "properties": {
              "requireVatValidation": {
                "type": "boolean"
              },
              "requireIbanValidation": {
                "type": "boolean"
              },
              "roundingMode": {
                "type": "string",
                "enum": [
                  "HALF_UP",
                  "HALF_DOWN",
                  "HALF_EVEN",
                  "CEILING",
                  "FLOOR"
                ]
              },
              "allowRetroactiveCorrections": {
                "type": "boolean"
              },
              "requireTaxValidationAbove": {
                "type": "number",
                "minimum": 0
              },
              "autoCalculateTax": {
                "type": "boolean"
              },
              "requireQrBillForSwissInvoices": {
                "type": "boolean"
              },
              "enableInvoiceValidation": {
                "type": "boolean"
              }
            }
          },
          "notifications": {
            "type": "object",
            "properties": {
              "budgetAlerts": {
                "type": "boolean"
              },
              "deadlineAlerts": {
                "type": "boolean"
              },
              "approvalRequests": {
                "type": "boolean"
              },
              "projectStatusChanges": {
                "type": "boolean"
              },
              "timeEntrySubmissions": {
                "type": "boolean"
              },
              "expenseSubmissions": {
                "type": "boolean"
              },
              "invoiceGenerated": {
                "type": "boolean"
              }
            }
          },
          "deliverySetupDefaults": {
            "type": "object",
            "properties": {
              "phoneEndpoints": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "label": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "number": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 30
                    },
                    "isPrimary": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "number"
                  ]
                }
              },
              "supportedLanguages": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 10
                }
              },
              "reportingModeId": {
                "type": "string",
                "minLength": 1
              },
              "assignedServiceUserIds": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "scheduleTemplateIds": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "operationalNotes": {
                "type": "string",
                "maxLength": 2000
              },
              "complianceCountryCode": {
                "type": "string"
              }
            }
          }
        }
      },
      "CreateSalesCreditNoteRequest": {
        "type": "object",
        "properties": {
          "originalInvoiceId": {
            "type": "string",
            "minLength": 1
          },
          "amount": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "currency": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "dueDate": {
            "type": "string",
            "format": "date-time"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "description": {
                  "type": "string",
                  "minLength": 1
                },
                "quantity": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "unitPrice": {
                  "type": "number",
                  "minimum": 0
                },
                "vatRate": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                },
                "vatRuleCode": {
                  "type": "string",
                  "minLength": 1
                },
                "vatReportingActivityKey": {
                  "type": "string",
                  "minLength": 1
                },
                "productId": {
                  "type": "string"
                },
                "categoryId": {
                  "type": "string"
                }
              },
              "required": [
                "description",
                "quantity",
                "unitPrice",
                "vatRate"
              ]
            }
          },
          "reason": {
            "type": "string"
          },
          "paymentReference": {
            "type": "string",
            "maxLength": 35
          },
          "qrIban": {
            "type": "string"
          },
          "qrReference": {
            "type": "string"
          }
        },
        "required": [
          "originalInvoiceId",
          "date",
          "items"
        ]
      },
      "UpdateSalesCreditNoteRequest": {
        "type": "object",
        "properties": {
          "originalInvoiceId": {
            "type": "string",
            "minLength": 1
          },
          "amount": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "currency": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "dueDate": {
            "type": "string",
            "format": "date-time"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "description": {
                  "type": "string",
                  "minLength": 1
                },
                "quantity": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "unitPrice": {
                  "type": "number",
                  "minimum": 0
                },
                "vatRate": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                },
                "vatRuleCode": {
                  "type": "string",
                  "minLength": 1
                },
                "vatReportingActivityKey": {
                  "type": "string",
                  "minLength": 1
                },
                "productId": {
                  "type": "string"
                },
                "categoryId": {
                  "type": "string"
                }
              },
              "required": [
                "description",
                "quantity",
                "unitPrice",
                "vatRate"
              ]
            }
          },
          "reason": {
            "type": "string"
          },
          "paymentReference": {
            "type": "string",
            "maxLength": 35
          },
          "qrIban": {
            "type": "string"
          },
          "qrReference": {
            "type": "string"
          }
        }
      },
      "SubmitSalesCreditNoteRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          }
        }
      },
      "ApproveSalesCreditNoteRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          }
        }
      },
      "RejectSalesCreditNoteRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          }
        }
      },
      "PaySalesCreditNoteRequest": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "paymentMethod": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "amount"
        ]
      },
      "CreateProjectRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "fixed_price",
              "time_material",
              "retainer",
              "milestone",
              "internal"
            ]
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "format": "date-time"
          },
          "organizationId": {
            "type": "string",
            "minLength": 1
          },
          "customerAccountId": {
            "type": "string",
            "minLength": 1
          },
          "sourceContractId": {
            "type": "string",
            "minLength": 1
          },
          "sourceOpportunityId": {
            "type": "string",
            "minLength": 1
          },
          "contractId": {
            "type": "string",
            "minLength": 1
          },
          "revenueRecognitionMethod": {
            "type": "string",
            "enum": [
              "point_in_time",
              "straight_line",
              "milestone",
              "time_material",
              "percentage_of_completion"
            ]
          },
          "recognitionBasis": {
            "type": "string",
            "enum": [
              "service_period",
              "delivery",
              "milestone",
              "time_entry",
              "manual"
            ]
          },
          "budget": {
            "type": "object",
            "properties": {
              "totalBudget": {
                "type": "number",
                "minimum": 0
              },
              "currency": {
                "type": "string"
              }
            },
            "required": [
              "totalBudget",
              "currency"
            ]
          },
          "settings": {
            "type": "object",
            "properties": {
              "allowTimeEntries": {
                "type": "boolean"
              },
              "allowExpenses": {
                "type": "boolean"
              },
              "requireApproval": {
                "type": "boolean"
              },
              "autoInvoice": {
                "type": "boolean"
              },
              "billingAutomation": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "cadence": {
                    "type": "string",
                    "enum": [
                      "monthly",
                      "quarterly"
                    ]
                  },
                  "includeApprovedTimeEntries": {
                    "type": "boolean"
                  },
                  "includeApprovedExpenses": {
                    "type": "boolean"
                  },
                  "draftOnly": {
                    "type": "boolean"
                  }
                }
              },
              "notifyOnBudgetExceeded": {
                "type": "boolean"
              },
              "budgetThreshold": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              }
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "members": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "userId": {
                  "type": "string",
                  "minLength": 1
                },
                "role": {
                  "type": "string"
                }
              },
              "required": [
                "userId",
                "role"
              ]
            }
          },
          "customFieldValues": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "name"
        ]
      },
      "UpdateProjectRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "fixed_price",
              "time_material",
              "retainer",
              "milestone",
              "internal"
            ]
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "format": "date-time"
          },
          "organizationId": {
            "type": "string",
            "minLength": 1
          },
          "customerAccountId": {
            "type": "string",
            "minLength": 1
          },
          "sourceContractId": {
            "type": "string",
            "minLength": 1
          },
          "sourceOpportunityId": {
            "type": "string",
            "minLength": 1
          },
          "contractId": {
            "type": "string",
            "minLength": 1,
            "nullable": true
          },
          "revenueRecognitionMethod": {
            "type": "string",
            "enum": [
              "point_in_time",
              "straight_line",
              "milestone",
              "time_material",
              "percentage_of_completion"
            ],
            "nullable": true
          },
          "recognitionBasis": {
            "type": "string",
            "enum": [
              "service_period",
              "delivery",
              "milestone",
              "time_entry",
              "manual"
            ],
            "nullable": true
          },
          "budget": {
            "type": "object",
            "properties": {
              "totalBudget": {
                "type": "number",
                "minimum": 0
              },
              "currency": {
                "type": "string"
              }
            },
            "required": [
              "totalBudget",
              "currency"
            ]
          },
          "settings": {
            "type": "object",
            "properties": {
              "allowTimeEntries": {
                "type": "boolean"
              },
              "allowExpenses": {
                "type": "boolean"
              },
              "requireApproval": {
                "type": "boolean"
              },
              "autoInvoice": {
                "type": "boolean"
              },
              "billingAutomation": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "cadence": {
                    "type": "string",
                    "enum": [
                      "monthly",
                      "quarterly"
                    ]
                  },
                  "includeApprovedTimeEntries": {
                    "type": "boolean"
                  },
                  "includeApprovedExpenses": {
                    "type": "boolean"
                  },
                  "draftOnly": {
                    "type": "boolean"
                  }
                }
              },
              "notifyOnBudgetExceeded": {
                "type": "boolean"
              },
              "budgetThreshold": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              }
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "members": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "userId": {
                  "type": "string",
                  "minLength": 1
                },
                "role": {
                  "type": "string"
                }
              },
              "required": [
                "userId",
                "role"
              ]
            }
          },
          "customFieldValues": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      },
      "CreateProjectTaskRequest": {
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string",
            "minLength": 1
          },
          "parentTaskId": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "pending",
              "active",
              "completed",
              "cancelled"
            ]
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "urgent"
            ]
          },
          "assignedTo": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "dueDate": {
            "type": "string",
            "format": "date-time"
          },
          "estimatedHours": {
            "type": "number",
            "minimum": 0
          },
          "billingRate": {
            "type": "number",
            "minimum": 0
          },
          "isBillable": {
            "type": "boolean"
          },
          "dependencies": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "projectId",
          "name"
        ]
      },
      "UpdateProjectTaskRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "pending",
              "active",
              "completed",
              "cancelled"
            ]
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "urgent"
            ]
          },
          "assignedTo": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "parentTaskId": {
            "type": "string"
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "dueDate": {
            "type": "string",
            "format": "date-time"
          },
          "estimatedHours": {
            "type": "number",
            "minimum": 0
          },
          "actualHours": {
            "type": "number",
            "minimum": 0
          },
          "billingRate": {
            "type": "number",
            "minimum": 0
          },
          "isBillable": {
            "type": "boolean"
          },
          "dependencies": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CreateProjectExpenseRequest": {
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string",
            "minLength": 1
          },
          "taskId": {
            "type": "string"
          },
          "category": {
            "type": "string",
            "enum": [
              "transport",
              "accommodation",
              "meals",
              "materials",
              "equipment",
              "other"
            ]
          },
          "description": {
            "type": "string",
            "minLength": 1
          },
          "amount": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "currency": {
            "type": "string"
          },
          "vatRate": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "pending",
              "approved",
              "rejected",
              "invoiced"
            ]
          },
          "receiptUrl": {
            "type": "string",
            "format": "uri"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "splitAcrossProjects": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "projectId": {
                  "type": "string"
                },
                "amount": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                }
              },
              "required": [
                "projectId",
                "amount"
              ]
            }
          },
          "markup": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          }
        },
        "required": [
          "projectId",
          "category",
          "description",
          "amount",
          "currency",
          "date"
        ]
      },
      "UpdateProjectExpenseRequest": {
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string",
            "minLength": 1
          },
          "taskId": {
            "type": "string"
          },
          "category": {
            "type": "string",
            "enum": [
              "transport",
              "accommodation",
              "meals",
              "materials",
              "equipment",
              "other"
            ]
          },
          "description": {
            "type": "string",
            "minLength": 1
          },
          "amount": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "currency": {
            "type": "string"
          },
          "vatRate": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "pending",
              "approved",
              "rejected",
              "invoiced"
            ]
          },
          "receiptUrl": {
            "type": "string",
            "format": "uri"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "splitAcrossProjects": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "projectId": {
                  "type": "string"
                },
                "amount": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                }
              },
              "required": [
                "projectId",
                "amount"
              ]
            }
          },
          "markup": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          }
        }
      },
      "CreateTimeEntryRequest": {
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string",
            "minLength": 1
          },
          "taskId": {
            "type": "string"
          },
          "userId": {
            "type": "string",
            "minLength": 1
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "hours": {
            "type": "integer",
            "minimum": 0,
            "maximum": 24
          },
          "minutes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 59
          },
          "description": {
            "type": "string"
          },
          "costRate": {
            "type": "number",
            "minimum": 0
          },
          "billingRate": {
            "type": "number",
            "minimum": 0
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "pending",
              "approved",
              "rejected",
              "invoiced"
            ]
          },
          "timesheetId": {
            "type": "string"
          }
        },
        "required": [
          "projectId",
          "userId",
          "date"
        ]
      },
      "UpdateTimeEntryRequest": {
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string",
            "minLength": 1
          },
          "taskId": {
            "type": "string"
          },
          "userId": {
            "type": "string",
            "minLength": 1
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "hours": {
            "type": "integer",
            "minimum": 0,
            "maximum": 24
          },
          "minutes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 59
          },
          "description": {
            "type": "string"
          },
          "costRate": {
            "type": "number",
            "minimum": 0
          },
          "billingRate": {
            "type": "number",
            "minimum": 0
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "pending",
              "approved",
              "rejected",
              "invoiced"
            ]
          },
          "timesheetId": {
            "type": "string"
          }
        }
      },
      "GenerateInvoiceRequest": {
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string",
            "minLength": 1
          },
          "dateFrom": {
            "type": "string",
            "format": "date-time"
          },
          "dateTo": {
            "type": "string",
            "format": "date-time"
          },
          "timeEntryIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "expenseIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "groupBy": {
            "type": "string",
            "enum": [
              "none",
              "month",
              "week"
            ]
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "dueDate": {
            "type": "string",
            "format": "date-time"
          },
          "includeNonBillable": {
            "type": "boolean"
          }
        },
        "required": [
          "projectId"
        ]
      },
      "SubmitTimeEntryForApprovalRequest": {
        "type": "object",
        "properties": {
          "timeEntryId": {
            "type": "string",
            "minLength": 1
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        },
        "required": [
          "timeEntryId"
        ]
      },
      "SubmitExpenseForApprovalRequest": {
        "type": "object",
        "properties": {
          "expenseId": {
            "type": "string",
            "minLength": 1
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        },
        "required": [
          "expenseId"
        ]
      },
      "CreateWarehouseRequest": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "address": {
            "type": "object",
            "properties": {
              "street": {
                "type": "string"
              },
              "city": {
                "type": "string"
              },
              "postalCode": {
                "type": "string"
              },
              "country": {
                "type": "string"
              }
            }
          },
          "isDefault": {
            "type": "boolean"
          }
        },
        "required": [
          "code",
          "name"
        ]
      },
      "UpdateWarehouseRequest": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "address": {
            "type": "object",
            "properties": {
              "street": {
                "type": "string"
              },
              "city": {
                "type": "string"
              },
              "postalCode": {
                "type": "string"
              },
              "country": {
                "type": "string"
              }
            }
          },
          "isDefault": {
            "type": "boolean"
          }
        }
      },
      "CreateLocationRequest": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "type": {
            "type": "string",
            "enum": [
              "zone",
              "aisle",
              "shelf",
              "bin"
            ]
          },
          "parentId": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          }
        },
        "required": [
          "code",
          "name",
          "type"
        ]
      },
      "UpdateLocationRequest": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "type": {
            "type": "string",
            "enum": [
              "zone",
              "aisle",
              "shelf",
              "bin"
            ]
          },
          "parentId": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          }
        }
      },
      "CreateProductRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "code": {
            "type": "string",
            "minLength": 1
          },
          "type": {
            "type": "string",
            "enum": [
              "stockable",
              "non_stockable",
              "consumable"
            ]
          },
          "sellable": {
            "type": "boolean"
          },
          "purchasable": {
            "type": "boolean"
          },
          "description": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "categoryId": {
            "type": "string"
          },
          "supplierId": {
            "type": "string"
          },
          "baseUnit": {
            "type": "string",
            "minLength": 1
          },
          "unitConversions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "fromUnit": {
                  "type": "string"
                },
                "toUnit": {
                  "type": "string"
                },
                "factor": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                }
              },
              "required": [
                "fromUnit",
                "toUnit",
                "factor"
              ]
            }
          },
          "packagingLevels": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "level": {
                  "type": "integer",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "name": {
                  "type": "string",
                  "minLength": 1
                },
                "quantity": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "barcode": {
                  "type": "string"
                }
              },
              "required": [
                "level",
                "name",
                "quantity"
              ]
            }
          },
          "barcodes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "barcode": {
                  "type": "string",
                  "minLength": 1
                },
                "format": {
                  "type": "string"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "product",
                    "variant",
                    "packaging"
                  ]
                },
                "variantId": {
                  "type": "string"
                },
                "packagingLevel": {
                  "type": "number"
                }
              },
              "required": [
                "barcode",
                "format",
                "type"
              ]
            }
          },
          "variants": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "variantId": {
                  "type": "string",
                  "minLength": 1
                },
                "name": {
                  "type": "string",
                  "minLength": 1
                },
                "sku": {
                  "type": "string"
                },
                "barcode": {
                  "type": "string"
                },
                "attributes": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "variantId",
                "name"
              ]
            }
          },
          "weight": {
            "type": "number",
            "minimum": 0
          },
          "dimensions": {
            "type": "object",
            "properties": {
              "length": {
                "type": "number",
                "minimum": 0
              },
              "width": {
                "type": "number",
                "minimum": 0
              },
              "height": {
                "type": "number",
                "minimum": 0
              }
            },
            "required": [
              "length",
              "width",
              "height"
            ]
          },
          "defaultSalesAccount": {
            "type": "string"
          },
          "defaultPurchaseAccount": {
            "type": "string"
          },
          "defaultInventoryAccount": {
            "type": "string"
          },
          "defaultSalesPrice": {
            "type": "object",
            "properties": {
              "amount": {
                "type": "number",
                "minimum": 0
              },
              "currency": {
                "type": "string"
              }
            },
            "required": [
              "amount",
              "currency"
            ]
          },
          "defaultPurchasePrice": {
            "type": "object",
            "properties": {
              "amount": {
                "type": "number",
                "minimum": 0
              },
              "currency": {
                "type": "string"
              }
            },
            "required": [
              "amount",
              "currency"
            ]
          },
          "defaultSalesVatRuleCode": {
            "type": "string",
            "minLength": 1
          },
          "defaultPurchaseVatRuleCode": {
            "type": "string",
            "minLength": 1
          },
          "customFieldValues": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "name",
          "code",
          "type",
          "baseUnit"
        ]
      },
      "UpdateProductRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "code": {
            "type": "string",
            "minLength": 1
          },
          "type": {
            "type": "string",
            "enum": [
              "stockable",
              "non_stockable",
              "consumable"
            ]
          },
          "sellable": {
            "type": "boolean"
          },
          "purchasable": {
            "type": "boolean"
          },
          "description": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "categoryId": {
            "type": "string"
          },
          "supplierId": {
            "type": "string"
          },
          "baseUnit": {
            "type": "string",
            "minLength": 1
          },
          "unitConversions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "fromUnit": {
                  "type": "string"
                },
                "toUnit": {
                  "type": "string"
                },
                "factor": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                }
              },
              "required": [
                "fromUnit",
                "toUnit",
                "factor"
              ]
            }
          },
          "packagingLevels": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "level": {
                  "type": "integer",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "name": {
                  "type": "string",
                  "minLength": 1
                },
                "quantity": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "barcode": {
                  "type": "string"
                }
              },
              "required": [
                "level",
                "name",
                "quantity"
              ]
            }
          },
          "barcodes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "barcode": {
                  "type": "string",
                  "minLength": 1
                },
                "format": {
                  "type": "string"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "product",
                    "variant",
                    "packaging"
                  ]
                },
                "variantId": {
                  "type": "string"
                },
                "packagingLevel": {
                  "type": "number"
                }
              },
              "required": [
                "barcode",
                "format",
                "type"
              ]
            }
          },
          "variants": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "variantId": {
                  "type": "string",
                  "minLength": 1
                },
                "name": {
                  "type": "string",
                  "minLength": 1
                },
                "sku": {
                  "type": "string"
                },
                "barcode": {
                  "type": "string"
                },
                "attributes": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "variantId",
                "name"
              ]
            }
          },
          "weight": {
            "type": "number",
            "minimum": 0
          },
          "dimensions": {
            "type": "object",
            "properties": {
              "length": {
                "type": "number",
                "minimum": 0
              },
              "width": {
                "type": "number",
                "minimum": 0
              },
              "height": {
                "type": "number",
                "minimum": 0
              }
            },
            "required": [
              "length",
              "width",
              "height"
            ]
          },
          "defaultSalesAccount": {
            "type": "string"
          },
          "defaultPurchaseAccount": {
            "type": "string"
          },
          "defaultInventoryAccount": {
            "type": "string"
          },
          "defaultSalesPrice": {
            "type": "object",
            "properties": {
              "amount": {
                "type": "number",
                "minimum": 0
              },
              "currency": {
                "type": "string"
              }
            },
            "required": [
              "amount",
              "currency"
            ]
          },
          "defaultPurchasePrice": {
            "type": "object",
            "properties": {
              "amount": {
                "type": "number",
                "minimum": 0
              },
              "currency": {
                "type": "string"
              }
            },
            "required": [
              "amount",
              "currency"
            ]
          },
          "defaultSalesVatRuleCode": {
            "type": "string",
            "minLength": 1
          },
          "defaultPurchaseVatRuleCode": {
            "type": "string",
            "minLength": 1
          },
          "customFieldValues": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      },
      "CreateTransferRequest": {
        "type": "object",
        "properties": {
          "sourceWarehouseId": {
            "type": "string",
            "minLength": 1
          },
          "destinationWarehouseId": {
            "type": "string",
            "minLength": 1
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "productId": {
                  "type": "string",
                  "minLength": 1
                },
                "quantity": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "unit": {
                  "type": "string",
                  "minLength": 1
                },
                "unitCost": {
                  "type": "number",
                  "minimum": 0
                },
                "notes": {
                  "type": "string"
                },
                "batchNumber": {
                  "type": "string"
                },
                "serialNumber": {
                  "type": "string"
                },
                "expirationDate": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "productId",
                "quantity",
                "unit"
              ]
            }
          },
          "requestedDate": {
            "type": "string",
            "format": "date-time"
          },
          "expectedDeliveryDate": {
            "type": "string",
            "format": "date-time"
          },
          "notes": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "transferNumber": {
            "type": "string"
          }
        },
        "required": [
          "sourceWarehouseId",
          "destinationWarehouseId",
          "lines"
        ]
      },
      "UpdateTransferRequest": {
        "type": "object",
        "properties": {
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "productId": {
                  "type": "string",
                  "minLength": 1
                },
                "quantity": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "unit": {
                  "type": "string",
                  "minLength": 1
                },
                "unitCost": {
                  "type": "number",
                  "minimum": 0
                },
                "notes": {
                  "type": "string"
                },
                "batchNumber": {
                  "type": "string"
                },
                "serialNumber": {
                  "type": "string"
                },
                "expirationDate": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "productId",
                "quantity",
                "unit"
              ]
            }
          },
          "expectedDeliveryDate": {
            "type": "string",
            "format": "date-time"
          },
          "notes": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "CreateStocktakeRequest": {
        "type": "object",
        "properties": {
          "warehouseId": {
            "type": "string",
            "minLength": 1
          },
          "locationId": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "productId": {
                  "type": "string",
                  "minLength": 1
                },
                "expectedQuantity": {
                  "type": "number",
                  "minimum": 0
                },
                "countedQuantity": {
                  "type": "number",
                  "minimum": 0
                },
                "unit": {
                  "type": "string",
                  "minLength": 1
                },
                "notes": {
                  "type": "string"
                },
                "batchNumber": {
                  "type": "string"
                },
                "serialNumber": {
                  "type": "string"
                },
                "expirationDate": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "productId",
                "expectedQuantity",
                "countedQuantity",
                "unit"
              ]
            }
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "notes": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "stocktakeNumber": {
            "type": "string"
          }
        },
        "required": [
          "warehouseId",
          "lines"
        ]
      },
      "UpdateStocktakeRequest": {
        "type": "object",
        "properties": {
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "productId": {
                  "type": "string",
                  "minLength": 1
                },
                "expectedQuantity": {
                  "type": "number",
                  "minimum": 0
                },
                "countedQuantity": {
                  "type": "number",
                  "minimum": 0
                },
                "unit": {
                  "type": "string",
                  "minLength": 1
                },
                "notes": {
                  "type": "string"
                },
                "batchNumber": {
                  "type": "string"
                },
                "serialNumber": {
                  "type": "string"
                },
                "expirationDate": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "productId",
                "expectedQuantity",
                "countedQuantity",
                "unit"
              ]
            }
          },
          "notes": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "CreateStockMovementRequest": {
        "type": "object",
        "properties": {
          "productId": {
            "type": "string",
            "minLength": 1
          },
          "warehouseId": {
            "type": "string",
            "minLength": 1
          },
          "locationId": {
            "type": "string"
          },
          "movementType": {
            "type": "string",
            "enum": [
              "in",
              "out",
              "transfer",
              "adjustment"
            ]
          },
          "sourceType": {
            "type": "string",
            "enum": [
              "invoice",
              "order",
              "purchase",
              "purchase_order",
              "transfer",
              "adjustment",
              "manual",
              "return"
            ]
          },
          "sourceId": {
            "type": "string"
          },
          "quantity": {
            "type": "number"
          },
          "unit": {
            "type": "string",
            "minLength": 1
          },
          "unitCost": {
            "type": "number",
            "minimum": 0
          },
          "movementDate": {
            "type": "string",
            "format": "date-time"
          },
          "reference": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "batchNumber": {
            "type": "string"
          },
          "serialNumber": {
            "type": "string"
          },
          "expirationDate": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "productId",
          "warehouseId",
          "movementType",
          "sourceType",
          "quantity",
          "unit",
          "movementDate"
        ]
      },
      "UpdateStockMovementRequest": {
        "type": "object",
        "properties": {
          "quantity": {
            "type": "number"
          },
          "unit": {
            "type": "string",
            "minLength": 1
          },
          "unitCost": {
            "type": "number",
            "minimum": 0
          },
          "movementDate": {
            "type": "string",
            "format": "date-time"
          },
          "reference": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "batchNumber": {
            "type": "string"
          },
          "serialNumber": {
            "type": "string"
          },
          "expirationDate": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CreateAdjustmentRequest": {
        "type": "object",
        "properties": {
          "warehouseId": {
            "type": "string",
            "minLength": 1
          },
          "locationId": {
            "type": "string"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "productId": {
                  "type": "string",
                  "minLength": 1
                },
                "quantity": {
                  "type": "number"
                },
                "unit": {
                  "type": "string",
                  "minLength": 1
                },
                "unitCost": {
                  "type": "number",
                  "minimum": 0
                },
                "reason": {
                  "type": "string",
                  "enum": [
                    "damaged",
                    "expired",
                    "lost",
                    "found",
                    "theft",
                    "count_error",
                    "other"
                  ]
                },
                "notes": {
                  "type": "string"
                },
                "batchNumber": {
                  "type": "string"
                },
                "serialNumber": {
                  "type": "string"
                },
                "expirationDate": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "productId",
                "quantity",
                "unit",
                "reason"
              ]
            }
          },
          "adjustmentDate": {
            "type": "string",
            "format": "date-time"
          },
          "notes": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "adjustmentNumber": {
            "type": "string"
          }
        },
        "required": [
          "warehouseId",
          "items"
        ]
      },
      "UpdateAdjustmentRequest": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "productId": {
                  "type": "string",
                  "minLength": 1
                },
                "quantity": {
                  "type": "number"
                },
                "unit": {
                  "type": "string",
                  "minLength": 1
                },
                "unitCost": {
                  "type": "number",
                  "minimum": 0
                },
                "reason": {
                  "type": "string",
                  "enum": [
                    "damaged",
                    "expired",
                    "lost",
                    "found",
                    "theft",
                    "count_error",
                    "other"
                  ]
                },
                "notes": {
                  "type": "string"
                },
                "batchNumber": {
                  "type": "string"
                },
                "serialNumber": {
                  "type": "string"
                },
                "expirationDate": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "productId",
                "quantity",
                "unit",
                "reason"
              ]
            }
          },
          "adjustmentDate": {
            "type": "string",
            "format": "date-time"
          },
          "notes": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "CreateEmployeeRequest": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "minLength": 1
          },
          "linkedUserId": {
            "type": "string",
            "minLength": 1,
            "nullable": true
          },
          "personId": {
            "type": "string",
            "minLength": 1
          },
          "socialSecurityNumber": {
            "type": "string",
            "maxLength": 30
          },
          "birthDate": {
            "type": "string",
            "format": "date-time"
          },
          "nationality": {
            "type": "string"
          },
          "maritalStatus": {
            "type": "string",
            "enum": [
              "single",
              "married",
              "divorced",
              "widowed",
              "registered_partnership"
            ]
          },
          "position": {
            "type": "string",
            "minLength": 1
          },
          "department": {
            "type": "string"
          },
          "grade": {
            "type": "string"
          },
          "managerId": {
            "type": "string"
          },
          "managerEmployeeId": {
            "type": "string",
            "minLength": 1,
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive",
              "on_leave",
              "in_training"
            ]
          },
          "recordState": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ]
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "format": "date-time"
          },
          "contract": {
            "type": "object",
            "properties": {
              "contractType": {
                "type": "string",
                "minLength": 1
              },
              "startDate": {
                "type": "string",
                "format": "date-time"
              },
              "endDate": {
                "type": "string",
                "format": "date-time"
              },
              "salary": {
                "type": "number",
                "minimum": 0
              },
              "compensationType": {
                "type": "string",
                "enum": [
                  "annual_salary",
                  "hourly"
                ]
              },
              "hourlyRate": {
                "type": "number",
                "minimum": 0
              },
              "thirteenthSalaryEnabled": {
                "type": "boolean"
              },
              "thirteenthSalaryMode": {
                "type": "string",
                "enum": [
                  "accrue_monthly",
                  "pay_in_december",
                  "pay_monthly"
                ]
              },
              "workingHours": {
                "type": "number",
                "minimum": 0,
                "maximum": 168
              },
              "cctAssignment": {
                "type": "object",
                "properties": {
                  "familyCode": {
                    "type": "string",
                    "minLength": 1
                  },
                  "classificationValues": {
                    "type": "object",
                    "additionalProperties": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        }
                      ]
                    }
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "complete",
                      "incomplete"
                    ]
                  }
                },
                "required": [
                  "status"
                ]
              },
              "probationPeriod": {
                "type": "number",
                "minimum": 0
              },
              "noticePeriod": {
                "type": "number",
                "minimum": 0
              },
              "clauses": {
                "type": "object",
                "additionalProperties": {}
              }
            },
            "required": [
              "contractType",
              "startDate",
              "salary",
              "workingHours"
            ]
          },
          "customFieldValues": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "personId",
          "position",
          "startDate",
          "contract"
        ]
      },
      "CreateEmployeeInput": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "minLength": 1
          },
          "linkedUserId": {
            "type": "string",
            "minLength": 1,
            "nullable": true
          },
          "personId": {
            "type": "string",
            "minLength": 1
          },
          "socialSecurityNumber": {
            "type": "string",
            "maxLength": 30
          },
          "birthDate": {
            "type": "string",
            "format": "date-time"
          },
          "nationality": {
            "type": "string"
          },
          "maritalStatus": {
            "type": "string",
            "enum": [
              "single",
              "married",
              "divorced",
              "widowed",
              "registered_partnership"
            ]
          },
          "position": {
            "type": "string",
            "minLength": 1
          },
          "department": {
            "type": "string"
          },
          "grade": {
            "type": "string"
          },
          "managerId": {
            "type": "string"
          },
          "managerEmployeeId": {
            "type": "string",
            "minLength": 1,
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive",
              "on_leave",
              "in_training"
            ]
          },
          "recordState": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ]
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "format": "date-time"
          },
          "contract": {
            "type": "object",
            "properties": {
              "contractType": {
                "type": "string",
                "minLength": 1
              },
              "startDate": {
                "type": "string",
                "format": "date-time"
              },
              "endDate": {
                "type": "string",
                "format": "date-time"
              },
              "salary": {
                "type": "number",
                "minimum": 0
              },
              "compensationType": {
                "type": "string",
                "enum": [
                  "annual_salary",
                  "hourly"
                ]
              },
              "hourlyRate": {
                "type": "number",
                "minimum": 0
              },
              "thirteenthSalaryEnabled": {
                "type": "boolean"
              },
              "thirteenthSalaryMode": {
                "type": "string",
                "enum": [
                  "accrue_monthly",
                  "pay_in_december",
                  "pay_monthly"
                ]
              },
              "workingHours": {
                "type": "number",
                "minimum": 0,
                "maximum": 168
              },
              "cctAssignment": {
                "type": "object",
                "properties": {
                  "familyCode": {
                    "type": "string",
                    "minLength": 1
                  },
                  "classificationValues": {
                    "type": "object",
                    "additionalProperties": {
                      "oneOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        }
                      ]
                    }
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "complete",
                      "incomplete"
                    ]
                  }
                },
                "required": [
                  "status"
                ]
              },
              "probationPeriod": {
                "type": "number",
                "minimum": 0
              },
              "noticePeriod": {
                "type": "number",
                "minimum": 0
              },
              "clauses": {
                "type": "object",
                "additionalProperties": {}
              }
            },
            "required": [
              "contractType",
              "startDate",
              "salary",
              "workingHours"
            ]
          },
          "customFieldValues": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "personId",
          "position",
          "startDate",
          "contract"
        ]
      },
      "UpdateEmployeeRequest": {
        "type": "object",
        "properties": {
          "socialSecurityNumber": {
            "type": "string",
            "maxLength": 30
          },
          "birthDate": {
            "type": "string",
            "format": "date-time"
          },
          "nationality": {
            "type": "string"
          },
          "maritalStatus": {
            "type": "string",
            "enum": [
              "single",
              "married",
              "divorced",
              "widowed",
              "registered_partnership"
            ]
          },
          "position": {
            "type": "string",
            "minLength": 1
          },
          "department": {
            "type": "string"
          },
          "grade": {
            "type": "string"
          },
          "managerId": {
            "type": "string"
          },
          "managerEmployeeId": {
            "type": "string",
            "minLength": 1,
            "nullable": true
          },
          "linkedUserId": {
            "type": "string",
            "minLength": 1,
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive",
              "on_leave",
              "in_training"
            ]
          },
          "recordState": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ]
          },
          "endDate": {
            "type": "string",
            "format": "date-time"
          },
          "customFieldValues": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      },
      "UpdateEmployeeInput": {
        "type": "object",
        "properties": {
          "socialSecurityNumber": {
            "type": "string",
            "maxLength": 30
          },
          "birthDate": {
            "type": "string",
            "format": "date-time"
          },
          "nationality": {
            "type": "string"
          },
          "maritalStatus": {
            "type": "string",
            "enum": [
              "single",
              "married",
              "divorced",
              "widowed",
              "registered_partnership"
            ]
          },
          "position": {
            "type": "string",
            "minLength": 1
          },
          "department": {
            "type": "string"
          },
          "grade": {
            "type": "string"
          },
          "managerId": {
            "type": "string"
          },
          "managerEmployeeId": {
            "type": "string",
            "minLength": 1,
            "nullable": true
          },
          "linkedUserId": {
            "type": "string",
            "minLength": 1,
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive",
              "on_leave",
              "in_training"
            ]
          },
          "recordState": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ]
          },
          "endDate": {
            "type": "string",
            "format": "date-time"
          },
          "customFieldValues": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      },
      "CreateEmployeeContractRequest": {
        "type": "object",
        "properties": {
          "employeeId": {
            "type": "string",
            "minLength": 1
          },
          "employeeRecordId": {
            "type": "string",
            "minLength": 1
          },
          "contractType": {
            "type": "string",
            "minLength": 1
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "format": "date-time"
          },
          "position": {
            "type": "string",
            "minLength": 1
          },
          "department": {
            "type": "string"
          },
          "grade": {
            "type": "string"
          },
          "salary": {
            "type": "number",
            "minimum": 0
          },
          "compensationType": {
            "type": "string",
            "enum": [
              "annual_salary",
              "hourly"
            ]
          },
          "hourlyRate": {
            "type": "number",
            "minimum": 0
          },
          "thirteenthSalaryEnabled": {
            "type": "boolean"
          },
          "thirteenthSalaryMode": {
            "type": "string",
            "enum": [
              "accrue_monthly",
              "pay_in_december",
              "pay_monthly"
            ]
          },
          "workingHours": {
            "type": "number",
            "minimum": 0,
            "maximum": 168
          },
          "cctAssignment": {
            "type": "object",
            "properties": {
              "familyCode": {
                "type": "string",
                "minLength": 1
              },
              "classificationValues": {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    }
                  ]
                }
              },
              "status": {
                "type": "string",
                "enum": [
                  "complete",
                  "incomplete"
                ]
              }
            },
            "required": [
              "status"
            ]
          },
          "probationPeriod": {
            "type": "number",
            "minimum": 0
          },
          "noticePeriod": {
            "type": "number",
            "minimum": 0
          },
          "clauses": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "employeeId",
          "contractType",
          "startDate",
          "position",
          "salary",
          "workingHours"
        ]
      },
      "CreateEmployeeContractInput": {
        "type": "object",
        "properties": {
          "employeeId": {
            "type": "string",
            "minLength": 1
          },
          "employeeRecordId": {
            "type": "string",
            "minLength": 1
          },
          "contractType": {
            "type": "string",
            "minLength": 1
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "format": "date-time"
          },
          "position": {
            "type": "string",
            "minLength": 1
          },
          "department": {
            "type": "string"
          },
          "grade": {
            "type": "string"
          },
          "salary": {
            "type": "number",
            "minimum": 0
          },
          "compensationType": {
            "type": "string",
            "enum": [
              "annual_salary",
              "hourly"
            ]
          },
          "hourlyRate": {
            "type": "number",
            "minimum": 0
          },
          "thirteenthSalaryEnabled": {
            "type": "boolean"
          },
          "thirteenthSalaryMode": {
            "type": "string",
            "enum": [
              "accrue_monthly",
              "pay_in_december",
              "pay_monthly"
            ]
          },
          "workingHours": {
            "type": "number",
            "minimum": 0,
            "maximum": 168
          },
          "cctAssignment": {
            "type": "object",
            "properties": {
              "familyCode": {
                "type": "string",
                "minLength": 1
              },
              "classificationValues": {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    }
                  ]
                }
              },
              "status": {
                "type": "string",
                "enum": [
                  "complete",
                  "incomplete"
                ]
              }
            },
            "required": [
              "status"
            ]
          },
          "probationPeriod": {
            "type": "number",
            "minimum": 0
          },
          "noticePeriod": {
            "type": "number",
            "minimum": 0
          },
          "clauses": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "employeeId",
          "contractType",
          "startDate",
          "position",
          "salary",
          "workingHours"
        ]
      },
      "UpdateEmployeeContractRequest": {
        "type": "object",
        "properties": {
          "contractType": {
            "type": "string",
            "minLength": 1
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "position": {
            "type": "string",
            "minLength": 1
          },
          "department": {
            "type": "string"
          },
          "grade": {
            "type": "string"
          },
          "salary": {
            "type": "number",
            "minimum": 0
          },
          "compensationType": {
            "type": "string",
            "enum": [
              "annual_salary",
              "hourly"
            ]
          },
          "hourlyRate": {
            "type": "number",
            "minimum": 0
          },
          "thirteenthSalaryEnabled": {
            "type": "boolean"
          },
          "thirteenthSalaryMode": {
            "type": "string",
            "enum": [
              "accrue_monthly",
              "pay_in_december",
              "pay_monthly"
            ]
          },
          "workingHours": {
            "type": "number",
            "minimum": 0,
            "maximum": 168
          },
          "cctAssignment": {
            "type": "object",
            "properties": {
              "familyCode": {
                "type": "string",
                "minLength": 1
              },
              "classificationValues": {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    }
                  ]
                }
              },
              "status": {
                "type": "string",
                "enum": [
                  "complete",
                  "incomplete"
                ]
              }
            },
            "required": [
              "status"
            ],
            "nullable": true
          },
          "probationPeriod": {
            "type": "number",
            "minimum": 0,
            "nullable": true
          },
          "noticePeriod": {
            "type": "number",
            "minimum": 0,
            "nullable": true
          },
          "clauses": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      },
      "UpdateEmployeeContractInput": {
        "type": "object",
        "properties": {
          "contractType": {
            "type": "string",
            "minLength": 1
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "position": {
            "type": "string",
            "minLength": 1
          },
          "department": {
            "type": "string"
          },
          "grade": {
            "type": "string"
          },
          "salary": {
            "type": "number",
            "minimum": 0
          },
          "compensationType": {
            "type": "string",
            "enum": [
              "annual_salary",
              "hourly"
            ]
          },
          "hourlyRate": {
            "type": "number",
            "minimum": 0
          },
          "thirteenthSalaryEnabled": {
            "type": "boolean"
          },
          "thirteenthSalaryMode": {
            "type": "string",
            "enum": [
              "accrue_monthly",
              "pay_in_december",
              "pay_monthly"
            ]
          },
          "workingHours": {
            "type": "number",
            "minimum": 0,
            "maximum": 168
          },
          "cctAssignment": {
            "type": "object",
            "properties": {
              "familyCode": {
                "type": "string",
                "minLength": 1
              },
              "classificationValues": {
                "type": "object",
                "additionalProperties": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    }
                  ]
                }
              },
              "status": {
                "type": "string",
                "enum": [
                  "complete",
                  "incomplete"
                ]
              }
            },
            "required": [
              "status"
            ],
            "nullable": true
          },
          "probationPeriod": {
            "type": "number",
            "minimum": 0,
            "nullable": true
          },
          "noticePeriod": {
            "type": "number",
            "minimum": 0,
            "nullable": true
          },
          "clauses": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      },
      "UpdateEmployeeContractStatusInput": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "submitted",
              "approved",
              "executed",
              "locked"
            ]
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "status"
        ]
      },
      "CreateLeaveRequestInput": {
        "type": "object",
        "properties": {
          "employeeId": {
            "type": "string",
            "minLength": 1
          },
          "leaveType": {
            "type": "string",
            "enum": [
              "vacation",
              "sick",
              "unpaid",
              "maternity",
              "paternity",
              "other"
            ]
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "format": "date-time"
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "employeeId",
          "leaveType",
          "startDate",
          "endDate"
        ]
      },
      "UpdateLeaveRequestStatusInput": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "submitted",
              "approved",
              "executed",
              "locked"
            ]
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "status"
        ]
      },
      "CreateTemplateRequest": {
        "type": "object",
        "properties": {
          "templateId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "type": {
            "type": "string",
            "enum": [
              "invoice",
              "quote",
              "contract",
              "payslip",
              "financials",
              "statement",
              "other"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "content": {
            "type": "string",
            "minLength": 1
          },
          "designVersion": {
            "type": "integer",
            "minimum": 1
          },
          "design": {
            "type": "object",
            "additionalProperties": {}
          },
          "variablesSchema": {
            "type": "object",
            "additionalProperties": {}
          },
          "validationMode": {
            "type": "string",
            "enum": [
              "strict",
              "permissive"
            ]
          },
          "capabilities": {
            "type": "object",
            "properties": {
              "supportsPdf": {
                "type": "boolean"
              },
              "supportsHtml": {
                "type": "boolean"
              },
              "supportsDocx": {
                "type": "boolean"
              },
              "supportsAsync": {
                "type": "boolean"
              }
            },
            "required": [
              "supportsPdf",
              "supportsHtml",
              "supportsDocx",
              "supportsAsync"
            ]
          },
          "mockData": {
            "type": "object",
            "additionalProperties": {}
          },
          "companyId": {
            "type": "string",
            "nullable": true
          },
          "isDefault": {
            "type": "boolean"
          },
          "locale": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "name",
          "content"
        ]
      },
      "UpdateTemplateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "content": {
            "type": "string",
            "minLength": 1
          },
          "designVersion": {
            "type": "integer",
            "minimum": 1
          },
          "design": {
            "type": "object",
            "additionalProperties": {}
          },
          "variablesSchema": {
            "type": "object",
            "additionalProperties": {}
          },
          "validationMode": {
            "type": "string",
            "enum": [
              "strict",
              "permissive"
            ]
          },
          "capabilities": {
            "type": "object",
            "properties": {
              "supportsPdf": {
                "type": "boolean"
              },
              "supportsHtml": {
                "type": "boolean"
              },
              "supportsDocx": {
                "type": "boolean"
              },
              "supportsAsync": {
                "type": "boolean"
              }
            },
            "required": [
              "supportsPdf",
              "supportsHtml",
              "supportsDocx",
              "supportsAsync"
            ]
          },
          "mockData": {
            "type": "object",
            "additionalProperties": {}
          },
          "isDefault": {
            "type": "boolean"
          },
          "locale": {
            "type": "string"
          }
        }
      },
      "GenerateDocumentRequest": {
        "type": "object",
        "properties": {
          "templateId": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "invoice",
              "quote",
              "contract",
              "payslip",
              "financials",
              "statement",
              "other"
            ]
          },
          "variables": {
            "type": "object",
            "additionalProperties": {}
          },
          "format": {
            "type": "string",
            "enum": [
              "pdf",
              "html",
              "docx"
            ]
          },
          "locale": {
            "type": "string"
          },
          "dryRun": {
            "type": "boolean"
          },
          "relatedEntityType": {
            "type": "string",
            "maxLength": 50
          },
          "relatedEntityId": {
            "type": "string"
          }
        },
        "required": [
          "variables"
        ]
      },
      "DryRunRequest": {
        "type": "object",
        "properties": {
          "templateId": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "invoice",
              "quote",
              "contract",
              "payslip",
              "financials",
              "statement",
              "other"
            ]
          },
          "variables": {
            "type": "object",
            "additionalProperties": {}
          },
          "format": {
            "type": "string",
            "enum": [
              "pdf",
              "html",
              "docx"
            ]
          },
          "locale": {
            "type": "string"
          },
          "dryRun": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "relatedEntityType": {
            "type": "string",
            "maxLength": 50
          },
          "relatedEntityId": {
            "type": "string"
          }
        },
        "required": [
          "variables",
          "dryRun"
        ]
      },
      "ExplainRequest": {
        "type": "object",
        "properties": {
          "templateId": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "invoice",
              "quote",
              "contract",
              "payslip",
              "financials",
              "statement",
              "other"
            ]
          },
          "variables": {
            "type": "object",
            "additionalProperties": {}
          },
          "format": {
            "type": "string",
            "enum": [
              "pdf",
              "html",
              "docx"
            ]
          },
          "locale": {
            "type": "string"
          }
        },
        "required": [
          "variables"
        ]
      },
      "CreateFixedAssetRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "category": {
            "type": "string",
            "enum": [
              "computer",
              "vehicle",
              "furniture",
              "building",
              "equipment",
              "other"
            ]
          },
          "acquisitionDate": {
            "type": "string",
            "format": "date-time"
          },
          "serviceDate": {
            "type": "string",
            "format": "date-time"
          },
          "acquisitionCost": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "currency": {
            "type": "string"
          },
          "depreciationMethod": {
            "type": "string",
            "enum": [
              "linear",
              "declining"
            ]
          },
          "depreciationPeriod": {
            "type": "integer",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "depreciationRate": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "residualValue": {
            "type": "number",
            "minimum": 0
          },
          "accountCode": {
            "type": "string",
            "minLength": 1,
            "pattern": "^\\d+(\\.\\d+)*$"
          },
          "depreciationAccountCode": {
            "type": "string",
            "minLength": 1,
            "pattern": "^\\d+(\\.\\d+)*$"
          },
          "depreciationExpenseAccountCode": {
            "type": "string",
            "minLength": 1,
            "pattern": "^\\d+(\\.\\d+)*$"
          }
        },
        "required": [
          "name",
          "category",
          "acquisitionDate",
          "serviceDate",
          "acquisitionCost",
          "currency",
          "depreciationMethod",
          "depreciationPeriod",
          "residualValue",
          "accountCode",
          "depreciationAccountCode",
          "depreciationExpenseAccountCode"
        ]
      },
      "UpdateFixedAssetRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "category": {
            "type": "string",
            "enum": [
              "computer",
              "vehicle",
              "furniture",
              "building",
              "equipment",
              "other"
            ]
          },
          "acquisitionDate": {
            "type": "string",
            "format": "date-time"
          },
          "serviceDate": {
            "type": "string",
            "format": "date-time"
          },
          "acquisitionCost": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "currency": {
            "type": "string"
          },
          "depreciationMethod": {
            "type": "string",
            "enum": [
              "linear",
              "declining"
            ]
          },
          "depreciationPeriod": {
            "type": "integer",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "depreciationRate": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "residualValue": {
            "type": "number",
            "minimum": 0
          },
          "accountCode": {
            "type": "string",
            "minLength": 1,
            "pattern": "^\\d+(\\.\\d+)*$"
          },
          "depreciationAccountCode": {
            "type": "string",
            "minLength": 1,
            "pattern": "^\\d+(\\.\\d+)*$"
          },
          "depreciationExpenseAccountCode": {
            "type": "string",
            "minLength": 1,
            "pattern": "^\\d+(\\.\\d+)*$"
          }
        }
      },
      "DisposeFixedAssetRequest": {
        "type": "object",
        "properties": {
          "disposalDate": {
            "type": "string",
            "format": "date-time"
          },
          "disposalAmount": {
            "type": "number",
            "minimum": 0
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "disposalDate"
        ]
      },
      "CalculateDepreciationRequest": {
        "type": "object",
        "properties": {
          "period": {
            "type": "string",
            "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
          },
          "method": {
            "type": "string",
            "enum": [
              "linear",
              "declining"
            ]
          }
        },
        "required": [
          "period"
        ]
      },
      "GenerateDepreciationEntryRequest": {
        "type": "object",
        "properties": {
          "period": {
            "type": "string",
            "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
          }
        },
        "required": [
          "period"
        ]
      },
      "CalculateTaxRequest": {
        "type": "object",
        "properties": {
          "amountExcludingTax": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "taxCode": {
            "type": "string"
          },
          "calculationDate": {
            "type": "string",
            "format": "date-time"
          },
          "countryCode": {
            "type": "string"
          }
        },
        "required": [
          "amountExcludingTax"
        ]
      },
      "CalculateVatAmountsRequest": {
        "type": "object",
        "properties": {
          "period": {
            "type": "string",
            "pattern": "^\\d{4}(?:-(\\d{2})|-Q(\\d)|-H([12]))?$"
          },
          "countryCode": {
            "type": "string"
          },
          "dateFrom": {
            "type": "string",
            "format": "date-time"
          },
          "dateTo": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "period"
        ]
      },
      "CreateTaxDeclarationRequest": {
        "type": "object",
        "properties": {
          "countryCode": {
            "type": "string"
          },
          "period": {
            "type": "string",
            "pattern": "^\\d{4}(?:-(\\d{2})|-Q(\\d)|-H([12]))?$"
          },
          "type": {
            "type": "string",
            "enum": [
              "vat",
              "estv",
              "corporate_income_tax",
              "capital_tax"
            ]
          },
          "correctionOfDeclarationId": {
            "type": "string"
          },
          "correctionReason": {
            "type": "string"
          }
        },
        "required": [
          "period",
          "type"
        ]
      },
      "ReconcileTransactionsRequest": {
        "type": "object",
        "properties": {
          "bankAccountId": {
            "type": "string",
            "minLength": 1
          },
          "period": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string",
                "format": "date-time"
              },
              "to": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "from",
              "to"
            ]
          },
          "autoMatch": {
            "type": "boolean"
          },
          "matches": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "transactionId": {
                  "type": "string",
                  "minLength": 1
                },
                "ledgerEntryId": {
                  "type": "string",
                  "minLength": 1
                },
                "matchType": {
                  "type": "string",
                  "enum": [
                    "automatic",
                    "manual"
                  ]
                },
                "matchScore": {
                  "type": "number"
                }
              },
              "required": [
                "transactionId",
                "ledgerEntryId",
                "matchType"
              ]
            }
          }
        },
        "required": [
          "bankAccountId",
          "period"
        ]
      },
      "CreateReconciliationRequest": {
        "type": "object",
        "properties": {
          "bankAccountId": {
            "type": "string",
            "minLength": 1
          },
          "reconciliationDate": {
            "type": "string",
            "format": "date-time"
          },
          "closingBalance": {
            "type": "number"
          },
          "notes": {
            "type": "string"
          }
        },
        "required": [
          "bankAccountId",
          "reconciliationDate",
          "closingBalance"
        ]
      },
      "CreateAccountingPolicyRuleRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "maxLength": 1000
          },
          "conditions": {
            "type": "object",
            "properties": {
              "productId": {
                "type": "string"
              },
              "productType": {
                "type": "string",
                "enum": [
                  "stockable",
                  "non_stockable",
                  "consumable"
                ]
              },
              "categoryId": {
                "type": "string"
              },
              "category": {
                "type": "string"
              },
              "transactionType": {
                "type": "string",
                "enum": [
                  "SALE",
                  "PURCHASE"
                ]
              },
              "vatRate": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "minAmount": {
                "type": "number",
                "minimum": 0
              },
              "maxAmount": {
                "type": "number",
                "minimum": 0
              }
            }
          },
          "resolution": {
            "type": "object",
            "properties": {
              "accountCode": {
                "type": "string",
                "minLength": 1
              },
              "reason": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "accountCode",
              "reason"
            ]
          },
          "isActive": {
            "type": "boolean"
          },
          "priority": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "version": {
            "type": "string",
            "minLength": 1,
            "maxLength": 50
          },
          "effectiveDate": {
            "type": "string",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "name",
          "conditions",
          "resolution"
        ]
      },
      "UpdateAccountingPolicyRuleRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "maxLength": 1000
          },
          "conditions": {
            "type": "object",
            "properties": {
              "productId": {
                "type": "string"
              },
              "productType": {
                "type": "string",
                "enum": [
                  "stockable",
                  "non_stockable",
                  "consumable"
                ]
              },
              "categoryId": {
                "type": "string"
              },
              "category": {
                "type": "string"
              },
              "transactionType": {
                "type": "string",
                "enum": [
                  "SALE",
                  "PURCHASE"
                ]
              },
              "vatRate": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "minAmount": {
                "type": "number",
                "minimum": 0
              },
              "maxAmount": {
                "type": "number",
                "minimum": 0
              }
            }
          },
          "resolution": {
            "type": "object",
            "properties": {
              "accountCode": {
                "type": "string",
                "minLength": 1
              },
              "reason": {
                "type": "string",
                "minLength": 1
              }
            }
          },
          "isActive": {
            "type": "boolean"
          },
          "priority": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "version": {
            "type": "string",
            "minLength": 1,
            "maxLength": 50
          },
          "effectiveDate": {
            "type": "string",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CreateReturnRequest": {
        "type": "object",
        "properties": {
          "returnNumber": {
            "type": "string"
          },
          "sourceType": {
            "type": "string",
            "enum": [
              "invoice",
              "order",
              "manual"
            ]
          },
          "sourceId": {
            "type": "string"
          },
          "customerId": {
            "type": "string"
          },
          "contactName": {
            "type": "string"
          },
          "contactEmail": {
            "type": "string",
            "format": "email"
          },
          "warehouseId": {
            "type": "string",
            "minLength": 1
          },
          "locationId": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "productId": {
                  "type": "string",
                  "minLength": 1
                },
                "quantity": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "unit": {
                  "type": "string",
                  "minLength": 1
                },
                "reason": {
                  "type": "string",
                  "enum": [
                    "defective",
                    "wrong_item",
                    "damaged",
                    "not_as_described",
                    "customer_request",
                    "other"
                  ]
                },
                "notes": {
                  "type": "string"
                },
                "batchNumber": {
                  "type": "string"
                },
                "serialNumber": {
                  "type": "string"
                },
                "expirationDate": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "productId",
                "quantity",
                "unit",
                "reason"
              ]
            }
          },
          "returnDate": {
            "type": "string",
            "format": "date-time"
          },
          "notes": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "sourceType",
          "warehouseId",
          "lines"
        ]
      },
      "UpdateReturnRequest": {
        "type": "object",
        "properties": {
          "contactName": {
            "type": "string"
          },
          "contactEmail": {
            "type": "string",
            "format": "email"
          },
          "warehouseId": {
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "productId": {
                  "type": "string",
                  "minLength": 1
                },
                "quantity": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "unit": {
                  "type": "string",
                  "minLength": 1
                },
                "reason": {
                  "type": "string",
                  "enum": [
                    "defective",
                    "wrong_item",
                    "damaged",
                    "not_as_described",
                    "customer_request",
                    "other"
                  ]
                },
                "notes": {
                  "type": "string"
                },
                "batchNumber": {
                  "type": "string"
                },
                "serialNumber": {
                  "type": "string"
                },
                "expirationDate": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "productId",
                "quantity",
                "unit",
                "reason"
              ]
            }
          },
          "returnDate": {
            "type": "string",
            "format": "date-time"
          },
          "notes": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "ReturnTransitionRequest": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "request",
              "approve",
              "receive",
              "restock",
              "cancel"
            ]
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "action"
        ]
      },
      "ReserveStockRequest": {
        "type": "object",
        "properties": {
          "productId": {
            "type": "string",
            "minLength": 1
          },
          "warehouseId": {
            "type": "string",
            "minLength": 1
          },
          "quantity": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "unit": {
            "type": "string",
            "minLength": 1
          },
          "sourceType": {
            "type": "string",
            "enum": [
              "invoice",
              "order",
              "purchase",
              "purchase_order",
              "transfer",
              "adjustment",
              "manual",
              "return"
            ]
          },
          "sourceId": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "notes": {
            "type": "string"
          }
        },
        "required": [
          "productId",
          "warehouseId",
          "quantity",
          "unit",
          "sourceType"
        ]
      },
      "CalculateCostRequest": {
        "type": "object",
        "properties": {
          "productId": {
            "type": "string",
            "minLength": 1
          },
          "warehouseId": {
            "type": "string",
            "minLength": 1
          },
          "quantity": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "method": {
            "type": "string",
            "enum": [
              "FIFO",
              "LIFO",
              "FEFO",
              "average",
              "standard"
            ]
          }
        },
        "required": [
          "productId",
          "warehouseId",
          "quantity"
        ]
      },
      "CreateBatchRequest": {
        "type": "object",
        "properties": {
          "productId": {
            "type": "string",
            "minLength": 1
          },
          "warehouseId": {
            "type": "string",
            "minLength": 1
          },
          "batchNumber": {
            "type": "string",
            "minLength": 1
          },
          "quantity": {
            "type": "number",
            "minimum": 0
          },
          "unit": {
            "type": "string",
            "minLength": 1
          },
          "unitCost": {
            "type": "number",
            "minimum": 0
          },
          "productionDate": {
            "type": "string",
            "format": "date-time"
          },
          "expirationDate": {
            "type": "string",
            "format": "date-time"
          },
          "supplierBatchNumber": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "sourceMovementId": {
            "type": "string"
          }
        },
        "required": [
          "productId",
          "warehouseId",
          "batchNumber",
          "quantity",
          "unit"
        ]
      },
      "CreatePayrollRunInput": {
        "type": "object",
        "properties": {
          "employeeId": {
            "type": "string",
            "minLength": 1
          },
          "periodStart": {
            "type": "string",
            "format": "date-time"
          },
          "periodEnd": {
            "type": "string",
            "format": "date-time"
          },
          "grossSalary": {
            "type": "number",
            "minimum": 0
          },
          "adjustments": {
            "type": "object",
            "properties": {
              "bonuses": {
                "type": "number",
                "minimum": 0
              },
              "deductions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "advance",
                        "loan",
                        "source_tax",
                        "health_insurance",
                        "other"
                      ]
                    },
                    "description": {
                      "type": "string",
                      "minLength": 1
                    },
                    "amount": {
                      "type": "number",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "type",
                    "description",
                    "amount"
                  ]
                }
              },
              "benefits": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "meal_vouchers",
                        "transport",
                        "other"
                      ]
                    },
                    "description": {
                      "type": "string",
                      "minLength": 1
                    },
                    "amount": {
                      "type": "number",
                      "minimum": 0
                    },
                    "taxable": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "description",
                    "amount",
                    "taxable"
                  ]
                }
              }
            }
          }
        },
        "required": [
          "employeeId",
          "periodStart",
          "periodEnd"
        ]
      },
      "UpdatePayrollRunStatusInput": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "submitted",
              "approved",
              "executed",
              "locked"
            ]
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "status"
        ]
      },
      "CreateSocialSecurityDeclarationInput": {
        "type": "object",
        "properties": {
          "declarationType": {
            "type": "string",
            "enum": [
              "AVS",
              "LPP",
              "unemployment",
              "health_insurance"
            ]
          },
          "period": {
            "type": "string",
            "pattern": "^\\d{4}(-\\d{2}|-Q[1-4]|)$"
          },
          "payrollRunIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "declarationType",
          "period"
        ]
      },
      "UpdateSocialSecurityDeclarationStatusInput": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "pending_approval",
              "generated",
              "approved",
              "validated",
              "submitted",
              "accepted",
              "rejected",
              "locked"
            ]
          },
          "rejectionReason": {
            "type": "string"
          }
        },
        "required": [
          "status"
        ]
      },
      "CreatePayrollCorrectionInput": {
        "type": "object",
        "properties": {
          "originalPayrollRunId": {
            "type": "string",
            "minLength": 1
          },
          "correctionType": {
            "type": "string",
            "enum": [
              "gross_salary",
              "contributions",
              "deductions",
              "benefits",
              "other"
            ]
          },
          "reason": {
            "type": "string",
            "minLength": 1
          },
          "adjustments": {
            "type": "object",
            "properties": {
              "grossSalary": {
                "type": "number"
              },
              "employerContributions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "amount": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "type",
                    "amount"
                  ]
                }
              },
              "employeeContributions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "amount": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "type",
                    "amount"
                  ]
                }
              },
              "deductions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "amount": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "type",
                    "amount"
                  ]
                }
              },
              "benefits": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "amount": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "type",
                    "amount"
                  ]
                }
              }
            }
          }
        },
        "required": [
          "originalPayrollRunId",
          "correctionType",
          "reason",
          "adjustments"
        ]
      },
      "CreatePayrollSimulationInput": {
        "type": "object",
        "properties": {
          "employeeId": {
            "type": "string",
            "minLength": 1
          },
          "periodStart": {
            "type": "string",
            "format": "date-time"
          },
          "periodEnd": {
            "type": "string",
            "format": "date-time"
          },
          "grossSalary": {
            "type": "number",
            "minimum": 0
          },
          "contributionOverrides": {
            "type": "object",
            "additionalProperties": {
              "type": "number"
            }
          },
          "deductionOverrides": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "amount": {
                  "type": "number"
                }
              },
              "required": [
                "type",
                "description",
                "amount"
              ]
            }
          },
          "benefitOverrides": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "amount": {
                  "type": "number"
                },
                "taxable": {
                  "type": "boolean"
                }
              },
              "required": [
                "type",
                "description",
                "amount",
                "taxable"
              ]
            }
          }
        },
        "required": [
          "employeeId",
          "periodStart",
          "periodEnd",
          "grossSalary"
        ]
      },
      "CreateHREventInput": {
        "type": "object",
        "properties": {
          "sourceEntityType": {
            "type": "string",
            "enum": [
              "payroll.run",
              "payroll.correction",
              "payroll_simulation",
              "social_security_declaration",
              "leave.request",
              "time_entry",
              "employee_contract",
              "employee",
              "attendance",
              "benefit",
              "performance_review",
              "recruitment",
              "onboarding",
              "offboarding"
            ]
          },
          "sourceEntityId": {
            "oneOf": [
              {
                "type": "string",
                "pattern": "^[0-9a-fA-F]{24}$"
              },
              {
                "type": "string"
              },
              {}
            ]
          },
          "eventType": {
            "type": "string",
            "enum": [
              "payroll_created",
              "payroll_executed",
              "payroll_corrected",
              "payslip_generated",
              "declaration_generated",
              "declaration_submitted",
              "declaration_accepted",
              "declaration_rejected",
              "declaration_accounting_generated",
              "declaration_banking_generated",
              "declaration_exported",
              "correction_created",
              "correction_executed",
              "simulation_created",
              "leave_requested",
              "leave_approved",
              "leave_executed",
              "leave_rejected",
              "time_entry_created",
              "time_entry_approved",
              "contract_created",
              "contract_executed",
              "contract_generated",
              "employee_hired",
              "employee_terminated",
              "attendance_recorded",
              "benefit_assigned",
              "performance_reviewed",
              "recruitment_started",
              "onboarding_started",
              "offboarding_started"
            ]
          },
          "eventData": {
            "type": "object",
            "additionalProperties": {}
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "sourceEntityType",
          "sourceEntityId",
          "eventType",
          "eventData"
        ]
      },
      "CreateHRConfigInput": {
        "type": "object",
        "properties": {
          "leave": {
            "type": "object",
            "properties": {
              "defaultVacationDays": {
                "type": "number",
                "minimum": 0,
                "maximum": 365
              },
              "allowNegativeBalance": {
                "type": "boolean"
              },
              "requireApproval": {
                "type": "boolean"
              },
              "autoApproveBelow": {
                "type": "number",
                "minimum": 0
              },
              "allowOverlapping": {
                "type": "boolean"
              },
              "maxConsecutiveDays": {
                "type": "number",
                "minimum": 1
              },
              "carryOverEnabled": {
                "type": "boolean"
              },
              "carryOverMaxDays": {
                "type": "number",
                "minimum": 0
              },
              "carryOverExpiryMonths": {
                "type": "number",
                "minimum": 0
              }
            },
            "required": [
              "defaultVacationDays",
              "allowNegativeBalance",
              "requireApproval",
              "autoApproveBelow",
              "allowOverlapping",
              "maxConsecutiveDays",
              "carryOverEnabled",
              "carryOverMaxDays",
              "carryOverExpiryMonths"
            ]
          },
          "timeTracking": {
            "type": "object",
            "properties": {
              "requireApproval": {
                "type": "boolean"
              },
              "autoApproveBelow": {
                "type": "number",
                "minimum": 0
              },
              "allowOvertime": {
                "type": "boolean"
              },
              "maxDailyHours": {
                "type": "number",
                "minimum": 1,
                "maximum": 24
              },
              "requireProject": {
                "type": "boolean"
              },
              "requireActivity": {
                "type": "boolean"
              },
              "roundingMode": {
                "type": "string",
                "enum": [
                  "NONE",
                  "QUARTER",
                  "HALF",
                  "HOUR"
                ]
              },
              "minEntryDuration": {
                "type": "number",
                "minimum": 0
              }
            },
            "required": [
              "requireApproval",
              "autoApproveBelow",
              "allowOvertime",
              "maxDailyHours",
              "requireProject",
              "requireActivity",
              "roundingMode",
              "minEntryDuration"
            ]
          },
          "attendance": {
            "type": "object",
            "properties": {
              "enableClockIn": {
                "type": "boolean"
              },
              "requireClockIn": {
                "type": "boolean"
              },
              "allowRemoteClockIn": {
                "type": "boolean"
              },
              "geofencingEnabled": {
                "type": "boolean"
              },
              "geofencingRadius": {
                "type": "number",
                "minimum": 0
              },
              "breakDuration": {
                "type": "number",
                "minimum": 0
              },
              "requireBreakAfter": {
                "type": "number",
                "minimum": 0
              },
              "maxConsecutiveHours": {
                "type": "number",
                "minimum": 1,
                "maximum": 24
              }
            },
            "required": [
              "enableClockIn",
              "requireClockIn",
              "allowRemoteClockIn",
              "geofencingEnabled",
              "geofencingRadius",
              "breakDuration",
              "requireBreakAfter",
              "maxConsecutiveHours"
            ]
          },
          "benefits": {
            "type": "object",
            "properties": {
              "enableBenefits": {
                "type": "boolean"
              },
              "allowCustomBenefits": {
                "type": "boolean"
              },
              "requireApproval": {
                "type": "boolean"
              },
              "taxableBenefits": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "nonTaxableBenefits": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "enableBenefits",
              "allowCustomBenefits",
              "requireApproval",
              "taxableBenefits",
              "nonTaxableBenefits"
            ]
          },
          "performance": {
            "type": "object",
            "properties": {
              "enableReviews": {
                "type": "boolean"
              },
              "reviewFrequency": {
                "type": "string",
                "enum": [
                  "annual",
                  "biannual",
                  "quarterly",
                  "monthly"
                ]
              },
              "requireSelfAssessment": {
                "type": "boolean"
              },
              "requireManagerAssessment": {
                "type": "boolean"
              },
              "allowPeerReview": {
                "type": "boolean"
              },
              "maxGoals": {
                "type": "number",
                "minimum": 0
              },
              "requireGoalApproval": {
                "type": "boolean"
              }
            },
            "required": [
              "enableReviews",
              "reviewFrequency",
              "requireSelfAssessment",
              "requireManagerAssessment",
              "allowPeerReview",
              "maxGoals",
              "requireGoalApproval"
            ]
          }
        },
        "required": [
          "leave",
          "timeTracking",
          "attendance",
          "benefits",
          "performance"
        ]
      },
      "UpdateHRConfigRequest": {
        "type": "object",
        "properties": {
          "leave": {
            "type": "object",
            "properties": {
              "defaultVacationDays": {
                "type": "number",
                "minimum": 0,
                "maximum": 365
              },
              "allowNegativeBalance": {
                "type": "boolean"
              },
              "requireApproval": {
                "type": "boolean"
              },
              "autoApproveBelow": {
                "type": "number",
                "minimum": 0
              },
              "allowOverlapping": {
                "type": "boolean"
              },
              "maxConsecutiveDays": {
                "type": "number",
                "minimum": 1
              },
              "carryOverEnabled": {
                "type": "boolean"
              },
              "carryOverMaxDays": {
                "type": "number",
                "minimum": 0
              },
              "carryOverExpiryMonths": {
                "type": "number",
                "minimum": 0
              }
            }
          },
          "timeTracking": {
            "type": "object",
            "properties": {
              "requireApproval": {
                "type": "boolean"
              },
              "autoApproveBelow": {
                "type": "number",
                "minimum": 0
              },
              "allowOvertime": {
                "type": "boolean"
              },
              "maxDailyHours": {
                "type": "number",
                "minimum": 1,
                "maximum": 24
              },
              "requireProject": {
                "type": "boolean"
              },
              "requireActivity": {
                "type": "boolean"
              },
              "roundingMode": {
                "type": "string",
                "enum": [
                  "NONE",
                  "QUARTER",
                  "HALF",
                  "HOUR"
                ]
              },
              "minEntryDuration": {
                "type": "number",
                "minimum": 0
              }
            }
          },
          "attendance": {
            "type": "object",
            "properties": {
              "enableClockIn": {
                "type": "boolean"
              },
              "requireClockIn": {
                "type": "boolean"
              },
              "allowRemoteClockIn": {
                "type": "boolean"
              },
              "geofencingEnabled": {
                "type": "boolean"
              },
              "geofencingRadius": {
                "type": "number",
                "minimum": 0
              },
              "breakDuration": {
                "type": "number",
                "minimum": 0
              },
              "requireBreakAfter": {
                "type": "number",
                "minimum": 0
              },
              "maxConsecutiveHours": {
                "type": "number",
                "minimum": 1,
                "maximum": 24
              }
            }
          },
          "benefits": {
            "type": "object",
            "properties": {
              "enableBenefits": {
                "type": "boolean"
              },
              "allowCustomBenefits": {
                "type": "boolean"
              },
              "requireApproval": {
                "type": "boolean"
              },
              "taxableBenefits": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "nonTaxableBenefits": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "performance": {
            "type": "object",
            "properties": {
              "enableReviews": {
                "type": "boolean"
              },
              "reviewFrequency": {
                "type": "string",
                "enum": [
                  "annual",
                  "biannual",
                  "quarterly",
                  "monthly"
                ]
              },
              "requireSelfAssessment": {
                "type": "boolean"
              },
              "requireManagerAssessment": {
                "type": "boolean"
              },
              "allowPeerReview": {
                "type": "boolean"
              },
              "maxGoals": {
                "type": "number",
                "minimum": 0
              },
              "requireGoalApproval": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "CreateTimeEntryInput": {
        "type": "object",
        "properties": {
          "employeeId": {
            "type": "string",
            "minLength": 1
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "startTime": {
            "type": "string",
            "format": "date-time"
          },
          "endTime": {
            "type": "string",
            "format": "date-time"
          },
          "projectId": {
            "type": "string",
            "minLength": 1
          },
          "activityId": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string"
          }
        },
        "required": [
          "employeeId",
          "date",
          "startTime",
          "endTime"
        ]
      },
      "UpdateTimeEntryInput": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "startTime": {
            "type": "string",
            "format": "date-time"
          },
          "endTime": {
            "type": "string",
            "format": "date-time"
          },
          "projectId": {
            "type": "string",
            "minLength": 1
          },
          "activityId": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string"
          }
        }
      },
      "UpdateTimeEntryStatusInput": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "submitted",
              "approved",
              "executed",
              "locked"
            ]
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "status"
        ]
      },
      "ReportParameters": {
        "type": "object",
        "properties": {
          "period": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string",
                "format": "date-time"
              },
              "to": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "from",
              "to"
            ]
          },
          "groupBy": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "filters": {
            "type": "object",
            "additionalProperties": {}
          },
          "currency": {
            "type": "string"
          },
          "locale": {
            "type": "string"
          },
          "columns": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "comparison": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "previous_period",
                  "previous_year",
                  "custom"
                ]
              },
              "period": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "to": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "from",
                  "to"
                ]
              }
            },
            "required": [
              "type"
            ]
          }
        }
      },
      "ProjectTimeEntryInput": {
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string",
            "minLength": 1
          },
          "taskId": {
            "type": "string"
          },
          "userId": {
            "type": "string",
            "minLength": 1
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "hours": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "description": {
            "type": "string"
          }
        },
        "required": [
          "projectId",
          "userId",
          "date",
          "hours"
        ]
      },
      "ProjectExpenseInput": {
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string",
            "minLength": 1
          },
          "userId": {
            "type": "string",
            "minLength": 1
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "amount": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "description": {
            "type": "string"
          },
          "category": {
            "type": "string"
          }
        },
        "required": [
          "projectId",
          "userId",
          "date",
          "amount"
        ]
      },
      "PayrollProcessingInput": {
        "type": "object",
        "properties": {
          "periodStart": {
            "type": "string",
            "format": "date-time"
          },
          "periodEnd": {
            "type": "string",
            "format": "date-time"
          },
          "companyId": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "periodStart",
          "periodEnd",
          "companyId"
        ]
      },
      "CreateApprovalRequest": {
        "type": "object",
        "properties": {
          "sourceType": {
            "type": "string",
            "enum": [
              "business_entity",
              "document"
            ]
          },
          "sourceId": {
            "type": "string",
            "minLength": 1
          },
          "entityType": {
            "type": "string",
            "minLength": 1,
            "maxLength": 50
          },
          "entityId": {
            "type": "string",
            "minLength": 1
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "maxLength": 1000
          },
          "assignedToUserId": {
            "type": "string"
          },
          "assignedToGroupId": {
            "type": "string"
          },
          "stages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "stageNumber": {
                  "type": "integer",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "sequential",
                    "parallel"
                  ]
                },
                "approvers": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "userId": {
                        "type": "string"
                      },
                      "groupId": {
                        "type": "string"
                      },
                      "role": {
                        "type": "string"
                      }
                    }
                  }
                },
                "requiredApprovals": {
                  "type": "integer",
                  "minimum": 0,
                  "exclusiveMinimum": true
                },
                "conditions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "field": {
                        "type": "string",
                        "minLength": 1
                      },
                      "operator": {
                        "type": "string",
                        "enum": [
                          "equals",
                          "greater_than",
                          "less_than",
                          "contains"
                        ]
                      },
                      "value": {}
                    },
                    "required": [
                      "field",
                      "operator",
                      "value"
                    ]
                  }
                }
              },
              "required": [
                "stageNumber",
                "type",
                "approvers"
              ]
            }
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "sourceType",
          "sourceId",
          "entityType",
          "entityId",
          "title",
          "stages"
        ]
      },
      "ListApprovalPoliciesQuery": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "active",
              "archived",
              "all"
            ]
          },
          "domain": {
            "type": "string",
            "enum": [
              "accounting",
              "sales",
              "purchases",
              "hr",
              "inventory",
              "communication"
            ]
          },
          "policyKind": {
            "type": "string",
            "enum": [
              "transition_gate",
              "creation_gate",
              "manual_instance",
              "document_action",
              "workflow_node",
              "workflow_action"
            ]
          },
          "entityType": {
            "type": "string",
            "minLength": 1
          },
          "triggerAction": {
            "type": "string",
            "minLength": 1
          },
          "q": {
            "type": "string"
          }
        }
      },
      "CreateApprovalPolicyRequest": {
        "type": "object",
        "properties": {
          "domain": {
            "type": "string",
            "enum": [
              "accounting",
              "sales",
              "purchases",
              "hr",
              "inventory",
              "communication"
            ]
          },
          "policyKind": {
            "type": "string",
            "enum": [
              "transition_gate",
              "creation_gate",
              "manual_instance",
              "document_action",
              "workflow_node",
              "workflow_action"
            ]
          },
          "entityType": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "triggerAction": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "archived"
            ]
          },
          "isDefault": {
            "type": "boolean"
          },
          "priority": {
            "type": "integer",
            "minimum": 0
          },
          "matching": {
            "type": "object",
            "properties": {
              "minAmount": {
                "type": "number",
                "minimum": 0
              },
              "maxAmount": {
                "type": "number",
                "minimum": 0
              },
              "currencies": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "countryCodes": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 3
                }
              },
              "countries": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 3
                }
              },
              "toolNames": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "modules": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "domains": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "kinds": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "forceApproval": {
                "type": "boolean"
              },
              "fieldConditions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "field": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "operator": {
                      "type": "string",
                      "enum": [
                        "equals",
                        "not_equals",
                        "in",
                        "not_in",
                        "gt",
                        "gte",
                        "lt",
                        "lte",
                        "contains",
                        "exists"
                      ]
                    },
                    "value": {}
                  },
                  "required": [
                    "field",
                    "operator"
                  ]
                }
              }
            }
          },
          "workflow": {
            "type": "object",
            "properties": {
              "stages": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "stageNumber": {
                      "type": "integer",
                      "minimum": 0,
                      "exclusiveMinimum": true
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "sequential",
                        "parallel"
                      ]
                    },
                    "approvers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "userId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "groupId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "role": {
                            "type": "string",
                            "minLength": 1
                          }
                        }
                      }
                    },
                    "requiredApprovals": {
                      "type": "integer",
                      "minimum": 0,
                      "exclusiveMinimum": true
                    }
                  },
                  "required": [
                    "stageNumber",
                    "type",
                    "approvers"
                  ]
                }
              }
            },
            "required": [
              "stages"
            ]
          },
          "presentation": {
            "type": "object",
            "properties": {
              "titleTemplate": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "descriptionTemplate": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1000
              },
              "defaultMetadata": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "required": [
          "domain",
          "policyKind",
          "entityType",
          "triggerAction",
          "workflow"
        ]
      },
      "UpdateApprovalPolicyRequest": {
        "type": "object",
        "properties": {
          "domain": {
            "type": "string",
            "enum": [
              "accounting",
              "sales",
              "purchases",
              "hr",
              "inventory",
              "communication"
            ]
          },
          "policyKind": {
            "type": "string",
            "enum": [
              "transition_gate",
              "creation_gate",
              "manual_instance",
              "document_action",
              "workflow_node",
              "workflow_action"
            ]
          },
          "entityType": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "triggerAction": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "archived"
            ]
          },
          "isDefault": {
            "type": "boolean"
          },
          "priority": {
            "type": "integer",
            "minimum": 0
          },
          "matching": {
            "type": "object",
            "properties": {
              "minAmount": {
                "type": "number",
                "minimum": 0
              },
              "maxAmount": {
                "type": "number",
                "minimum": 0
              },
              "currencies": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "countryCodes": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 3
                }
              },
              "countries": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 3
                }
              },
              "toolNames": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "modules": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "domains": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "kinds": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "forceApproval": {
                "type": "boolean"
              },
              "fieldConditions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "field": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "operator": {
                      "type": "string",
                      "enum": [
                        "equals",
                        "not_equals",
                        "in",
                        "not_in",
                        "gt",
                        "gte",
                        "lt",
                        "lte",
                        "contains",
                        "exists"
                      ]
                    },
                    "value": {}
                  },
                  "required": [
                    "field",
                    "operator"
                  ]
                }
              }
            }
          },
          "workflow": {
            "type": "object",
            "properties": {
              "stages": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "stageNumber": {
                      "type": "integer",
                      "minimum": 0,
                      "exclusiveMinimum": true
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "sequential",
                        "parallel"
                      ]
                    },
                    "approvers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "userId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "groupId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "role": {
                            "type": "string",
                            "minLength": 1
                          }
                        }
                      }
                    },
                    "requiredApprovals": {
                      "type": "integer",
                      "minimum": 0,
                      "exclusiveMinimum": true
                    }
                  },
                  "required": [
                    "stageNumber",
                    "type",
                    "approvers"
                  ]
                }
              }
            },
            "required": [
              "stages"
            ]
          },
          "presentation": {
            "type": "object",
            "properties": {
              "titleTemplate": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "descriptionTemplate": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1000
              },
              "defaultMetadata": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        }
      },
      "SimulateApprovalPolicyRequest": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number"
          },
          "amountInBaseCurrency": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "countryCode": {
            "type": "string",
            "minLength": 2,
            "maxLength": 3
          },
          "fields": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      },
      "ApprovalPoliciesListResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "domain": {
                  "type": "string",
                  "enum": [
                    "accounting",
                    "sales",
                    "purchases",
                    "hr",
                    "inventory",
                    "communication"
                  ]
                },
                "policyKind": {
                  "type": "string",
                  "enum": [
                    "transition_gate",
                    "creation_gate",
                    "manual_instance",
                    "document_action",
                    "workflow_node",
                    "workflow_action"
                  ]
                },
                "entityType": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "triggerAction": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "active",
                    "archived"
                  ]
                },
                "isDefault": {
                  "type": "boolean"
                },
                "priority": {
                  "type": "integer",
                  "minimum": 0
                },
                "matching": {
                  "type": "object",
                  "properties": {
                    "minAmount": {
                      "type": "number",
                      "minimum": 0
                    },
                    "maxAmount": {
                      "type": "number",
                      "minimum": 0
                    },
                    "currencies": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "countryCodes": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 3
                      }
                    },
                    "countries": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 3
                      }
                    },
                    "toolNames": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "modules": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "domains": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "kinds": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "forceApproval": {
                      "type": "boolean"
                    },
                    "fieldConditions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "operator": {
                            "type": "string",
                            "enum": [
                              "equals",
                              "not_equals",
                              "in",
                              "not_in",
                              "gt",
                              "gte",
                              "lt",
                              "lte",
                              "contains",
                              "exists"
                            ]
                          },
                          "value": {}
                        },
                        "required": [
                          "field",
                          "operator"
                        ]
                      }
                    }
                  }
                },
                "workflow": {
                  "type": "object",
                  "properties": {
                    "stages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "stageNumber": {
                            "type": "integer",
                            "minimum": 0,
                            "exclusiveMinimum": true
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "sequential",
                              "parallel"
                            ]
                          },
                          "approvers": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "userId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "groupId": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "role": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              }
                            }
                          },
                          "requiredApprovals": {
                            "type": "integer",
                            "minimum": 0,
                            "exclusiveMinimum": true
                          }
                        },
                        "required": [
                          "stageNumber",
                          "type",
                          "approvers"
                        ]
                      }
                    }
                  },
                  "required": [
                    "stages"
                  ]
                },
                "presentation": {
                  "type": "object",
                  "properties": {
                    "titleTemplate": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "descriptionTemplate": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000
                    },
                    "defaultMetadata": {
                      "type": "object",
                      "additionalProperties": {}
                    }
                  }
                },
                "origin": {
                  "type": "string",
                  "enum": [
                    "system",
                    "migrated",
                    "custom"
                  ]
                },
                "createdBy": {
                  "type": "string",
                  "minLength": 1
                },
                "updatedBy": {
                  "type": "string",
                  "minLength": 1
                },
                "createdAt": {
                  "type": "string",
                  "minLength": 1
                },
                "updatedAt": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "id",
                "domain",
                "policyKind",
                "entityType",
                "triggerAction",
                "status",
                "isDefault",
                "priority",
                "workflow",
                "origin",
                "createdBy",
                "updatedBy",
                "createdAt",
                "updatedAt"
              ]
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "ApprovalPolicyItemResponse": {
        "type": "object",
        "properties": {
          "item": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "domain": {
                "type": "string",
                "enum": [
                  "accounting",
                  "sales",
                  "purchases",
                  "hr",
                  "inventory",
                  "communication"
                ]
              },
              "policyKind": {
                "type": "string",
                "enum": [
                  "transition_gate",
                  "creation_gate",
                  "manual_instance",
                  "document_action",
                  "workflow_node",
                  "workflow_action"
                ]
              },
              "entityType": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "triggerAction": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "archived"
                ]
              },
              "isDefault": {
                "type": "boolean"
              },
              "priority": {
                "type": "integer",
                "minimum": 0
              },
              "matching": {
                "type": "object",
                "properties": {
                  "minAmount": {
                    "type": "number",
                    "minimum": 0
                  },
                  "maxAmount": {
                    "type": "number",
                    "minimum": 0
                  },
                  "currencies": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "countryCodes": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 2,
                      "maxLength": 3
                    }
                  },
                  "countries": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 2,
                      "maxLength": 3
                    }
                  },
                  "toolNames": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "modules": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "domains": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "kinds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "forceApproval": {
                    "type": "boolean"
                  },
                  "fieldConditions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "field": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "operator": {
                          "type": "string",
                          "enum": [
                            "equals",
                            "not_equals",
                            "in",
                            "not_in",
                            "gt",
                            "gte",
                            "lt",
                            "lte",
                            "contains",
                            "exists"
                          ]
                        },
                        "value": {}
                      },
                      "required": [
                        "field",
                        "operator"
                      ]
                    }
                  }
                }
              },
              "workflow": {
                "type": "object",
                "properties": {
                  "stages": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "stageNumber": {
                          "type": "integer",
                          "minimum": 0,
                          "exclusiveMinimum": true
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "sequential",
                            "parallel"
                          ]
                        },
                        "approvers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "userId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "groupId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "role": {
                                "type": "string",
                                "minLength": 1
                              }
                            }
                          }
                        },
                        "requiredApprovals": {
                          "type": "integer",
                          "minimum": 0,
                          "exclusiveMinimum": true
                        }
                      },
                      "required": [
                        "stageNumber",
                        "type",
                        "approvers"
                      ]
                    }
                  }
                },
                "required": [
                  "stages"
                ]
              },
              "presentation": {
                "type": "object",
                "properties": {
                  "titleTemplate": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "descriptionTemplate": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  "defaultMetadata": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                }
              },
              "origin": {
                "type": "string",
                "enum": [
                  "system",
                  "migrated",
                  "custom"
                ]
              },
              "createdBy": {
                "type": "string",
                "minLength": 1
              },
              "updatedBy": {
                "type": "string",
                "minLength": 1
              },
              "createdAt": {
                "type": "string",
                "minLength": 1
              },
              "updatedAt": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "id",
              "domain",
              "policyKind",
              "entityType",
              "triggerAction",
              "status",
              "isDefault",
              "priority",
              "workflow",
              "origin",
              "createdBy",
              "updatedBy",
              "createdAt",
              "updatedAt"
            ]
          }
        },
        "required": [
          "item"
        ]
      },
      "ApprovalPolicySimulationResponse": {
        "type": "object",
        "properties": {
          "matches": {
            "type": "boolean"
          },
          "policy": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "domain": {
                "type": "string",
                "enum": [
                  "accounting",
                  "sales",
                  "purchases",
                  "hr",
                  "inventory",
                  "communication"
                ]
              },
              "policyKind": {
                "type": "string",
                "enum": [
                  "transition_gate",
                  "creation_gate",
                  "manual_instance",
                  "document_action",
                  "workflow_node",
                  "workflow_action"
                ]
              },
              "entityType": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "triggerAction": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "archived"
                ]
              },
              "isDefault": {
                "type": "boolean"
              },
              "priority": {
                "type": "integer",
                "minimum": 0
              },
              "matching": {
                "type": "object",
                "properties": {
                  "minAmount": {
                    "type": "number",
                    "minimum": 0
                  },
                  "maxAmount": {
                    "type": "number",
                    "minimum": 0
                  },
                  "currencies": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "countryCodes": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 2,
                      "maxLength": 3
                    }
                  },
                  "countries": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 2,
                      "maxLength": 3
                    }
                  },
                  "toolNames": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "modules": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "domains": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "kinds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "forceApproval": {
                    "type": "boolean"
                  },
                  "fieldConditions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "field": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "operator": {
                          "type": "string",
                          "enum": [
                            "equals",
                            "not_equals",
                            "in",
                            "not_in",
                            "gt",
                            "gte",
                            "lt",
                            "lte",
                            "contains",
                            "exists"
                          ]
                        },
                        "value": {}
                      },
                      "required": [
                        "field",
                        "operator"
                      ]
                    }
                  }
                }
              },
              "workflow": {
                "type": "object",
                "properties": {
                  "stages": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "stageNumber": {
                          "type": "integer",
                          "minimum": 0,
                          "exclusiveMinimum": true
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "sequential",
                            "parallel"
                          ]
                        },
                        "approvers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "userId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "groupId": {
                                "type": "string",
                                "minLength": 1
                              },
                              "role": {
                                "type": "string",
                                "minLength": 1
                              }
                            }
                          }
                        },
                        "requiredApprovals": {
                          "type": "integer",
                          "minimum": 0,
                          "exclusiveMinimum": true
                        }
                      },
                      "required": [
                        "stageNumber",
                        "type",
                        "approvers"
                      ]
                    }
                  }
                },
                "required": [
                  "stages"
                ]
              },
              "presentation": {
                "type": "object",
                "properties": {
                  "titleTemplate": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "descriptionTemplate": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  "defaultMetadata": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                }
              },
              "origin": {
                "type": "string",
                "enum": [
                  "system",
                  "migrated",
                  "custom"
                ]
              },
              "createdBy": {
                "type": "string",
                "minLength": 1
              },
              "updatedBy": {
                "type": "string",
                "minLength": 1
              },
              "createdAt": {
                "type": "string",
                "minLength": 1
              },
              "updatedAt": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "id",
              "domain",
              "policyKind",
              "entityType",
              "triggerAction",
              "status",
              "isDefault",
              "priority",
              "workflow",
              "origin",
              "createdBy",
              "updatedBy",
              "createdAt",
              "updatedAt"
            ],
            "nullable": true
          }
        },
        "required": [
          "matches",
          "policy"
        ]
      },
      "CreateApprovalAutomationRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "maxLength": 1000
          },
          "enabled": {
            "type": "boolean"
          },
          "priority": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000
          },
          "conditions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string",
                  "minLength": 1
                },
                "operator": {
                  "type": "string",
                  "enum": [
                    "equals",
                    "not_equals",
                    "greater_than",
                    "less_than",
                    "greater_than_or_equal",
                    "less_than_or_equal",
                    "contains",
                    "not_contains",
                    "in",
                    "not_in"
                  ]
                },
                "value": {}
              },
              "required": [
                "field",
                "operator",
                "value"
              ]
            }
          },
          "actions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "auto_approve",
                    "auto_reject",
                    "assign_to_user",
                    "assign_to_group",
                    "set_sla_deadline",
                    "send_notification",
                    "create_task"
                  ]
                },
                "params": {
                  "type": "object",
                  "additionalProperties": {}
                }
              },
              "required": [
                "type"
              ]
            }
          },
          "entityTypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sourceTypes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "business_entity",
                "document"
              ]
            }
          }
        },
        "required": [
          "name",
          "conditions",
          "actions"
        ]
      },
      "UpdateApprovalAutomationRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "maxLength": 1000
          },
          "enabled": {
            "type": "boolean"
          },
          "priority": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000
          },
          "conditions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string",
                  "minLength": 1
                },
                "operator": {
                  "type": "string",
                  "enum": [
                    "equals",
                    "not_equals",
                    "greater_than",
                    "less_than",
                    "greater_than_or_equal",
                    "less_than_or_equal",
                    "contains",
                    "not_contains",
                    "in",
                    "not_in"
                  ]
                },
                "value": {}
              },
              "required": [
                "field",
                "operator",
                "value"
              ]
            }
          },
          "actions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "auto_approve",
                    "auto_reject",
                    "assign_to_user",
                    "assign_to_group",
                    "set_sla_deadline",
                    "send_notification",
                    "create_task"
                  ]
                },
                "params": {
                  "type": "object",
                  "additionalProperties": {}
                }
              },
              "required": [
                "type"
              ]
            }
          },
          "entityTypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sourceTypes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "business_entity",
                "document"
              ]
            }
          }
        }
      },
      "MetadataEntityTypeParam": {
        "type": "object",
        "properties": {
          "entityType": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          }
        },
        "required": [
          "entityType"
        ]
      },
      "MetadataEntityCustomFieldParam": {
        "type": "object",
        "properties": {
          "entityType": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "fieldId": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "entityType",
          "fieldId"
        ]
      },
      "MetadataResolveBody": {
        "type": "object",
        "properties": {
          "view": {
            "type": "string",
            "enum": [
              "list",
              "detail",
              "form",
              "picker",
              "search",
              "export"
            ]
          },
          "formMode": {
            "type": "string",
            "enum": [
              "create",
              "edit"
            ]
          },
          "pickerKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "locale": {
            "type": "string",
            "minLength": 2,
            "maxLength": 16
          },
          "includeCustomFields": {
            "type": "boolean"
          },
          "includeArchivedFields": {
            "type": "boolean"
          },
          "includeGovernanceDiagnostics": {
            "type": "boolean"
          }
        }
      },
      "MetadataResolveQuery": {
        "type": "object",
        "properties": {
          "view": {
            "type": "string",
            "enum": [
              "list",
              "detail",
              "form",
              "picker",
              "search",
              "export"
            ]
          },
          "formMode": {
            "type": "string",
            "enum": [
              "create",
              "edit"
            ]
          },
          "pickerKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "locale": {
            "type": "string",
            "minLength": 2,
            "maxLength": 16
          },
          "includeCustomFields": {
            "type": "boolean"
          },
          "includeArchivedFields": {
            "type": "boolean"
          },
          "includeGovernanceDiagnostics": {
            "type": "boolean"
          }
        }
      },
      "MetadataValidateBody": {
        "type": "object",
        "properties": {
          "operation": {
            "type": "string",
            "enum": [
              "create",
              "update",
              "action"
            ]
          },
          "payload": {
            "type": "object",
            "additionalProperties": {}
          },
          "metadataVersion": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          }
        },
        "required": [
          "payload"
        ]
      },
      "MetadataCustomFieldsQuery": {
        "type": "object",
        "properties": {
          "includeArchived": {
            "type": "boolean"
          },
          "tenantId": {
            "type": "string",
            "minLength": 1
          },
          "companyId": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "MetadataCreateCustomFieldBody": {
        "type": "object",
        "properties": {
          "scope": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "scopeType": {
                    "type": "string",
                    "enum": [
                      "tenant"
                    ]
                  },
                  "tenantId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "scopeType",
                  "tenantId"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "scopeType": {
                    "type": "string",
                    "enum": [
                      "company"
                    ]
                  },
                  "tenantId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "companyId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "scopeType",
                  "tenantId",
                  "companyId"
                ]
              }
            ]
          },
          "field": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "labelKey": {
                    "type": "string",
                    "minLength": 3,
                    "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                  },
                  "descriptionKey": {
                    "type": "string",
                    "minLength": 3,
                    "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                  },
                  "helpTextKey": {
                    "type": "string",
                    "minLength": 3,
                    "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                  },
                  "placeholderKey": {
                    "type": "string",
                    "minLength": 3,
                    "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                  },
                  "required": {
                    "type": "boolean"
                  },
                  "dataType": {
                    "type": "string",
                    "enum": [
                      "text",
                      "textarea",
                      "rich_text",
                      "number",
                      "currency",
                      "percentage",
                      "boolean",
                      "date",
                      "datetime",
                      "email",
                      "phone",
                      "url",
                      "iban",
                      "paymentReference",
                      "identifier",
                      "enum",
                      "multi_enum",
                      "relation",
                      "json"
                    ]
                  },
                  "visibilityPolicy": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "mode": {
                            "type": "string",
                            "enum": [
                              "visible"
                            ]
                          },
                          "whenPermission": {
                            "type": "string",
                            "minLength": 1
                          },
                          "whenModuleEnabled": {
                            "type": "string",
                            "minLength": 1
                          },
                          "whenConditionKey": {
                            "type": "string",
                            "minLength": 3,
                            "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                          }
                        },
                        "required": [
                          "mode"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "mode": {
                            "type": "string",
                            "enum": [
                              "hidden"
                            ]
                          },
                          "reasonKey": {
                            "type": "string",
                            "minLength": 3,
                            "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                          },
                          "whenPermission": {
                            "type": "string",
                            "minLength": 1
                          },
                          "whenConditionKey": {
                            "type": "string",
                            "minLength": 3,
                            "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                          }
                        },
                        "required": [
                          "mode"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "mode": {
                            "type": "string",
                            "enum": [
                              "masked"
                            ]
                          },
                          "reasonKey": {
                            "type": "string",
                            "minLength": 3,
                            "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                          },
                          "maskPattern": {
                            "type": "string",
                            "enum": [
                              "last4",
                              "email",
                              "phone",
                              "full"
                            ]
                          },
                          "whenPermission": {
                            "type": "string",
                            "minLength": 1
                          },
                          "whenConditionKey": {
                            "type": "string",
                            "minLength": 3,
                            "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                          }
                        },
                        "required": [
                          "mode"
                        ]
                      }
                    ]
                  },
                  "editPolicy": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "editable"
                        ]
                      },
                      "allowOnCreate": {
                        "type": "boolean"
                      },
                      "allowOnUpdate": {
                        "type": "boolean"
                      },
                      "reasonKeyWhenDenied": {
                        "type": "string",
                        "minLength": 3,
                        "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                      }
                    },
                    "required": [
                      "mode"
                    ]
                  },
                  "securityPolicy": {
                    "type": "object",
                    "properties": {
                      "pii": {
                        "type": "boolean"
                      },
                      "sensitive": {
                        "type": "boolean"
                      },
                      "encryptedAtRest": {
                        "type": "boolean"
                      },
                      "redactionStrategy": {
                        "type": "string",
                        "enum": [
                          "none",
                          "mask",
                          "hash",
                          "omit"
                        ]
                      },
                      "auditReadAccess": {
                        "type": "boolean"
                      }
                    }
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "scalar"
                    ]
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "plain",
                      "money",
                      "percent",
                      "date",
                      "datetime"
                    ]
                  }
                },
                "required": [
                  "key",
                  "labelKey",
                  "dataType",
                  "kind"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "labelKey": {
                    "type": "string",
                    "minLength": 3,
                    "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                  },
                  "descriptionKey": {
                    "type": "string",
                    "minLength": 3,
                    "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                  },
                  "helpTextKey": {
                    "type": "string",
                    "minLength": 3,
                    "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                  },
                  "placeholderKey": {
                    "type": "string",
                    "minLength": 3,
                    "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                  },
                  "required": {
                    "type": "boolean"
                  },
                  "dataType": {
                    "type": "string",
                    "enum": [
                      "text",
                      "textarea",
                      "rich_text",
                      "number",
                      "currency",
                      "percentage",
                      "boolean",
                      "date",
                      "datetime",
                      "email",
                      "phone",
                      "url",
                      "iban",
                      "paymentReference",
                      "identifier",
                      "enum",
                      "multi_enum",
                      "relation",
                      "json"
                    ]
                  },
                  "visibilityPolicy": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "mode": {
                            "type": "string",
                            "enum": [
                              "visible"
                            ]
                          },
                          "whenPermission": {
                            "type": "string",
                            "minLength": 1
                          },
                          "whenModuleEnabled": {
                            "type": "string",
                            "minLength": 1
                          },
                          "whenConditionKey": {
                            "type": "string",
                            "minLength": 3,
                            "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                          }
                        },
                        "required": [
                          "mode"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "mode": {
                            "type": "string",
                            "enum": [
                              "hidden"
                            ]
                          },
                          "reasonKey": {
                            "type": "string",
                            "minLength": 3,
                            "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                          },
                          "whenPermission": {
                            "type": "string",
                            "minLength": 1
                          },
                          "whenConditionKey": {
                            "type": "string",
                            "minLength": 3,
                            "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                          }
                        },
                        "required": [
                          "mode"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "mode": {
                            "type": "string",
                            "enum": [
                              "masked"
                            ]
                          },
                          "reasonKey": {
                            "type": "string",
                            "minLength": 3,
                            "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                          },
                          "maskPattern": {
                            "type": "string",
                            "enum": [
                              "last4",
                              "email",
                              "phone",
                              "full"
                            ]
                          },
                          "whenPermission": {
                            "type": "string",
                            "minLength": 1
                          },
                          "whenConditionKey": {
                            "type": "string",
                            "minLength": 3,
                            "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                          }
                        },
                        "required": [
                          "mode"
                        ]
                      }
                    ]
                  },
                  "editPolicy": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "editable"
                        ]
                      },
                      "allowOnCreate": {
                        "type": "boolean"
                      },
                      "allowOnUpdate": {
                        "type": "boolean"
                      },
                      "reasonKeyWhenDenied": {
                        "type": "string",
                        "minLength": 3,
                        "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                      }
                    },
                    "required": [
                      "mode"
                    ]
                  },
                  "securityPolicy": {
                    "type": "object",
                    "properties": {
                      "pii": {
                        "type": "boolean"
                      },
                      "sensitive": {
                        "type": "boolean"
                      },
                      "encryptedAtRest": {
                        "type": "boolean"
                      },
                      "redactionStrategy": {
                        "type": "string",
                        "enum": [
                          "none",
                          "mask",
                          "hash",
                          "omit"
                        ]
                      },
                      "auditReadAccess": {
                        "type": "boolean"
                      }
                    }
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "enum"
                    ]
                  },
                  "options": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "string",
                          "minLength": 1
                        },
                        "labelKey": {
                          "type": "string",
                          "minLength": 3,
                          "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                        }
                      },
                      "required": [
                        "value"
                      ]
                    }
                  }
                },
                "required": [
                  "key",
                  "labelKey",
                  "dataType",
                  "kind",
                  "options"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "labelKey": {
                    "type": "string",
                    "minLength": 3,
                    "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                  },
                  "descriptionKey": {
                    "type": "string",
                    "minLength": 3,
                    "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                  },
                  "helpTextKey": {
                    "type": "string",
                    "minLength": 3,
                    "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                  },
                  "placeholderKey": {
                    "type": "string",
                    "minLength": 3,
                    "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                  },
                  "required": {
                    "type": "boolean"
                  },
                  "dataType": {
                    "type": "string",
                    "enum": [
                      "text",
                      "textarea",
                      "rich_text",
                      "number",
                      "currency",
                      "percentage",
                      "boolean",
                      "date",
                      "datetime",
                      "email",
                      "phone",
                      "url",
                      "iban",
                      "paymentReference",
                      "identifier",
                      "enum",
                      "multi_enum",
                      "relation",
                      "json"
                    ]
                  },
                  "visibilityPolicy": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "mode": {
                            "type": "string",
                            "enum": [
                              "visible"
                            ]
                          },
                          "whenPermission": {
                            "type": "string",
                            "minLength": 1
                          },
                          "whenModuleEnabled": {
                            "type": "string",
                            "minLength": 1
                          },
                          "whenConditionKey": {
                            "type": "string",
                            "minLength": 3,
                            "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                          }
                        },
                        "required": [
                          "mode"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "mode": {
                            "type": "string",
                            "enum": [
                              "hidden"
                            ]
                          },
                          "reasonKey": {
                            "type": "string",
                            "minLength": 3,
                            "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                          },
                          "whenPermission": {
                            "type": "string",
                            "minLength": 1
                          },
                          "whenConditionKey": {
                            "type": "string",
                            "minLength": 3,
                            "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                          }
                        },
                        "required": [
                          "mode"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "mode": {
                            "type": "string",
                            "enum": [
                              "masked"
                            ]
                          },
                          "reasonKey": {
                            "type": "string",
                            "minLength": 3,
                            "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                          },
                          "maskPattern": {
                            "type": "string",
                            "enum": [
                              "last4",
                              "email",
                              "phone",
                              "full"
                            ]
                          },
                          "whenPermission": {
                            "type": "string",
                            "minLength": 1
                          },
                          "whenConditionKey": {
                            "type": "string",
                            "minLength": 3,
                            "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                          }
                        },
                        "required": [
                          "mode"
                        ]
                      }
                    ]
                  },
                  "editPolicy": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "editable"
                        ]
                      },
                      "allowOnCreate": {
                        "type": "boolean"
                      },
                      "allowOnUpdate": {
                        "type": "boolean"
                      },
                      "reasonKeyWhenDenied": {
                        "type": "string",
                        "minLength": 3,
                        "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                      }
                    },
                    "required": [
                      "mode"
                    ]
                  },
                  "securityPolicy": {
                    "type": "object",
                    "properties": {
                      "pii": {
                        "type": "boolean"
                      },
                      "sensitive": {
                        "type": "boolean"
                      },
                      "encryptedAtRest": {
                        "type": "boolean"
                      },
                      "redactionStrategy": {
                        "type": "string",
                        "enum": [
                          "none",
                          "mask",
                          "hash",
                          "omit"
                        ]
                      },
                      "auditReadAccess": {
                        "type": "boolean"
                      }
                    }
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "multi_enum"
                    ]
                  },
                  "options": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "string",
                          "minLength": 1
                        },
                        "labelKey": {
                          "type": "string",
                          "minLength": 3,
                          "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                        }
                      },
                      "required": [
                        "value"
                      ]
                    }
                  },
                  "maxSelections": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "required": [
                  "key",
                  "labelKey",
                  "dataType",
                  "kind",
                  "options"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "labelKey": {
                    "type": "string",
                    "minLength": 3,
                    "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                  },
                  "descriptionKey": {
                    "type": "string",
                    "minLength": 3,
                    "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                  },
                  "helpTextKey": {
                    "type": "string",
                    "minLength": 3,
                    "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                  },
                  "placeholderKey": {
                    "type": "string",
                    "minLength": 3,
                    "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                  },
                  "required": {
                    "type": "boolean"
                  },
                  "dataType": {
                    "type": "string",
                    "enum": [
                      "text",
                      "textarea",
                      "rich_text",
                      "number",
                      "currency",
                      "percentage",
                      "boolean",
                      "date",
                      "datetime",
                      "email",
                      "phone",
                      "url",
                      "iban",
                      "paymentReference",
                      "identifier",
                      "enum",
                      "multi_enum",
                      "relation",
                      "json"
                    ]
                  },
                  "visibilityPolicy": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "mode": {
                            "type": "string",
                            "enum": [
                              "visible"
                            ]
                          },
                          "whenPermission": {
                            "type": "string",
                            "minLength": 1
                          },
                          "whenModuleEnabled": {
                            "type": "string",
                            "minLength": 1
                          },
                          "whenConditionKey": {
                            "type": "string",
                            "minLength": 3,
                            "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                          }
                        },
                        "required": [
                          "mode"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "mode": {
                            "type": "string",
                            "enum": [
                              "hidden"
                            ]
                          },
                          "reasonKey": {
                            "type": "string",
                            "minLength": 3,
                            "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                          },
                          "whenPermission": {
                            "type": "string",
                            "minLength": 1
                          },
                          "whenConditionKey": {
                            "type": "string",
                            "minLength": 3,
                            "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                          }
                        },
                        "required": [
                          "mode"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "mode": {
                            "type": "string",
                            "enum": [
                              "masked"
                            ]
                          },
                          "reasonKey": {
                            "type": "string",
                            "minLength": 3,
                            "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                          },
                          "maskPattern": {
                            "type": "string",
                            "enum": [
                              "last4",
                              "email",
                              "phone",
                              "full"
                            ]
                          },
                          "whenPermission": {
                            "type": "string",
                            "minLength": 1
                          },
                          "whenConditionKey": {
                            "type": "string",
                            "minLength": 3,
                            "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                          }
                        },
                        "required": [
                          "mode"
                        ]
                      }
                    ]
                  },
                  "editPolicy": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "editable"
                        ]
                      },
                      "allowOnCreate": {
                        "type": "boolean"
                      },
                      "allowOnUpdate": {
                        "type": "boolean"
                      },
                      "reasonKeyWhenDenied": {
                        "type": "string",
                        "minLength": 3,
                        "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                      }
                    },
                    "required": [
                      "mode"
                    ]
                  },
                  "securityPolicy": {
                    "type": "object",
                    "properties": {
                      "pii": {
                        "type": "boolean"
                      },
                      "sensitive": {
                        "type": "boolean"
                      },
                      "encryptedAtRest": {
                        "type": "boolean"
                      },
                      "redactionStrategy": {
                        "type": "string",
                        "enum": [
                          "none",
                          "mask",
                          "hash",
                          "omit"
                        ]
                      },
                      "auditReadAccess": {
                        "type": "boolean"
                      }
                    }
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "relation"
                    ]
                  },
                  "relation": {
                    "type": "object",
                    "properties": {
                      "entityType": {
                        "type": "string",
                        "enum": [
                          "address",
                          "approvalPolicy",
                          "bankAccount",
                          "comment",
                          "company",
                          "customer_account",
                          "employee",
                          "group",
                          "invoice",
                          "journal",
                          "module",
                          "opportunity",
                          "order",
                          "organization",
                          "partner",
                          "person",
                          "productCategory",
                          "project",
                          "quote",
                          "tenant",
                          "user",
                          "warehouse"
                        ]
                      },
                      "relationType": {
                        "type": "string",
                        "enum": [
                          "one_to_one",
                          "one_to_many",
                          "many_to_one",
                          "many_to_many"
                        ]
                      },
                      "labelFieldKey": {
                        "type": "string",
                        "minLength": 1
                      },
                      "valueFieldKey": {
                        "type": "string",
                        "minLength": 1
                      },
                      "pickerKey": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "entityType",
                      "relationType"
                    ]
                  }
                },
                "required": [
                  "key",
                  "labelKey",
                  "dataType",
                  "kind",
                  "relation"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "labelKey": {
                    "type": "string",
                    "minLength": 3,
                    "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                  },
                  "descriptionKey": {
                    "type": "string",
                    "minLength": 3,
                    "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                  },
                  "helpTextKey": {
                    "type": "string",
                    "minLength": 3,
                    "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                  },
                  "placeholderKey": {
                    "type": "string",
                    "minLength": 3,
                    "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                  },
                  "required": {
                    "type": "boolean"
                  },
                  "dataType": {
                    "type": "string",
                    "enum": [
                      "text",
                      "textarea",
                      "rich_text",
                      "number",
                      "currency",
                      "percentage",
                      "boolean",
                      "date",
                      "datetime",
                      "email",
                      "phone",
                      "url",
                      "iban",
                      "paymentReference",
                      "identifier",
                      "enum",
                      "multi_enum",
                      "relation",
                      "json"
                    ]
                  },
                  "visibilityPolicy": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "mode": {
                            "type": "string",
                            "enum": [
                              "visible"
                            ]
                          },
                          "whenPermission": {
                            "type": "string",
                            "minLength": 1
                          },
                          "whenModuleEnabled": {
                            "type": "string",
                            "minLength": 1
                          },
                          "whenConditionKey": {
                            "type": "string",
                            "minLength": 3,
                            "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                          }
                        },
                        "required": [
                          "mode"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "mode": {
                            "type": "string",
                            "enum": [
                              "hidden"
                            ]
                          },
                          "reasonKey": {
                            "type": "string",
                            "minLength": 3,
                            "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                          },
                          "whenPermission": {
                            "type": "string",
                            "minLength": 1
                          },
                          "whenConditionKey": {
                            "type": "string",
                            "minLength": 3,
                            "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                          }
                        },
                        "required": [
                          "mode"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "mode": {
                            "type": "string",
                            "enum": [
                              "masked"
                            ]
                          },
                          "reasonKey": {
                            "type": "string",
                            "minLength": 3,
                            "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                          },
                          "maskPattern": {
                            "type": "string",
                            "enum": [
                              "last4",
                              "email",
                              "phone",
                              "full"
                            ]
                          },
                          "whenPermission": {
                            "type": "string",
                            "minLength": 1
                          },
                          "whenConditionKey": {
                            "type": "string",
                            "minLength": 3,
                            "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                          }
                        },
                        "required": [
                          "mode"
                        ]
                      }
                    ]
                  },
                  "editPolicy": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "editable"
                        ]
                      },
                      "allowOnCreate": {
                        "type": "boolean"
                      },
                      "allowOnUpdate": {
                        "type": "boolean"
                      },
                      "reasonKeyWhenDenied": {
                        "type": "string",
                        "minLength": 3,
                        "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                      }
                    },
                    "required": [
                      "mode"
                    ]
                  },
                  "securityPolicy": {
                    "type": "object",
                    "properties": {
                      "pii": {
                        "type": "boolean"
                      },
                      "sensitive": {
                        "type": "boolean"
                      },
                      "encryptedAtRest": {
                        "type": "boolean"
                      },
                      "redactionStrategy": {
                        "type": "string",
                        "enum": [
                          "none",
                          "mask",
                          "hash",
                          "omit"
                        ]
                      },
                      "auditReadAccess": {
                        "type": "boolean"
                      }
                    }
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "json"
                    ]
                  },
                  "schemaVersion": {
                    "type": "string",
                    "minLength": 1
                  },
                  "schemaRef": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "key",
                  "labelKey",
                  "dataType",
                  "kind"
                ]
              }
            ]
          },
          "capabilityPolicy": {
            "type": "object",
            "properties": {
              "searchable": {
                "type": "boolean"
              },
              "filterable": {
                "type": "boolean"
              },
              "sortable": {
                "type": "boolean"
              },
              "exportable": {
                "type": "boolean"
              },
              "embeddable": {
                "type": "boolean"
              },
              "facetable": {
                "type": "boolean"
              }
            }
          },
          "indexPolicy": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "strategy": {
                    "type": "string",
                    "enum": [
                      "none"
                    ]
                  },
                  "reasonKey": {
                    "type": "string",
                    "minLength": 3,
                    "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                  }
                },
                "required": [
                  "strategy"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "strategy": {
                    "type": "string",
                    "enum": [
                      "keyword"
                    ]
                  },
                  "indexName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "caseInsensitive": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "strategy"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "strategy": {
                    "type": "string",
                    "enum": [
                      "text"
                    ]
                  },
                  "indexName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "analyzer": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "strategy"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "strategy": {
                    "type": "string",
                    "enum": [
                      "date"
                    ]
                  },
                  "indexName": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "strategy"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "strategy": {
                    "type": "string",
                    "enum": [
                      "relation"
                    ]
                  },
                  "indexName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "relationEntityType": {
                    "type": "string",
                    "enum": [
                      "address",
                      "approvalPolicy",
                      "bankAccount",
                      "comment",
                      "company",
                      "customer_account",
                      "employee",
                      "group",
                      "invoice",
                      "journal",
                      "module",
                      "opportunity",
                      "order",
                      "organization",
                      "partner",
                      "person",
                      "productCategory",
                      "project",
                      "quote",
                      "tenant",
                      "user",
                      "warehouse"
                    ]
                  }
                },
                "required": [
                  "strategy",
                  "relationEntityType"
                ]
              }
            ]
          },
          "auditReasonKey": {
            "type": "string",
            "minLength": 3,
            "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
          }
        },
        "required": [
          "field"
        ]
      },
      "MetadataUpdateCustomFieldBody": {
        "type": "object",
        "properties": {
          "labelKey": {
            "type": "string",
            "minLength": 3,
            "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
          },
          "descriptionKey": {
            "type": "string",
            "minLength": 3,
            "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
          },
          "helpTextKey": {
            "type": "string",
            "minLength": 3,
            "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
          },
          "placeholderKey": {
            "type": "string",
            "minLength": 3,
            "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
          },
          "required": {
            "type": "boolean"
          },
          "pii": {
            "type": "boolean"
          },
          "sensitive": {
            "type": "boolean"
          },
          "defaultValue": {},
          "validationRules": {
            "type": "object",
            "additionalProperties": {}
          },
          "options": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "value": {
                  "type": "string",
                  "minLength": 1
                },
                "labelKey": {
                  "type": "string",
                  "minLength": 3,
                  "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                }
              },
              "required": [
                "value"
              ]
            }
          },
          "capabilityPolicy": {
            "type": "object",
            "properties": {
              "searchable": {
                "type": "boolean"
              },
              "filterable": {
                "type": "boolean"
              },
              "sortable": {
                "type": "boolean"
              },
              "exportable": {
                "type": "boolean"
              },
              "embeddable": {
                "type": "boolean"
              },
              "facetable": {
                "type": "boolean"
              }
            }
          },
          "indexPolicy": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "strategy": {
                    "type": "string",
                    "enum": [
                      "none"
                    ]
                  },
                  "reasonKey": {
                    "type": "string",
                    "minLength": 3,
                    "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                  }
                },
                "required": [
                  "strategy"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "strategy": {
                    "type": "string",
                    "enum": [
                      "keyword"
                    ]
                  },
                  "indexName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "caseInsensitive": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "strategy"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "strategy": {
                    "type": "string",
                    "enum": [
                      "text"
                    ]
                  },
                  "indexName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "analyzer": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "strategy"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "strategy": {
                    "type": "string",
                    "enum": [
                      "date"
                    ]
                  },
                  "indexName": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "strategy"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "strategy": {
                    "type": "string",
                    "enum": [
                      "relation"
                    ]
                  },
                  "indexName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "relationEntityType": {
                    "type": "string",
                    "enum": [
                      "address",
                      "approvalPolicy",
                      "bankAccount",
                      "comment",
                      "company",
                      "customer_account",
                      "employee",
                      "group",
                      "invoice",
                      "journal",
                      "module",
                      "opportunity",
                      "order",
                      "organization",
                      "partner",
                      "person",
                      "productCategory",
                      "project",
                      "quote",
                      "tenant",
                      "user",
                      "warehouse"
                    ]
                  }
                },
                "required": [
                  "strategy",
                  "relationEntityType"
                ]
              }
            ]
          },
          "visibilityPolicy": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "visible"
                    ]
                  },
                  "whenPermission": {
                    "type": "string",
                    "minLength": 1
                  },
                  "whenModuleEnabled": {
                    "type": "string",
                    "minLength": 1
                  },
                  "whenConditionKey": {
                    "type": "string",
                    "minLength": 3,
                    "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                  }
                },
                "required": [
                  "mode"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "hidden"
                    ]
                  },
                  "reasonKey": {
                    "type": "string",
                    "minLength": 3,
                    "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                  },
                  "whenPermission": {
                    "type": "string",
                    "minLength": 1
                  },
                  "whenConditionKey": {
                    "type": "string",
                    "minLength": 3,
                    "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                  }
                },
                "required": [
                  "mode"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "masked"
                    ]
                  },
                  "reasonKey": {
                    "type": "string",
                    "minLength": 3,
                    "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                  },
                  "maskPattern": {
                    "type": "string",
                    "enum": [
                      "last4",
                      "email",
                      "phone",
                      "full"
                    ]
                  },
                  "whenPermission": {
                    "type": "string",
                    "minLength": 1
                  },
                  "whenConditionKey": {
                    "type": "string",
                    "minLength": 3,
                    "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
                  }
                },
                "required": [
                  "mode"
                ]
              }
            ]
          },
          "editPolicy": {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "enum": [
                  "editable"
                ]
              },
              "allowOnCreate": {
                "type": "boolean"
              },
              "allowOnUpdate": {
                "type": "boolean"
              },
              "reasonKeyWhenDenied": {
                "type": "string",
                "minLength": 3,
                "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
              }
            },
            "required": [
              "mode"
            ]
          },
          "securityPolicy": {
            "type": "object",
            "properties": {
              "pii": {
                "type": "boolean"
              },
              "sensitive": {
                "type": "boolean"
              },
              "encryptedAtRest": {
                "type": "boolean"
              },
              "redactionStrategy": {
                "type": "string",
                "enum": [
                  "none",
                  "mask",
                  "hash",
                  "omit"
                ]
              },
              "auditReadAccess": {
                "type": "boolean"
              }
            }
          },
          "format": {
            "type": "string",
            "enum": [
              "plain",
              "money",
              "percent",
              "date",
              "datetime"
            ]
          },
          "maxSelections": {
            "type": "integer",
            "minimum": 1
          },
          "relation": {
            "type": "object",
            "properties": {
              "entityType": {
                "type": "string",
                "minLength": 1
              },
              "relationType": {
                "type": "string",
                "enum": [
                  "one_to_one",
                  "one_to_many",
                  "many_to_one",
                  "many_to_many"
                ]
              },
              "labelFieldKey": {
                "type": "string",
                "minLength": 1
              },
              "valueFieldKey": {
                "type": "string",
                "minLength": 1
              },
              "pickerKey": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "entityType",
              "relationType"
            ]
          },
          "schemaVersion": {
            "type": "string",
            "minLength": 1
          },
          "schemaRef": {
            "type": "string",
            "minLength": 1
          },
          "auditReasonKey": {
            "type": "string",
            "minLength": 3,
            "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
          },
          "key": {
            "type": "string",
            "minLength": 1
          },
          "entityType": {
            "type": "string",
            "minLength": 1
          },
          "type": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "MetadataArchiveCustomFieldBody": {
        "type": "object",
        "properties": {
          "archiveReasonKey": {
            "type": "string",
            "minLength": 3,
            "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$"
          }
        }
      },
      "CreateDemoModuleRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "name"
        ]
      },
      "UpdateDemoModuleRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "BulkDeleteRequest": {
        "type": "object",
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          }
        },
        "required": [
          "ids"
        ]
      },
      "BulkUpdateStatusRequest": {
        "type": "object",
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "status": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "ids",
          "status"
        ]
      },
      "CountryComplianceConfig": {
        "type": "object",
        "additionalProperties": {}
      },
      "ReportData": {
        "type": "object",
        "additionalProperties": {}
      },
      "SNSMessage": {
        "type": "object",
        "additionalProperties": {}
      },
      "ListQueryPageInfo": {
        "type": "object",
        "required": [
          "page",
          "limit",
          "total",
          "totalPages",
          "hasNext",
          "hasPrev"
        ],
        "properties": {
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "limit": {
            "type": "integer",
            "minimum": 1
          },
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "totalPages": {
            "type": "integer",
            "minimum": 0
          },
          "hasNext": {
            "type": "boolean"
          },
          "hasPrev": {
            "type": "boolean"
          }
        }
      },
      "ListQueryColumnDefinition": {
        "type": "object",
        "required": [
          "fieldId",
          "labelKey",
          "sortable",
          "filterable"
        ],
        "properties": {
          "fieldId": {
            "type": "string"
          },
          "labelKey": {
            "type": "string"
          },
          "sortable": {
            "type": "boolean"
          },
          "filterable": {
            "type": "boolean"
          }
        }
      },
      "ListQueryFilterDefinition": {
        "type": "object",
        "required": [
          "fieldId",
          "operators"
        ],
        "properties": {
          "fieldId": {
            "type": "string"
          },
          "operators": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ListQueryActionDefinition": {
        "type": "object",
        "required": [
          "actionId",
          "labelKey"
        ],
        "properties": {
          "actionId": {
            "type": "string"
          },
          "labelKey": {
            "type": "string"
          },
          "requiresSelection": {
            "type": "boolean"
          }
        }
      },
      "ListQueryPolicyMetadata": {
        "type": "object",
        "required": [
          "contractVersion",
          "policyVersion",
          "entityType",
          "context",
          "columns",
          "filters",
          "actions"
        ],
        "properties": {
          "contractVersion": {
            "type": "string",
            "example": "1.0"
          },
          "policyVersion": {
            "type": "string"
          },
          "entityType": {
            "type": "string"
          },
          "context": {
            "type": "string",
            "enum": [
              "managementList",
              "operationalList",
              "referencePicker",
              "auditHistory"
            ]
          },
          "columns": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "fieldId",
                "labelKey",
                "sortable",
                "filterable"
              ],
              "properties": {
                "fieldId": {
                  "type": "string"
                },
                "labelKey": {
                  "type": "string"
                },
                "sortable": {
                  "type": "boolean"
                },
                "filterable": {
                  "type": "boolean"
                }
              }
            }
          },
          "filters": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "fieldId",
                "operators"
              ],
              "properties": {
                "fieldId": {
                  "type": "string"
                },
                "operators": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "actions": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "actionId",
                "labelKey"
              ],
              "properties": {
                "actionId": {
                  "type": "string"
                },
                "labelKey": {
                  "type": "string"
                },
                "requiresSelection": {
                  "type": "boolean"
                }
              }
            }
          }
        }
      },
      "ListInvoiceItem": {
        "type": "object",
        "required": [
          "id",
          "status",
          "amount",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "invoiceNumber": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "sent",
              "paid",
              "cancelled"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "invoice",
              "credit_note"
            ]
          },
          "title": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "invoiceDate": {
            "type": "string",
            "format": "date-time"
          },
          "dueDate": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": true
      },
      "ListOrderItem": {
        "type": "object",
        "required": [
          "id",
          "status",
          "amount",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "orderNumber": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "pending",
              "confirmed",
              "in_progress",
              "shipped",
              "delivered",
              "cancelled"
            ]
          },
          "title": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "orderDate": {
            "type": "string",
            "format": "date-time"
          },
          "deliveryDate": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": true
      },
      "ListQuoteItem": {
        "type": "object",
        "required": [
          "id",
          "status",
          "amount",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "quoteNumber": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "sent",
              "accepted",
              "rejected",
              "cancelled",
              "expired",
              "converted"
            ]
          },
          "description": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "validUntil": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": true
      },
      "ListInvoicesResponse": {
        "type": "object",
        "required": [
          "contractVersion",
          "policyVersion",
          "entityType",
          "context",
          "items",
          "pageInfo",
          "metadata"
        ],
        "properties": {
          "contractVersion": {
            "type": "string",
            "example": "1.0"
          },
          "policyVersion": {
            "type": "string"
          },
          "entityType": {
            "type": "string",
            "enum": [
              "sales.invoice"
            ]
          },
          "context": {
            "type": "string",
            "enum": [
              "managementList",
              "operationalList",
              "referencePicker",
              "auditHistory"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "status",
                "amount",
                "createdAt",
                "updatedAt"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "invoiceNumber": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "draft",
                    "sent",
                    "paid",
                    "cancelled"
                  ]
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "invoice",
                    "credit_note"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "amount": {
                  "type": "number"
                },
                "invoiceDate": {
                  "type": "string",
                  "format": "date-time"
                },
                "dueDate": {
                  "type": "string",
                  "format": "date-time"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "additionalProperties": true
            }
          },
          "pageInfo": {
            "type": "object",
            "required": [
              "page",
              "limit",
              "total",
              "totalPages",
              "hasNext",
              "hasPrev"
            ],
            "properties": {
              "page": {
                "type": "integer",
                "minimum": 1
              },
              "limit": {
                "type": "integer",
                "minimum": 1
              },
              "offset": {
                "type": "integer",
                "minimum": 0
              },
              "total": {
                "type": "integer",
                "minimum": 0
              },
              "totalPages": {
                "type": "integer",
                "minimum": 0
              },
              "hasNext": {
                "type": "boolean"
              },
              "hasPrev": {
                "type": "boolean"
              }
            }
          },
          "metadata": {
            "type": "object",
            "required": [
              "contractVersion",
              "policyVersion",
              "entityType",
              "context",
              "columns",
              "filters",
              "actions"
            ],
            "properties": {
              "contractVersion": {
                "type": "string",
                "example": "1.0"
              },
              "policyVersion": {
                "type": "string"
              },
              "entityType": {
                "type": "string"
              },
              "context": {
                "type": "string",
                "enum": [
                  "managementList",
                  "operationalList",
                  "referencePicker",
                  "auditHistory"
                ]
              },
              "columns": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "fieldId",
                    "labelKey",
                    "sortable",
                    "filterable"
                  ],
                  "properties": {
                    "fieldId": {
                      "type": "string"
                    },
                    "labelKey": {
                      "type": "string"
                    },
                    "sortable": {
                      "type": "boolean"
                    },
                    "filterable": {
                      "type": "boolean"
                    }
                  }
                }
              },
              "filters": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "fieldId",
                    "operators"
                  ],
                  "properties": {
                    "fieldId": {
                      "type": "string"
                    },
                    "operators": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "actionId",
                    "labelKey"
                  ],
                  "properties": {
                    "actionId": {
                      "type": "string"
                    },
                    "labelKey": {
                      "type": "string"
                    },
                    "requiresSelection": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ListOrdersResponse": {
        "type": "object",
        "required": [
          "contractVersion",
          "policyVersion",
          "entityType",
          "context",
          "items",
          "pageInfo",
          "metadata"
        ],
        "properties": {
          "contractVersion": {
            "type": "string",
            "example": "1.0"
          },
          "policyVersion": {
            "type": "string"
          },
          "entityType": {
            "type": "string",
            "enum": [
              "sales.order"
            ]
          },
          "context": {
            "type": "string",
            "enum": [
              "managementList",
              "operationalList",
              "referencePicker",
              "auditHistory"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "status",
                "amount",
                "createdAt",
                "updatedAt"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "orderNumber": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "draft",
                    "pending",
                    "confirmed",
                    "in_progress",
                    "shipped",
                    "delivered",
                    "cancelled"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "amount": {
                  "type": "number"
                },
                "orderDate": {
                  "type": "string",
                  "format": "date-time"
                },
                "deliveryDate": {
                  "type": "string",
                  "format": "date-time"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "additionalProperties": true
            }
          },
          "pageInfo": {
            "type": "object",
            "required": [
              "page",
              "limit",
              "total",
              "totalPages",
              "hasNext",
              "hasPrev"
            ],
            "properties": {
              "page": {
                "type": "integer",
                "minimum": 1
              },
              "limit": {
                "type": "integer",
                "minimum": 1
              },
              "offset": {
                "type": "integer",
                "minimum": 0
              },
              "total": {
                "type": "integer",
                "minimum": 0
              },
              "totalPages": {
                "type": "integer",
                "minimum": 0
              },
              "hasNext": {
                "type": "boolean"
              },
              "hasPrev": {
                "type": "boolean"
              }
            }
          },
          "metadata": {
            "type": "object",
            "required": [
              "contractVersion",
              "policyVersion",
              "entityType",
              "context",
              "columns",
              "filters",
              "actions"
            ],
            "properties": {
              "contractVersion": {
                "type": "string",
                "example": "1.0"
              },
              "policyVersion": {
                "type": "string"
              },
              "entityType": {
                "type": "string"
              },
              "context": {
                "type": "string",
                "enum": [
                  "managementList",
                  "operationalList",
                  "referencePicker",
                  "auditHistory"
                ]
              },
              "columns": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "fieldId",
                    "labelKey",
                    "sortable",
                    "filterable"
                  ],
                  "properties": {
                    "fieldId": {
                      "type": "string"
                    },
                    "labelKey": {
                      "type": "string"
                    },
                    "sortable": {
                      "type": "boolean"
                    },
                    "filterable": {
                      "type": "boolean"
                    }
                  }
                }
              },
              "filters": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "fieldId",
                    "operators"
                  ],
                  "properties": {
                    "fieldId": {
                      "type": "string"
                    },
                    "operators": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "actionId",
                    "labelKey"
                  ],
                  "properties": {
                    "actionId": {
                      "type": "string"
                    },
                    "labelKey": {
                      "type": "string"
                    },
                    "requiresSelection": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ListQuotesResponse": {
        "type": "object",
        "required": [
          "contractVersion",
          "policyVersion",
          "entityType",
          "context",
          "items",
          "pageInfo",
          "metadata"
        ],
        "properties": {
          "contractVersion": {
            "type": "string",
            "example": "1.0"
          },
          "policyVersion": {
            "type": "string"
          },
          "entityType": {
            "type": "string",
            "enum": [
              "sales.quote"
            ]
          },
          "context": {
            "type": "string",
            "enum": [
              "managementList",
              "operationalList",
              "referencePicker",
              "auditHistory"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "status",
                "amount",
                "createdAt",
                "updatedAt"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "quoteNumber": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "draft",
                    "sent",
                    "accepted",
                    "rejected",
                    "cancelled",
                    "expired",
                    "converted"
                  ]
                },
                "description": {
                  "type": "string"
                },
                "amount": {
                  "type": "number"
                },
                "validUntil": {
                  "type": "string",
                  "format": "date-time"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "additionalProperties": true
            }
          },
          "pageInfo": {
            "type": "object",
            "required": [
              "page",
              "limit",
              "total",
              "totalPages",
              "hasNext",
              "hasPrev"
            ],
            "properties": {
              "page": {
                "type": "integer",
                "minimum": 1
              },
              "limit": {
                "type": "integer",
                "minimum": 1
              },
              "offset": {
                "type": "integer",
                "minimum": 0
              },
              "total": {
                "type": "integer",
                "minimum": 0
              },
              "totalPages": {
                "type": "integer",
                "minimum": 0
              },
              "hasNext": {
                "type": "boolean"
              },
              "hasPrev": {
                "type": "boolean"
              }
            }
          },
          "metadata": {
            "type": "object",
            "required": [
              "contractVersion",
              "policyVersion",
              "entityType",
              "context",
              "columns",
              "filters",
              "actions"
            ],
            "properties": {
              "contractVersion": {
                "type": "string",
                "example": "1.0"
              },
              "policyVersion": {
                "type": "string"
              },
              "entityType": {
                "type": "string"
              },
              "context": {
                "type": "string",
                "enum": [
                  "managementList",
                  "operationalList",
                  "referencePicker",
                  "auditHistory"
                ]
              },
              "columns": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "fieldId",
                    "labelKey",
                    "sortable",
                    "filterable"
                  ],
                  "properties": {
                    "fieldId": {
                      "type": "string"
                    },
                    "labelKey": {
                      "type": "string"
                    },
                    "sortable": {
                      "type": "boolean"
                    },
                    "filterable": {
                      "type": "boolean"
                    }
                  }
                }
              },
              "filters": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "fieldId",
                    "operators"
                  ],
                  "properties": {
                    "fieldId": {
                      "type": "string"
                    },
                    "operators": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "actionId",
                    "labelKey"
                  ],
                  "properties": {
                    "actionId": {
                      "type": "string"
                    },
                    "labelKey": {
                      "type": "string"
                    },
                    "requiresSelection": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ListBillItem": {
        "type": "object",
        "required": [
          "id",
          "status",
          "amountInclTax",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "billNumber": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "pending_approval",
              "approved",
              "posted",
              "partially_paid",
              "paid",
              "reversed",
              "cancelled"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "invoice",
              "credit_note"
            ]
          },
          "vendorName": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "amountInclTax": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "dueDate": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": true
      },
      "ListBillsResponse": {
        "type": "object",
        "required": [
          "contractVersion",
          "policyVersion",
          "entityType",
          "context",
          "items",
          "pageInfo",
          "metadata"
        ],
        "properties": {
          "contractVersion": {
            "type": "string",
            "example": "1.0"
          },
          "policyVersion": {
            "type": "string"
          },
          "entityType": {
            "type": "string",
            "enum": [
              "purchases.bill"
            ]
          },
          "context": {
            "type": "string",
            "enum": [
              "managementList",
              "operationalList",
              "referencePicker",
              "auditHistory"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "status",
                "amountInclTax",
                "createdAt",
                "updatedAt"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "billNumber": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "draft",
                    "pending_approval",
                    "approved",
                    "posted",
                    "partially_paid",
                    "paid",
                    "reversed",
                    "cancelled"
                  ]
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "invoice",
                    "credit_note"
                  ]
                },
                "vendorName": {
                  "type": "string"
                },
                "amount": {
                  "type": "number"
                },
                "amountInclTax": {
                  "type": "number"
                },
                "currency": {
                  "type": "string"
                },
                "date": {
                  "type": "string",
                  "format": "date-time"
                },
                "dueDate": {
                  "type": "string",
                  "format": "date-time"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "additionalProperties": true
            }
          },
          "pageInfo": {
            "type": "object",
            "required": [
              "page",
              "limit",
              "total",
              "totalPages",
              "hasNext",
              "hasPrev"
            ],
            "properties": {
              "page": {
                "type": "integer",
                "minimum": 1
              },
              "limit": {
                "type": "integer",
                "minimum": 1
              },
              "offset": {
                "type": "integer",
                "minimum": 0
              },
              "total": {
                "type": "integer",
                "minimum": 0
              },
              "totalPages": {
                "type": "integer",
                "minimum": 0
              },
              "hasNext": {
                "type": "boolean"
              },
              "hasPrev": {
                "type": "boolean"
              }
            }
          },
          "metadata": {
            "type": "object",
            "required": [
              "contractVersion",
              "policyVersion",
              "entityType",
              "context",
              "columns",
              "filters",
              "actions"
            ],
            "properties": {
              "contractVersion": {
                "type": "string",
                "example": "1.0"
              },
              "policyVersion": {
                "type": "string"
              },
              "entityType": {
                "type": "string"
              },
              "context": {
                "type": "string",
                "enum": [
                  "managementList",
                  "operationalList",
                  "referencePicker",
                  "auditHistory"
                ]
              },
              "columns": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "fieldId",
                    "labelKey",
                    "sortable",
                    "filterable"
                  ],
                  "properties": {
                    "fieldId": {
                      "type": "string"
                    },
                    "labelKey": {
                      "type": "string"
                    },
                    "sortable": {
                      "type": "boolean"
                    },
                    "filterable": {
                      "type": "boolean"
                    }
                  }
                }
              },
              "filters": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "fieldId",
                    "operators"
                  ],
                  "properties": {
                    "fieldId": {
                      "type": "string"
                    },
                    "operators": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "actionId",
                    "labelKey"
                  ],
                  "properties": {
                    "actionId": {
                      "type": "string"
                    },
                    "labelKey": {
                      "type": "string"
                    },
                    "requiresSelection": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ListExpenseItem": {
        "type": "object",
        "required": [
          "id",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": true
      },
      "ListExpensesResponse": {
        "type": "object",
        "required": [
          "contractVersion",
          "policyVersion",
          "entityType",
          "context",
          "items",
          "pageInfo",
          "metadata"
        ],
        "properties": {
          "contractVersion": {
            "type": "string",
            "example": "1.0"
          },
          "policyVersion": {
            "type": "string"
          },
          "entityType": {
            "type": "string",
            "enum": [
              "purchases.expense"
            ]
          },
          "context": {
            "type": "string",
            "enum": [
              "managementList",
              "operationalList",
              "referencePicker",
              "auditHistory"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "createdAt",
                "updatedAt"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "additionalProperties": true
            }
          },
          "pageInfo": {
            "type": "object",
            "required": [
              "page",
              "limit",
              "total",
              "totalPages",
              "hasNext",
              "hasPrev"
            ],
            "properties": {
              "page": {
                "type": "integer",
                "minimum": 1
              },
              "limit": {
                "type": "integer",
                "minimum": 1
              },
              "offset": {
                "type": "integer",
                "minimum": 0
              },
              "total": {
                "type": "integer",
                "minimum": 0
              },
              "totalPages": {
                "type": "integer",
                "minimum": 0
              },
              "hasNext": {
                "type": "boolean"
              },
              "hasPrev": {
                "type": "boolean"
              }
            }
          },
          "metadata": {
            "type": "object",
            "required": [
              "contractVersion",
              "policyVersion",
              "entityType",
              "context",
              "columns",
              "filters",
              "actions"
            ],
            "properties": {
              "contractVersion": {
                "type": "string",
                "example": "1.0"
              },
              "policyVersion": {
                "type": "string"
              },
              "entityType": {
                "type": "string"
              },
              "context": {
                "type": "string",
                "enum": [
                  "managementList",
                  "operationalList",
                  "referencePicker",
                  "auditHistory"
                ]
              },
              "columns": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "fieldId",
                    "labelKey",
                    "sortable",
                    "filterable"
                  ],
                  "properties": {
                    "fieldId": {
                      "type": "string"
                    },
                    "labelKey": {
                      "type": "string"
                    },
                    "sortable": {
                      "type": "boolean"
                    },
                    "filterable": {
                      "type": "boolean"
                    }
                  }
                }
              },
              "filters": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "fieldId",
                    "operators"
                  ],
                  "properties": {
                    "fieldId": {
                      "type": "string"
                    },
                    "operators": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "actionId",
                    "labelKey"
                  ],
                  "properties": {
                    "actionId": {
                      "type": "string"
                    },
                    "labelKey": {
                      "type": "string"
                    },
                    "requiresSelection": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ListExpenseReportItem": {
        "type": "object",
        "required": [
          "id",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": true
      },
      "ListExpenseReportsResponse": {
        "type": "object",
        "required": [
          "contractVersion",
          "policyVersion",
          "entityType",
          "context",
          "items",
          "pageInfo",
          "metadata"
        ],
        "properties": {
          "contractVersion": {
            "type": "string",
            "example": "1.0"
          },
          "policyVersion": {
            "type": "string"
          },
          "entityType": {
            "type": "string",
            "enum": [
              "purchases.expense-report"
            ]
          },
          "context": {
            "type": "string",
            "enum": [
              "managementList",
              "operationalList",
              "referencePicker",
              "auditHistory"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "createdAt",
                "updatedAt"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "additionalProperties": true
            }
          },
          "pageInfo": {
            "type": "object",
            "required": [
              "page",
              "limit",
              "total",
              "totalPages",
              "hasNext",
              "hasPrev"
            ],
            "properties": {
              "page": {
                "type": "integer",
                "minimum": 1
              },
              "limit": {
                "type": "integer",
                "minimum": 1
              },
              "offset": {
                "type": "integer",
                "minimum": 0
              },
              "total": {
                "type": "integer",
                "minimum": 0
              },
              "totalPages": {
                "type": "integer",
                "minimum": 0
              },
              "hasNext": {
                "type": "boolean"
              },
              "hasPrev": {
                "type": "boolean"
              }
            }
          },
          "metadata": {
            "type": "object",
            "required": [
              "contractVersion",
              "policyVersion",
              "entityType",
              "context",
              "columns",
              "filters",
              "actions"
            ],
            "properties": {
              "contractVersion": {
                "type": "string",
                "example": "1.0"
              },
              "policyVersion": {
                "type": "string"
              },
              "entityType": {
                "type": "string"
              },
              "context": {
                "type": "string",
                "enum": [
                  "managementList",
                  "operationalList",
                  "referencePicker",
                  "auditHistory"
                ]
              },
              "columns": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "fieldId",
                    "labelKey",
                    "sortable",
                    "filterable"
                  ],
                  "properties": {
                    "fieldId": {
                      "type": "string"
                    },
                    "labelKey": {
                      "type": "string"
                    },
                    "sortable": {
                      "type": "boolean"
                    },
                    "filterable": {
                      "type": "boolean"
                    }
                  }
                }
              },
              "filters": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "fieldId",
                    "operators"
                  ],
                  "properties": {
                    "fieldId": {
                      "type": "string"
                    },
                    "operators": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "actionId",
                    "labelKey"
                  ],
                  "properties": {
                    "actionId": {
                      "type": "string"
                    },
                    "labelKey": {
                      "type": "string"
                    },
                    "requiresSelection": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ListPurchaseOrderItem": {
        "type": "object",
        "required": [
          "id",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": true
      },
      "ListPurchaseOrdersResponse": {
        "type": "object",
        "required": [
          "contractVersion",
          "policyVersion",
          "entityType",
          "context",
          "items",
          "pageInfo",
          "metadata"
        ],
        "properties": {
          "contractVersion": {
            "type": "string",
            "example": "1.0"
          },
          "policyVersion": {
            "type": "string"
          },
          "entityType": {
            "type": "string",
            "enum": [
              "purchases.purchase-order"
            ]
          },
          "context": {
            "type": "string",
            "enum": [
              "managementList",
              "operationalList",
              "referencePicker",
              "auditHistory"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "createdAt",
                "updatedAt"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "additionalProperties": true
            }
          },
          "pageInfo": {
            "type": "object",
            "required": [
              "page",
              "limit",
              "total",
              "totalPages",
              "hasNext",
              "hasPrev"
            ],
            "properties": {
              "page": {
                "type": "integer",
                "minimum": 1
              },
              "limit": {
                "type": "integer",
                "minimum": 1
              },
              "offset": {
                "type": "integer",
                "minimum": 0
              },
              "total": {
                "type": "integer",
                "minimum": 0
              },
              "totalPages": {
                "type": "integer",
                "minimum": 0
              },
              "hasNext": {
                "type": "boolean"
              },
              "hasPrev": {
                "type": "boolean"
              }
            }
          },
          "metadata": {
            "type": "object",
            "required": [
              "contractVersion",
              "policyVersion",
              "entityType",
              "context",
              "columns",
              "filters",
              "actions"
            ],
            "properties": {
              "contractVersion": {
                "type": "string",
                "example": "1.0"
              },
              "policyVersion": {
                "type": "string"
              },
              "entityType": {
                "type": "string"
              },
              "context": {
                "type": "string",
                "enum": [
                  "managementList",
                  "operationalList",
                  "referencePicker",
                  "auditHistory"
                ]
              },
              "columns": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "fieldId",
                    "labelKey",
                    "sortable",
                    "filterable"
                  ],
                  "properties": {
                    "fieldId": {
                      "type": "string"
                    },
                    "labelKey": {
                      "type": "string"
                    },
                    "sortable": {
                      "type": "boolean"
                    },
                    "filterable": {
                      "type": "boolean"
                    }
                  }
                }
              },
              "filters": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "fieldId",
                    "operators"
                  ],
                  "properties": {
                    "fieldId": {
                      "type": "string"
                    },
                    "operators": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "actionId",
                    "labelKey"
                  ],
                  "properties": {
                    "actionId": {
                      "type": "string"
                    },
                    "labelKey": {
                      "type": "string"
                    },
                    "requiresSelection": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ListPurchaseCreditNoteItem": {
        "type": "object",
        "required": [
          "id",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": true
      },
      "ListPurchaseCreditNotesResponse": {
        "type": "object",
        "required": [
          "contractVersion",
          "policyVersion",
          "entityType",
          "context",
          "items",
          "pageInfo",
          "metadata"
        ],
        "properties": {
          "contractVersion": {
            "type": "string",
            "example": "1.0"
          },
          "policyVersion": {
            "type": "string"
          },
          "entityType": {
            "type": "string",
            "enum": [
              "purchases.credit-note"
            ]
          },
          "context": {
            "type": "string",
            "enum": [
              "managementList",
              "operationalList",
              "referencePicker",
              "auditHistory"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "createdAt",
                "updatedAt"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "additionalProperties": true
            }
          },
          "pageInfo": {
            "type": "object",
            "required": [
              "page",
              "limit",
              "total",
              "totalPages",
              "hasNext",
              "hasPrev"
            ],
            "properties": {
              "page": {
                "type": "integer",
                "minimum": 1
              },
              "limit": {
                "type": "integer",
                "minimum": 1
              },
              "offset": {
                "type": "integer",
                "minimum": 0
              },
              "total": {
                "type": "integer",
                "minimum": 0
              },
              "totalPages": {
                "type": "integer",
                "minimum": 0
              },
              "hasNext": {
                "type": "boolean"
              },
              "hasPrev": {
                "type": "boolean"
              }
            }
          },
          "metadata": {
            "type": "object",
            "required": [
              "contractVersion",
              "policyVersion",
              "entityType",
              "context",
              "columns",
              "filters",
              "actions"
            ],
            "properties": {
              "contractVersion": {
                "type": "string",
                "example": "1.0"
              },
              "policyVersion": {
                "type": "string"
              },
              "entityType": {
                "type": "string"
              },
              "context": {
                "type": "string",
                "enum": [
                  "managementList",
                  "operationalList",
                  "referencePicker",
                  "auditHistory"
                ]
              },
              "columns": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "fieldId",
                    "labelKey",
                    "sortable",
                    "filterable"
                  ],
                  "properties": {
                    "fieldId": {
                      "type": "string"
                    },
                    "labelKey": {
                      "type": "string"
                    },
                    "sortable": {
                      "type": "boolean"
                    },
                    "filterable": {
                      "type": "boolean"
                    }
                  }
                }
              },
              "filters": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "fieldId",
                    "operators"
                  ],
                  "properties": {
                    "fieldId": {
                      "type": "string"
                    },
                    "operators": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "actionId",
                    "labelKey"
                  ],
                  "properties": {
                    "actionId": {
                      "type": "string"
                    },
                    "labelKey": {
                      "type": "string"
                    },
                    "requiresSelection": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ListVendorItem": {
        "type": "object",
        "required": [
          "id",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": true
      },
      "ListVendorsResponse": {
        "type": "object",
        "required": [
          "contractVersion",
          "policyVersion",
          "entityType",
          "context",
          "items",
          "pageInfo",
          "metadata"
        ],
        "properties": {
          "contractVersion": {
            "type": "string",
            "example": "1.0"
          },
          "policyVersion": {
            "type": "string"
          },
          "entityType": {
            "type": "string",
            "enum": [
              "purchases.vendor"
            ]
          },
          "context": {
            "type": "string",
            "enum": [
              "managementList",
              "operationalList",
              "referencePicker",
              "auditHistory"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "createdAt",
                "updatedAt"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "additionalProperties": true
            }
          },
          "pageInfo": {
            "type": "object",
            "required": [
              "page",
              "limit",
              "total",
              "totalPages",
              "hasNext",
              "hasPrev"
            ],
            "properties": {
              "page": {
                "type": "integer",
                "minimum": 1
              },
              "limit": {
                "type": "integer",
                "minimum": 1
              },
              "offset": {
                "type": "integer",
                "minimum": 0
              },
              "total": {
                "type": "integer",
                "minimum": 0
              },
              "totalPages": {
                "type": "integer",
                "minimum": 0
              },
              "hasNext": {
                "type": "boolean"
              },
              "hasPrev": {
                "type": "boolean"
              }
            }
          },
          "metadata": {
            "type": "object",
            "required": [
              "contractVersion",
              "policyVersion",
              "entityType",
              "context",
              "columns",
              "filters",
              "actions"
            ],
            "properties": {
              "contractVersion": {
                "type": "string",
                "example": "1.0"
              },
              "policyVersion": {
                "type": "string"
              },
              "entityType": {
                "type": "string"
              },
              "context": {
                "type": "string",
                "enum": [
                  "managementList",
                  "operationalList",
                  "referencePicker",
                  "auditHistory"
                ]
              },
              "columns": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "fieldId",
                    "labelKey",
                    "sortable",
                    "filterable"
                  ],
                  "properties": {
                    "fieldId": {
                      "type": "string"
                    },
                    "labelKey": {
                      "type": "string"
                    },
                    "sortable": {
                      "type": "boolean"
                    },
                    "filterable": {
                      "type": "boolean"
                    }
                  }
                }
              },
              "filters": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "fieldId",
                    "operators"
                  ],
                  "properties": {
                    "fieldId": {
                      "type": "string"
                    },
                    "operators": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "actionId",
                    "labelKey"
                  ],
                  "properties": {
                    "actionId": {
                      "type": "string"
                    },
                    "labelKey": {
                      "type": "string"
                    },
                    "requiresSelection": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ListBudgetItem": {
        "type": "object",
        "required": [
          "id",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": true
      },
      "ListBudgetsResponse": {
        "type": "object",
        "required": [
          "contractVersion",
          "policyVersion",
          "entityType",
          "context",
          "items",
          "pageInfo",
          "metadata"
        ],
        "properties": {
          "contractVersion": {
            "type": "string",
            "example": "1.0"
          },
          "policyVersion": {
            "type": "string"
          },
          "entityType": {
            "type": "string",
            "enum": [
              "purchases.budget"
            ]
          },
          "context": {
            "type": "string",
            "enum": [
              "managementList",
              "operationalList",
              "referencePicker",
              "auditHistory"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "createdAt",
                "updatedAt"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "additionalProperties": true
            }
          },
          "pageInfo": {
            "type": "object",
            "required": [
              "page",
              "limit",
              "total",
              "totalPages",
              "hasNext",
              "hasPrev"
            ],
            "properties": {
              "page": {
                "type": "integer",
                "minimum": 1
              },
              "limit": {
                "type": "integer",
                "minimum": 1
              },
              "offset": {
                "type": "integer",
                "minimum": 0
              },
              "total": {
                "type": "integer",
                "minimum": 0
              },
              "totalPages": {
                "type": "integer",
                "minimum": 0
              },
              "hasNext": {
                "type": "boolean"
              },
              "hasPrev": {
                "type": "boolean"
              }
            }
          },
          "metadata": {
            "type": "object",
            "required": [
              "contractVersion",
              "policyVersion",
              "entityType",
              "context",
              "columns",
              "filters",
              "actions"
            ],
            "properties": {
              "contractVersion": {
                "type": "string",
                "example": "1.0"
              },
              "policyVersion": {
                "type": "string"
              },
              "entityType": {
                "type": "string"
              },
              "context": {
                "type": "string",
                "enum": [
                  "managementList",
                  "operationalList",
                  "referencePicker",
                  "auditHistory"
                ]
              },
              "columns": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "fieldId",
                    "labelKey",
                    "sortable",
                    "filterable"
                  ],
                  "properties": {
                    "fieldId": {
                      "type": "string"
                    },
                    "labelKey": {
                      "type": "string"
                    },
                    "sortable": {
                      "type": "boolean"
                    },
                    "filterable": {
                      "type": "boolean"
                    }
                  }
                }
              },
              "filters": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "fieldId",
                    "operators"
                  ],
                  "properties": {
                    "fieldId": {
                      "type": "string"
                    },
                    "operators": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "actionId",
                    "labelKey"
                  ],
                  "properties": {
                    "actionId": {
                      "type": "string"
                    },
                    "labelKey": {
                      "type": "string"
                    },
                    "requiresSelection": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ListOrganizationItem": {
        "type": "object",
        "required": [
          "id",
          "displayName",
          "status",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "legalName": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "INACTIVE",
              "BLOCKED",
              "ARCHIVED"
            ]
          },
          "recordState": {
            "type": "string",
            "enum": [
              "active",
              "inactive",
              "archived"
            ]
          },
          "riskLevel": {
            "type": "string",
            "enum": [
              "LOW",
              "MEDIUM",
              "HIGH",
              "CRITICAL"
            ]
          },
          "countryOfRegistration": {
            "type": "string"
          },
          "vatNumber": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": true
      },
      "ListOrganizationsResponse": {
        "type": "object",
        "required": [
          "contractVersion",
          "policyVersion",
          "entityType",
          "context",
          "items",
          "pageInfo",
          "metadata"
        ],
        "properties": {
          "contractVersion": {
            "type": "string",
            "example": "1.0"
          },
          "policyVersion": {
            "type": "string"
          },
          "entityType": {
            "type": "string",
            "enum": [
              "contacts.organization"
            ]
          },
          "context": {
            "type": "string",
            "enum": [
              "managementList",
              "operationalList",
              "referencePicker",
              "auditHistory"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "displayName",
                "status",
                "createdAt",
                "updatedAt"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "displayName": {
                  "type": "string"
                },
                "legalName": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "ACTIVE",
                    "INACTIVE",
                    "BLOCKED",
                    "ARCHIVED"
                  ]
                },
                "recordState": {
                  "type": "string",
                  "enum": [
                    "active",
                    "inactive",
                    "archived"
                  ]
                },
                "riskLevel": {
                  "type": "string",
                  "enum": [
                    "LOW",
                    "MEDIUM",
                    "HIGH",
                    "CRITICAL"
                  ]
                },
                "countryOfRegistration": {
                  "type": "string"
                },
                "vatNumber": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "additionalProperties": true
            }
          },
          "pageInfo": {
            "type": "object",
            "required": [
              "page",
              "limit",
              "total",
              "totalPages",
              "hasNext",
              "hasPrev"
            ],
            "properties": {
              "page": {
                "type": "integer",
                "minimum": 1
              },
              "limit": {
                "type": "integer",
                "minimum": 1
              },
              "offset": {
                "type": "integer",
                "minimum": 0
              },
              "total": {
                "type": "integer",
                "minimum": 0
              },
              "totalPages": {
                "type": "integer",
                "minimum": 0
              },
              "hasNext": {
                "type": "boolean"
              },
              "hasPrev": {
                "type": "boolean"
              }
            }
          },
          "metadata": {
            "type": "object",
            "required": [
              "contractVersion",
              "policyVersion",
              "entityType",
              "context",
              "columns",
              "filters",
              "actions"
            ],
            "properties": {
              "contractVersion": {
                "type": "string",
                "example": "1.0"
              },
              "policyVersion": {
                "type": "string"
              },
              "entityType": {
                "type": "string"
              },
              "context": {
                "type": "string",
                "enum": [
                  "managementList",
                  "operationalList",
                  "referencePicker",
                  "auditHistory"
                ]
              },
              "columns": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "fieldId",
                    "labelKey",
                    "sortable",
                    "filterable"
                  ],
                  "properties": {
                    "fieldId": {
                      "type": "string"
                    },
                    "labelKey": {
                      "type": "string"
                    },
                    "sortable": {
                      "type": "boolean"
                    },
                    "filterable": {
                      "type": "boolean"
                    }
                  }
                }
              },
              "filters": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "fieldId",
                    "operators"
                  ],
                  "properties": {
                    "fieldId": {
                      "type": "string"
                    },
                    "operators": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "actionId",
                    "labelKey"
                  ],
                  "properties": {
                    "actionId": {
                      "type": "string"
                    },
                    "labelKey": {
                      "type": "string"
                    },
                    "requiresSelection": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ListPersonItem": {
        "type": "object",
        "required": [
          "id",
          "firstName",
          "lastName",
          "status",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "phone": {
            "type": "string"
          },
          "mobile": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "ARCHIVED"
            ]
          },
          "recordState": {
            "type": "string",
            "enum": [
              "active",
              "archived"
            ]
          },
          "type": {
            "type": "string"
          },
          "jobTitle": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": true
      },
      "ListPersonsResponse": {
        "type": "object",
        "required": [
          "contractVersion",
          "policyVersion",
          "entityType",
          "context",
          "items",
          "pageInfo",
          "metadata"
        ],
        "properties": {
          "contractVersion": {
            "type": "string",
            "example": "1.0"
          },
          "policyVersion": {
            "type": "string"
          },
          "entityType": {
            "type": "string",
            "enum": [
              "contacts.person"
            ]
          },
          "context": {
            "type": "string",
            "enum": [
              "managementList",
              "operationalList",
              "referencePicker",
              "auditHistory"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "firstName",
                "lastName",
                "status",
                "createdAt",
                "updatedAt"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "firstName": {
                  "type": "string"
                },
                "lastName": {
                  "type": "string"
                },
                "displayName": {
                  "type": "string"
                },
                "email": {
                  "type": "string",
                  "format": "email"
                },
                "phone": {
                  "type": "string"
                },
                "mobile": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "ACTIVE",
                    "ARCHIVED"
                  ]
                },
                "recordState": {
                  "type": "string",
                  "enum": [
                    "active",
                    "archived"
                  ]
                },
                "type": {
                  "type": "string"
                },
                "jobTitle": {
                  "type": "string"
                },
                "language": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "additionalProperties": true
            }
          },
          "pageInfo": {
            "type": "object",
            "required": [
              "page",
              "limit",
              "total",
              "totalPages",
              "hasNext",
              "hasPrev"
            ],
            "properties": {
              "page": {
                "type": "integer",
                "minimum": 1
              },
              "limit": {
                "type": "integer",
                "minimum": 1
              },
              "offset": {
                "type": "integer",
                "minimum": 0
              },
              "total": {
                "type": "integer",
                "minimum": 0
              },
              "totalPages": {
                "type": "integer",
                "minimum": 0
              },
              "hasNext": {
                "type": "boolean"
              },
              "hasPrev": {
                "type": "boolean"
              }
            }
          },
          "metadata": {
            "type": "object",
            "required": [
              "contractVersion",
              "policyVersion",
              "entityType",
              "context",
              "columns",
              "filters",
              "actions"
            ],
            "properties": {
              "contractVersion": {
                "type": "string",
                "example": "1.0"
              },
              "policyVersion": {
                "type": "string"
              },
              "entityType": {
                "type": "string"
              },
              "context": {
                "type": "string",
                "enum": [
                  "managementList",
                  "operationalList",
                  "referencePicker",
                  "auditHistory"
                ]
              },
              "columns": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "fieldId",
                    "labelKey",
                    "sortable",
                    "filterable"
                  ],
                  "properties": {
                    "fieldId": {
                      "type": "string"
                    },
                    "labelKey": {
                      "type": "string"
                    },
                    "sortable": {
                      "type": "boolean"
                    },
                    "filterable": {
                      "type": "boolean"
                    }
                  }
                }
              },
              "filters": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "fieldId",
                    "operators"
                  ],
                  "properties": {
                    "fieldId": {
                      "type": "string"
                    },
                    "operators": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "actionId",
                    "labelKey"
                  ],
                  "properties": {
                    "actionId": {
                      "type": "string"
                    },
                    "labelKey": {
                      "type": "string"
                    },
                    "requiresSelection": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ListAddressItem": {
        "type": "object",
        "required": [
          "id",
          "country",
          "status",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "line1": {
            "type": "string"
          },
          "street": {
            "type": "string"
          },
          "streetNumber": {
            "type": "string"
          },
          "postalCode": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "ARCHIVED"
            ]
          },
          "recordState": {
            "type": "string",
            "enum": [
              "active",
              "archived"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": true
      },
      "ListAddressesResponse": {
        "type": "object",
        "required": [
          "contractVersion",
          "policyVersion",
          "entityType",
          "context",
          "items",
          "pageInfo",
          "metadata"
        ],
        "properties": {
          "contractVersion": {
            "type": "string",
            "example": "1.0"
          },
          "policyVersion": {
            "type": "string"
          },
          "entityType": {
            "type": "string",
            "enum": [
              "contacts.address"
            ]
          },
          "context": {
            "type": "string",
            "enum": [
              "managementList",
              "operationalList",
              "referencePicker",
              "auditHistory"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "country",
                "status",
                "createdAt",
                "updatedAt"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "line1": {
                  "type": "string"
                },
                "street": {
                  "type": "string"
                },
                "streetNumber": {
                  "type": "string"
                },
                "postalCode": {
                  "type": "string"
                },
                "city": {
                  "type": "string"
                },
                "state": {
                  "type": "string"
                },
                "country": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "ACTIVE",
                    "ARCHIVED"
                  ]
                },
                "recordState": {
                  "type": "string",
                  "enum": [
                    "active",
                    "archived"
                  ]
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "additionalProperties": true
            }
          },
          "pageInfo": {
            "type": "object",
            "required": [
              "page",
              "limit",
              "total",
              "totalPages",
              "hasNext",
              "hasPrev"
            ],
            "properties": {
              "page": {
                "type": "integer",
                "minimum": 1
              },
              "limit": {
                "type": "integer",
                "minimum": 1
              },
              "offset": {
                "type": "integer",
                "minimum": 0
              },
              "total": {
                "type": "integer",
                "minimum": 0
              },
              "totalPages": {
                "type": "integer",
                "minimum": 0
              },
              "hasNext": {
                "type": "boolean"
              },
              "hasPrev": {
                "type": "boolean"
              }
            }
          },
          "metadata": {
            "type": "object",
            "required": [
              "contractVersion",
              "policyVersion",
              "entityType",
              "context",
              "columns",
              "filters",
              "actions"
            ],
            "properties": {
              "contractVersion": {
                "type": "string",
                "example": "1.0"
              },
              "policyVersion": {
                "type": "string"
              },
              "entityType": {
                "type": "string"
              },
              "context": {
                "type": "string",
                "enum": [
                  "managementList",
                  "operationalList",
                  "referencePicker",
                  "auditHistory"
                ]
              },
              "columns": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "fieldId",
                    "labelKey",
                    "sortable",
                    "filterable"
                  ],
                  "properties": {
                    "fieldId": {
                      "type": "string"
                    },
                    "labelKey": {
                      "type": "string"
                    },
                    "sortable": {
                      "type": "boolean"
                    },
                    "filterable": {
                      "type": "boolean"
                    }
                  }
                }
              },
              "filters": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "fieldId",
                    "operators"
                  ],
                  "properties": {
                    "fieldId": {
                      "type": "string"
                    },
                    "operators": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "actionId",
                    "labelKey"
                  ],
                  "properties": {
                    "actionId": {
                      "type": "string"
                    },
                    "labelKey": {
                      "type": "string"
                    },
                    "requiresSelection": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ListLeadItem": {
        "type": "object",
        "required": [
          "id",
          "title",
          "statusCategory",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "statusCategory": {
            "type": "string",
            "enum": [
              "open",
              "qualified",
              "converted",
              "disqualified",
              "archived"
            ]
          },
          "statusId": {
            "type": "string"
          },
          "leadKind": {
            "type": "string"
          },
          "ownerUserId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "primaryContactId": {
            "type": "string"
          },
          "individualPersonId": {
            "type": "string"
          },
          "acquisitionSource": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": true
      },
      "ListLeadsResponse": {
        "type": "object",
        "required": [
          "contractVersion",
          "policyVersion",
          "entityType",
          "context",
          "items",
          "pageInfo",
          "metadata"
        ],
        "properties": {
          "contractVersion": {
            "type": "string",
            "example": "1.0"
          },
          "policyVersion": {
            "type": "string"
          },
          "entityType": {
            "type": "string",
            "enum": [
              "crm.lead"
            ]
          },
          "context": {
            "type": "string",
            "enum": [
              "managementList",
              "operationalList",
              "referencePicker",
              "auditHistory"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "title",
                "statusCategory",
                "createdAt",
                "updatedAt"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "statusCategory": {
                  "type": "string",
                  "enum": [
                    "open",
                    "qualified",
                    "converted",
                    "disqualified",
                    "archived"
                  ]
                },
                "statusId": {
                  "type": "string"
                },
                "leadKind": {
                  "type": "string"
                },
                "ownerUserId": {
                  "type": "string"
                },
                "organizationId": {
                  "type": "string"
                },
                "primaryContactId": {
                  "type": "string"
                },
                "individualPersonId": {
                  "type": "string"
                },
                "acquisitionSource": {
                  "type": "string"
                },
                "source": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "additionalProperties": true
            }
          },
          "pageInfo": {
            "type": "object",
            "required": [
              "page",
              "limit",
              "total",
              "totalPages",
              "hasNext",
              "hasPrev"
            ],
            "properties": {
              "page": {
                "type": "integer",
                "minimum": 1
              },
              "limit": {
                "type": "integer",
                "minimum": 1
              },
              "offset": {
                "type": "integer",
                "minimum": 0
              },
              "total": {
                "type": "integer",
                "minimum": 0
              },
              "totalPages": {
                "type": "integer",
                "minimum": 0
              },
              "hasNext": {
                "type": "boolean"
              },
              "hasPrev": {
                "type": "boolean"
              }
            }
          },
          "metadata": {
            "type": "object",
            "required": [
              "contractVersion",
              "policyVersion",
              "entityType",
              "context",
              "columns",
              "filters",
              "actions"
            ],
            "properties": {
              "contractVersion": {
                "type": "string",
                "example": "1.0"
              },
              "policyVersion": {
                "type": "string"
              },
              "entityType": {
                "type": "string"
              },
              "context": {
                "type": "string",
                "enum": [
                  "managementList",
                  "operationalList",
                  "referencePicker",
                  "auditHistory"
                ]
              },
              "columns": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "fieldId",
                    "labelKey",
                    "sortable",
                    "filterable"
                  ],
                  "properties": {
                    "fieldId": {
                      "type": "string"
                    },
                    "labelKey": {
                      "type": "string"
                    },
                    "sortable": {
                      "type": "boolean"
                    },
                    "filterable": {
                      "type": "boolean"
                    }
                  }
                }
              },
              "filters": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "fieldId",
                    "operators"
                  ],
                  "properties": {
                    "fieldId": {
                      "type": "string"
                    },
                    "operators": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "actionId",
                    "labelKey"
                  ],
                  "properties": {
                    "actionId": {
                      "type": "string"
                    },
                    "labelKey": {
                      "type": "string"
                    },
                    "requiresSelection": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ListOpportunityItem": {
        "type": "object",
        "required": [
          "id",
          "title",
          "status",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "won",
              "lost"
            ]
          },
          "currency": {
            "type": "string"
          },
          "value": {
            "type": "number"
          },
          "probability": {
            "type": "number"
          },
          "pipelineId": {
            "type": "string"
          },
          "stageId": {
            "type": "string"
          },
          "ownerUserId": {
            "type": "string"
          },
          "accountId": {
            "type": "string"
          },
          "organizationId": {
            "type": "string"
          },
          "leadId": {
            "type": "string"
          },
          "closeDate": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": true
      },
      "ListOpportunitiesResponse": {
        "type": "object",
        "required": [
          "contractVersion",
          "policyVersion",
          "entityType",
          "context",
          "items",
          "pageInfo",
          "metadata"
        ],
        "properties": {
          "contractVersion": {
            "type": "string",
            "example": "1.0"
          },
          "policyVersion": {
            "type": "string"
          },
          "entityType": {
            "type": "string",
            "enum": [
              "crm.opportunity"
            ]
          },
          "context": {
            "type": "string",
            "enum": [
              "managementList",
              "operationalList",
              "referencePicker",
              "auditHistory"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "title",
                "status",
                "createdAt",
                "updatedAt"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "open",
                    "won",
                    "lost"
                  ]
                },
                "currency": {
                  "type": "string"
                },
                "value": {
                  "type": "number"
                },
                "probability": {
                  "type": "number"
                },
                "pipelineId": {
                  "type": "string"
                },
                "stageId": {
                  "type": "string"
                },
                "ownerUserId": {
                  "type": "string"
                },
                "accountId": {
                  "type": "string"
                },
                "organizationId": {
                  "type": "string"
                },
                "leadId": {
                  "type": "string"
                },
                "closeDate": {
                  "type": "string",
                  "format": "date-time"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "additionalProperties": true
            }
          },
          "pageInfo": {
            "type": "object",
            "required": [
              "page",
              "limit",
              "total",
              "totalPages",
              "hasNext",
              "hasPrev"
            ],
            "properties": {
              "page": {
                "type": "integer",
                "minimum": 1
              },
              "limit": {
                "type": "integer",
                "minimum": 1
              },
              "offset": {
                "type": "integer",
                "minimum": 0
              },
              "total": {
                "type": "integer",
                "minimum": 0
              },
              "totalPages": {
                "type": "integer",
                "minimum": 0
              },
              "hasNext": {
                "type": "boolean"
              },
              "hasPrev": {
                "type": "boolean"
              }
            }
          },
          "metadata": {
            "type": "object",
            "required": [
              "contractVersion",
              "policyVersion",
              "entityType",
              "context",
              "columns",
              "filters",
              "actions"
            ],
            "properties": {
              "contractVersion": {
                "type": "string",
                "example": "1.0"
              },
              "policyVersion": {
                "type": "string"
              },
              "entityType": {
                "type": "string"
              },
              "context": {
                "type": "string",
                "enum": [
                  "managementList",
                  "operationalList",
                  "referencePicker",
                  "auditHistory"
                ]
              },
              "columns": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "fieldId",
                    "labelKey",
                    "sortable",
                    "filterable"
                  ],
                  "properties": {
                    "fieldId": {
                      "type": "string"
                    },
                    "labelKey": {
                      "type": "string"
                    },
                    "sortable": {
                      "type": "boolean"
                    },
                    "filterable": {
                      "type": "boolean"
                    }
                  }
                }
              },
              "filters": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "fieldId",
                    "operators"
                  ],
                  "properties": {
                    "fieldId": {
                      "type": "string"
                    },
                    "operators": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "actionId",
                    "labelKey"
                  ],
                  "properties": {
                    "actionId": {
                      "type": "string"
                    },
                    "labelKey": {
                      "type": "string"
                    },
                    "requiresSelection": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "CompanySetupAction": {
        "type": "object",
        "required": [
          "key",
          "source",
          "status",
          "priority",
          "titleKey",
          "ctaLabelKey",
          "href",
          "assignable",
          "completable"
        ],
        "properties": {
          "key": {
            "type": "string",
            "enum": [
              "company_profile_complete",
              "invite_team_member",
              "modules_review",
              "payment_terms_review",
              "delivery_terms_review",
              "reminder_rules_review",
              "agent_first_run",
              "compliance_profile_complete",
              "compliance_follow_up_open"
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "onboarding",
              "config_defaults",
              "compliance_profile",
              "compliance_follow_up"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "todo",
              "blocked",
              "due_soon",
              "overdue",
              "done"
            ]
          },
          "priority": {
            "type": "integer"
          },
          "titleKey": {
            "type": "string"
          },
          "descriptionKey": {
            "type": "string"
          },
          "ctaLabelKey": {
            "type": "string"
          },
          "href": {
            "type": "string"
          },
          "count": {
            "type": "integer"
          },
          "dueAt": {
            "type": "string",
            "format": "date-time"
          },
          "taskId": {
            "type": "string"
          },
          "assignable": {
            "type": "boolean"
          },
          "completable": {
            "type": "boolean"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CompanySetupActionsData": {
        "type": "object",
        "required": [
          "actions",
          "summary"
        ],
        "properties": {
          "actions": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "key",
                "source",
                "status",
                "priority",
                "titleKey",
                "ctaLabelKey",
                "href",
                "assignable",
                "completable"
              ],
              "properties": {
                "key": {
                  "type": "string",
                  "enum": [
                    "company_profile_complete",
                    "invite_team_member",
                    "modules_review",
                    "payment_terms_review",
                    "delivery_terms_review",
                    "reminder_rules_review",
                    "agent_first_run",
                    "compliance_profile_complete",
                    "compliance_follow_up_open"
                  ]
                },
                "source": {
                  "type": "string",
                  "enum": [
                    "onboarding",
                    "config_defaults",
                    "compliance_profile",
                    "compliance_follow_up"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "todo",
                    "blocked",
                    "due_soon",
                    "overdue",
                    "done"
                  ]
                },
                "priority": {
                  "type": "integer"
                },
                "titleKey": {
                  "type": "string"
                },
                "descriptionKey": {
                  "type": "string"
                },
                "ctaLabelKey": {
                  "type": "string"
                },
                "href": {
                  "type": "string"
                },
                "count": {
                  "type": "integer"
                },
                "dueAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "taskId": {
                  "type": "string"
                },
                "assignable": {
                  "type": "boolean"
                },
                "completable": {
                  "type": "boolean"
                },
                "completedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "summary": {
            "type": "object",
            "required": [
              "total",
              "open",
              "done"
            ],
            "properties": {
              "total": {
                "type": "integer"
              },
              "open": {
                "type": "integer"
              },
              "done": {
                "type": "integer"
              }
            }
          }
        }
      },
      "CompanySetupActionsResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean"
          },
          "data": {
            "type": "object",
            "required": [
              "actions",
              "summary"
            ],
            "properties": {
              "actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "key",
                    "source",
                    "status",
                    "priority",
                    "titleKey",
                    "ctaLabelKey",
                    "href",
                    "assignable",
                    "completable"
                  ],
                  "properties": {
                    "key": {
                      "type": "string",
                      "enum": [
                        "company_profile_complete",
                        "invite_team_member",
                        "modules_review",
                        "payment_terms_review",
                        "delivery_terms_review",
                        "reminder_rules_review",
                        "agent_first_run",
                        "compliance_profile_complete",
                        "compliance_follow_up_open"
                      ]
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "onboarding",
                        "config_defaults",
                        "compliance_profile",
                        "compliance_follow_up"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "todo",
                        "blocked",
                        "due_soon",
                        "overdue",
                        "done"
                      ]
                    },
                    "priority": {
                      "type": "integer"
                    },
                    "titleKey": {
                      "type": "string"
                    },
                    "descriptionKey": {
                      "type": "string"
                    },
                    "ctaLabelKey": {
                      "type": "string"
                    },
                    "href": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "dueAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "taskId": {
                      "type": "string"
                    },
                    "assignable": {
                      "type": "boolean"
                    },
                    "completable": {
                      "type": "boolean"
                    },
                    "completedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              },
              "summary": {
                "type": "object",
                "required": [
                  "total",
                  "open",
                  "done"
                ],
                "properties": {
                  "total": {
                    "type": "integer"
                  },
                  "open": {
                    "type": "integer"
                  },
                  "done": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        }
      },
      "CompleteCompanySetupActionData": {
        "type": "object",
        "required": [
          "action"
        ],
        "properties": {
          "action": {
            "type": "object",
            "required": [
              "key",
              "source",
              "status",
              "priority",
              "titleKey",
              "ctaLabelKey",
              "href",
              "assignable",
              "completable"
            ],
            "properties": {
              "key": {
                "type": "string",
                "enum": [
                  "company_profile_complete",
                  "invite_team_member",
                  "modules_review",
                  "payment_terms_review",
                  "delivery_terms_review",
                  "reminder_rules_review",
                  "agent_first_run",
                  "compliance_profile_complete",
                  "compliance_follow_up_open"
                ]
              },
              "source": {
                "type": "string",
                "enum": [
                  "onboarding",
                  "config_defaults",
                  "compliance_profile",
                  "compliance_follow_up"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "todo",
                  "blocked",
                  "due_soon",
                  "overdue",
                  "done"
                ]
              },
              "priority": {
                "type": "integer"
              },
              "titleKey": {
                "type": "string"
              },
              "descriptionKey": {
                "type": "string"
              },
              "ctaLabelKey": {
                "type": "string"
              },
              "href": {
                "type": "string"
              },
              "count": {
                "type": "integer"
              },
              "dueAt": {
                "type": "string",
                "format": "date-time"
              },
              "taskId": {
                "type": "string"
              },
              "assignable": {
                "type": "boolean"
              },
              "completable": {
                "type": "boolean"
              },
              "completedAt": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "CompleteCompanySetupActionResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean"
          },
          "data": {
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "object",
                "required": [
                  "key",
                  "source",
                  "status",
                  "priority",
                  "titleKey",
                  "ctaLabelKey",
                  "href",
                  "assignable",
                  "completable"
                ],
                "properties": {
                  "key": {
                    "type": "string",
                    "enum": [
                      "company_profile_complete",
                      "invite_team_member",
                      "modules_review",
                      "payment_terms_review",
                      "delivery_terms_review",
                      "reminder_rules_review",
                      "agent_first_run",
                      "compliance_profile_complete",
                      "compliance_follow_up_open"
                    ]
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "onboarding",
                      "config_defaults",
                      "compliance_profile",
                      "compliance_follow_up"
                    ]
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "todo",
                      "blocked",
                      "due_soon",
                      "overdue",
                      "done"
                    ]
                  },
                  "priority": {
                    "type": "integer"
                  },
                  "titleKey": {
                    "type": "string"
                  },
                  "descriptionKey": {
                    "type": "string"
                  },
                  "ctaLabelKey": {
                    "type": "string"
                  },
                  "href": {
                    "type": "string"
                  },
                  "count": {
                    "type": "integer"
                  },
                  "dueAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "taskId": {
                    "type": "string"
                  },
                  "assignable": {
                    "type": "boolean"
                  },
                  "completable": {
                    "type": "boolean"
                  },
                  "completedAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              }
            }
          }
        }
      },
      "AssignCompanySetupActionData": {
        "type": "object",
        "required": [
          "action",
          "taskId"
        ],
        "properties": {
          "action": {
            "type": "object",
            "required": [
              "key",
              "source",
              "status",
              "priority",
              "titleKey",
              "ctaLabelKey",
              "href",
              "assignable",
              "completable"
            ],
            "properties": {
              "key": {
                "type": "string",
                "enum": [
                  "company_profile_complete",
                  "invite_team_member",
                  "modules_review",
                  "payment_terms_review",
                  "delivery_terms_review",
                  "reminder_rules_review",
                  "agent_first_run",
                  "compliance_profile_complete",
                  "compliance_follow_up_open"
                ]
              },
              "source": {
                "type": "string",
                "enum": [
                  "onboarding",
                  "config_defaults",
                  "compliance_profile",
                  "compliance_follow_up"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "todo",
                  "blocked",
                  "due_soon",
                  "overdue",
                  "done"
                ]
              },
              "priority": {
                "type": "integer"
              },
              "titleKey": {
                "type": "string"
              },
              "descriptionKey": {
                "type": "string"
              },
              "ctaLabelKey": {
                "type": "string"
              },
              "href": {
                "type": "string"
              },
              "count": {
                "type": "integer"
              },
              "dueAt": {
                "type": "string",
                "format": "date-time"
              },
              "taskId": {
                "type": "string"
              },
              "assignable": {
                "type": "boolean"
              },
              "completable": {
                "type": "boolean"
              },
              "completedAt": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "taskId": {
            "type": "string"
          }
        }
      },
      "AssignCompanySetupActionResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean"
          },
          "data": {
            "type": "object",
            "required": [
              "action",
              "taskId"
            ],
            "properties": {
              "action": {
                "type": "object",
                "required": [
                  "key",
                  "source",
                  "status",
                  "priority",
                  "titleKey",
                  "ctaLabelKey",
                  "href",
                  "assignable",
                  "completable"
                ],
                "properties": {
                  "key": {
                    "type": "string",
                    "enum": [
                      "company_profile_complete",
                      "invite_team_member",
                      "modules_review",
                      "payment_terms_review",
                      "delivery_terms_review",
                      "reminder_rules_review",
                      "agent_first_run",
                      "compliance_profile_complete",
                      "compliance_follow_up_open"
                    ]
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "onboarding",
                      "config_defaults",
                      "compliance_profile",
                      "compliance_follow_up"
                    ]
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "todo",
                      "blocked",
                      "due_soon",
                      "overdue",
                      "done"
                    ]
                  },
                  "priority": {
                    "type": "integer"
                  },
                  "titleKey": {
                    "type": "string"
                  },
                  "descriptionKey": {
                    "type": "string"
                  },
                  "ctaLabelKey": {
                    "type": "string"
                  },
                  "href": {
                    "type": "string"
                  },
                  "count": {
                    "type": "integer"
                  },
                  "dueAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "taskId": {
                    "type": "string"
                  },
                  "assignable": {
                    "type": "boolean"
                  },
                  "completable": {
                    "type": "boolean"
                  },
                  "completedAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              },
              "taskId": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "responses": {
      "BadRequestError": {
        "description": "Bad Request (400)",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "error"
              ],
              "properties": {
                "error": {
                  "type": "object",
                  "required": [
                    "code",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "UNAUTHORIZED",
                        "FORBIDDEN",
                        "NOT_FOUND",
                        "VALIDATION_ERROR",
                        "CONFLICT",
                        "INTERNAL_ERROR",
                        "SERVICE_UNAVAILABLE",
                        "BAD_REQUEST",
                        "PAYMENT_REQUIRED",
                        "RATE_LIMIT_EXCEEDED",
                        "MODULE_NOT_ENABLED",
                        "PERMISSION_DENIED",
                        "COMPANY_NOT_ACTIVE",
                        "TENANT_NOT_ACTIVE",
                        "INVALID_TOKEN",
                        "TOKEN_EXPIRED",
                        "INVITATION_EXPIRED",
                        "INVALID_CREDENTIALS",
                        "EMAIL_NOT_VERIFIED",
                        "DATA_INTEGRITY_GUARD",
                        "SSO_PROVISIONING_REQUIRED",
                        "MFA_SETUP_REQUIRED",
                        "MFA_VERIFICATION_REQUIRED",
                        "MFA_STEP_UP_REQUIRED",
                        "USER_SUSPENDED",
                        "COMPANY_ARCHIVED",
                        "NETWORK_ERROR",
                        "COUNTRY_NOT_FOUND",
                        "AGENT_TIMEOUT",
                        "TOOL_EXECUTION_ERROR",
                        "LEGACY_APPROVAL_UNSUPPORTED",
                        "MODEL_ERROR",
                        "AGENT_CANCELLED",
                        "SUSPICIOUS_CONTENT_DETECTED",
                        "IMPORT_MOVED_TO_DATA_IMPORTS",
                        "INVALID_PORTAL",
                        "INVALID_PORTAL_FOR_RUNS",
                        "INVALID_PORTAL_FOR_STATS",
                        "ACCESSMODE_USER_MISMATCH",
                        "ACCESSMODE_TENANT_MISMATCH",
                        "ACCESSMODE_COMPANY_MISMATCH",
                        "ORG_PROVISIONING_FAILED"
                      ],
                      "description": "Error code (ErrorCode type)",
                      "example": "NOT_FOUND"
                    },
                    "message": {
                      "type": "string",
                      "description": "Localized error message (via translateError() with i18n keys)",
                      "example": "Company not found"
                    },
                    "details": {
                      "type": "object",
                      "description": "Optional error details (validation errors, etc.)",
                      "additionalProperties": true
                    },
                    "field": {
                      "type": "string",
                      "description": "Optional field name for validation errors",
                      "example": "email"
                    },
                    "correlationId": {
                      "type": "string",
                      "description": "Request correlation ID for debugging",
                      "example": "req-1234567890"
                    },
                    "requestId": {
                      "type": "string",
                      "description": "Request ID for tracing",
                      "example": "req-9876543210"
                    }
                  }
                }
              }
            },
            "example": {
              "error": {
                "code": "BAD_REQUEST",
                "message": "Invalid request parameters"
              }
            }
          }
        },
        "headers": {
          "X-API-Version": {
            "description": "API semantic version.",
            "schema": {
              "type": "string"
            },
            "example": "0.3.0"
          },
          "X-API-Path-Version": {
            "description": "API URL version prefix.",
            "schema": {
              "type": "string"
            },
            "example": "v1"
          }
        }
      },
      "UnauthorizedError": {
        "description": "Unauthorized (401) - Missing or invalid JWT token",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "error"
              ],
              "properties": {
                "error": {
                  "type": "object",
                  "required": [
                    "code",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "UNAUTHORIZED",
                        "FORBIDDEN",
                        "NOT_FOUND",
                        "VALIDATION_ERROR",
                        "CONFLICT",
                        "INTERNAL_ERROR",
                        "SERVICE_UNAVAILABLE",
                        "BAD_REQUEST",
                        "PAYMENT_REQUIRED",
                        "RATE_LIMIT_EXCEEDED",
                        "MODULE_NOT_ENABLED",
                        "PERMISSION_DENIED",
                        "COMPANY_NOT_ACTIVE",
                        "TENANT_NOT_ACTIVE",
                        "INVALID_TOKEN",
                        "TOKEN_EXPIRED",
                        "INVITATION_EXPIRED",
                        "INVALID_CREDENTIALS",
                        "EMAIL_NOT_VERIFIED",
                        "DATA_INTEGRITY_GUARD",
                        "SSO_PROVISIONING_REQUIRED",
                        "MFA_SETUP_REQUIRED",
                        "MFA_VERIFICATION_REQUIRED",
                        "MFA_STEP_UP_REQUIRED",
                        "USER_SUSPENDED",
                        "COMPANY_ARCHIVED",
                        "NETWORK_ERROR",
                        "COUNTRY_NOT_FOUND",
                        "AGENT_TIMEOUT",
                        "TOOL_EXECUTION_ERROR",
                        "LEGACY_APPROVAL_UNSUPPORTED",
                        "MODEL_ERROR",
                        "AGENT_CANCELLED",
                        "SUSPICIOUS_CONTENT_DETECTED",
                        "IMPORT_MOVED_TO_DATA_IMPORTS",
                        "INVALID_PORTAL",
                        "INVALID_PORTAL_FOR_RUNS",
                        "INVALID_PORTAL_FOR_STATS",
                        "ACCESSMODE_USER_MISMATCH",
                        "ACCESSMODE_TENANT_MISMATCH",
                        "ACCESSMODE_COMPANY_MISMATCH",
                        "ORG_PROVISIONING_FAILED"
                      ],
                      "description": "Error code (ErrorCode type)",
                      "example": "NOT_FOUND"
                    },
                    "message": {
                      "type": "string",
                      "description": "Localized error message (via translateError() with i18n keys)",
                      "example": "Company not found"
                    },
                    "details": {
                      "type": "object",
                      "description": "Optional error details (validation errors, etc.)",
                      "additionalProperties": true
                    },
                    "field": {
                      "type": "string",
                      "description": "Optional field name for validation errors",
                      "example": "email"
                    },
                    "correlationId": {
                      "type": "string",
                      "description": "Request correlation ID for debugging",
                      "example": "req-1234567890"
                    },
                    "requestId": {
                      "type": "string",
                      "description": "Request ID for tracing",
                      "example": "req-9876543210"
                    }
                  }
                }
              }
            },
            "example": {
              "error": {
                "code": "UNAUTHORIZED",
                "message": "Authentication required"
              }
            }
          }
        },
        "headers": {
          "X-API-Version": {
            "description": "API semantic version.",
            "schema": {
              "type": "string"
            },
            "example": "0.3.0"
          },
          "X-API-Path-Version": {
            "description": "API URL version prefix.",
            "schema": {
              "type": "string"
            },
            "example": "v1"
          }
        }
      },
      "ForbiddenError": {
        "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "error"
              ],
              "properties": {
                "error": {
                  "type": "object",
                  "required": [
                    "code",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "UNAUTHORIZED",
                        "FORBIDDEN",
                        "NOT_FOUND",
                        "VALIDATION_ERROR",
                        "CONFLICT",
                        "INTERNAL_ERROR",
                        "SERVICE_UNAVAILABLE",
                        "BAD_REQUEST",
                        "PAYMENT_REQUIRED",
                        "RATE_LIMIT_EXCEEDED",
                        "MODULE_NOT_ENABLED",
                        "PERMISSION_DENIED",
                        "COMPANY_NOT_ACTIVE",
                        "TENANT_NOT_ACTIVE",
                        "INVALID_TOKEN",
                        "TOKEN_EXPIRED",
                        "INVITATION_EXPIRED",
                        "INVALID_CREDENTIALS",
                        "EMAIL_NOT_VERIFIED",
                        "DATA_INTEGRITY_GUARD",
                        "SSO_PROVISIONING_REQUIRED",
                        "MFA_SETUP_REQUIRED",
                        "MFA_VERIFICATION_REQUIRED",
                        "MFA_STEP_UP_REQUIRED",
                        "USER_SUSPENDED",
                        "COMPANY_ARCHIVED",
                        "NETWORK_ERROR",
                        "COUNTRY_NOT_FOUND",
                        "AGENT_TIMEOUT",
                        "TOOL_EXECUTION_ERROR",
                        "LEGACY_APPROVAL_UNSUPPORTED",
                        "MODEL_ERROR",
                        "AGENT_CANCELLED",
                        "SUSPICIOUS_CONTENT_DETECTED",
                        "IMPORT_MOVED_TO_DATA_IMPORTS",
                        "INVALID_PORTAL",
                        "INVALID_PORTAL_FOR_RUNS",
                        "INVALID_PORTAL_FOR_STATS",
                        "ACCESSMODE_USER_MISMATCH",
                        "ACCESSMODE_TENANT_MISMATCH",
                        "ACCESSMODE_COMPANY_MISMATCH",
                        "ORG_PROVISIONING_FAILED"
                      ],
                      "description": "Error code (ErrorCode type)",
                      "example": "NOT_FOUND"
                    },
                    "message": {
                      "type": "string",
                      "description": "Localized error message (via translateError() with i18n keys)",
                      "example": "Company not found"
                    },
                    "details": {
                      "type": "object",
                      "description": "Optional error details (validation errors, etc.)",
                      "additionalProperties": true
                    },
                    "field": {
                      "type": "string",
                      "description": "Optional field name for validation errors",
                      "example": "email"
                    },
                    "correlationId": {
                      "type": "string",
                      "description": "Request correlation ID for debugging",
                      "example": "req-1234567890"
                    },
                    "requestId": {
                      "type": "string",
                      "description": "Request ID for tracing",
                      "example": "req-9876543210"
                    }
                  }
                }
              }
            },
            "example": {
              "error": {
                "code": "FORBIDDEN",
                "message": "Insufficient permissions",
                "details": {
                  "requiredPermission": "TASKS:READ"
                }
              }
            }
          }
        },
        "headers": {
          "X-API-Version": {
            "description": "API semantic version.",
            "schema": {
              "type": "string"
            },
            "example": "0.3.0"
          },
          "X-API-Path-Version": {
            "description": "API URL version prefix.",
            "schema": {
              "type": "string"
            },
            "example": "v1"
          }
        }
      },
      "NotFoundError": {
        "description": "Not Found (404)",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "error"
              ],
              "properties": {
                "error": {
                  "type": "object",
                  "required": [
                    "code",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "UNAUTHORIZED",
                        "FORBIDDEN",
                        "NOT_FOUND",
                        "VALIDATION_ERROR",
                        "CONFLICT",
                        "INTERNAL_ERROR",
                        "SERVICE_UNAVAILABLE",
                        "BAD_REQUEST",
                        "PAYMENT_REQUIRED",
                        "RATE_LIMIT_EXCEEDED",
                        "MODULE_NOT_ENABLED",
                        "PERMISSION_DENIED",
                        "COMPANY_NOT_ACTIVE",
                        "TENANT_NOT_ACTIVE",
                        "INVALID_TOKEN",
                        "TOKEN_EXPIRED",
                        "INVITATION_EXPIRED",
                        "INVALID_CREDENTIALS",
                        "EMAIL_NOT_VERIFIED",
                        "DATA_INTEGRITY_GUARD",
                        "SSO_PROVISIONING_REQUIRED",
                        "MFA_SETUP_REQUIRED",
                        "MFA_VERIFICATION_REQUIRED",
                        "MFA_STEP_UP_REQUIRED",
                        "USER_SUSPENDED",
                        "COMPANY_ARCHIVED",
                        "NETWORK_ERROR",
                        "COUNTRY_NOT_FOUND",
                        "AGENT_TIMEOUT",
                        "TOOL_EXECUTION_ERROR",
                        "LEGACY_APPROVAL_UNSUPPORTED",
                        "MODEL_ERROR",
                        "AGENT_CANCELLED",
                        "SUSPICIOUS_CONTENT_DETECTED",
                        "IMPORT_MOVED_TO_DATA_IMPORTS",
                        "INVALID_PORTAL",
                        "INVALID_PORTAL_FOR_RUNS",
                        "INVALID_PORTAL_FOR_STATS",
                        "ACCESSMODE_USER_MISMATCH",
                        "ACCESSMODE_TENANT_MISMATCH",
                        "ACCESSMODE_COMPANY_MISMATCH",
                        "ORG_PROVISIONING_FAILED"
                      ],
                      "description": "Error code (ErrorCode type)",
                      "example": "NOT_FOUND"
                    },
                    "message": {
                      "type": "string",
                      "description": "Localized error message (via translateError() with i18n keys)",
                      "example": "Company not found"
                    },
                    "details": {
                      "type": "object",
                      "description": "Optional error details (validation errors, etc.)",
                      "additionalProperties": true
                    },
                    "field": {
                      "type": "string",
                      "description": "Optional field name for validation errors",
                      "example": "email"
                    },
                    "correlationId": {
                      "type": "string",
                      "description": "Request correlation ID for debugging",
                      "example": "req-1234567890"
                    },
                    "requestId": {
                      "type": "string",
                      "description": "Request ID for tracing",
                      "example": "req-9876543210"
                    }
                  }
                }
              }
            },
            "example": {
              "error": {
                "code": "NOT_FOUND",
                "message": "Resource not found"
              }
            }
          }
        },
        "headers": {
          "X-API-Version": {
            "description": "API semantic version.",
            "schema": {
              "type": "string"
            },
            "example": "0.3.0"
          },
          "X-API-Path-Version": {
            "description": "API URL version prefix.",
            "schema": {
              "type": "string"
            },
            "example": "v1"
          }
        }
      },
      "ValidationError": {
        "description": "Validation Error (422) - Invalid request body or parameters",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "error"
              ],
              "properties": {
                "error": {
                  "type": "object",
                  "required": [
                    "code",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "UNAUTHORIZED",
                        "FORBIDDEN",
                        "NOT_FOUND",
                        "VALIDATION_ERROR",
                        "CONFLICT",
                        "INTERNAL_ERROR",
                        "SERVICE_UNAVAILABLE",
                        "BAD_REQUEST",
                        "PAYMENT_REQUIRED",
                        "RATE_LIMIT_EXCEEDED",
                        "MODULE_NOT_ENABLED",
                        "PERMISSION_DENIED",
                        "COMPANY_NOT_ACTIVE",
                        "TENANT_NOT_ACTIVE",
                        "INVALID_TOKEN",
                        "TOKEN_EXPIRED",
                        "INVITATION_EXPIRED",
                        "INVALID_CREDENTIALS",
                        "EMAIL_NOT_VERIFIED",
                        "DATA_INTEGRITY_GUARD",
                        "SSO_PROVISIONING_REQUIRED",
                        "MFA_SETUP_REQUIRED",
                        "MFA_VERIFICATION_REQUIRED",
                        "MFA_STEP_UP_REQUIRED",
                        "USER_SUSPENDED",
                        "COMPANY_ARCHIVED",
                        "NETWORK_ERROR",
                        "COUNTRY_NOT_FOUND",
                        "AGENT_TIMEOUT",
                        "TOOL_EXECUTION_ERROR",
                        "LEGACY_APPROVAL_UNSUPPORTED",
                        "MODEL_ERROR",
                        "AGENT_CANCELLED",
                        "SUSPICIOUS_CONTENT_DETECTED",
                        "IMPORT_MOVED_TO_DATA_IMPORTS",
                        "INVALID_PORTAL",
                        "INVALID_PORTAL_FOR_RUNS",
                        "INVALID_PORTAL_FOR_STATS",
                        "ACCESSMODE_USER_MISMATCH",
                        "ACCESSMODE_TENANT_MISMATCH",
                        "ACCESSMODE_COMPANY_MISMATCH",
                        "ORG_PROVISIONING_FAILED"
                      ],
                      "description": "Error code (ErrorCode type)",
                      "example": "NOT_FOUND"
                    },
                    "message": {
                      "type": "string",
                      "description": "Localized error message (via translateError() with i18n keys)",
                      "example": "Company not found"
                    },
                    "details": {
                      "type": "object",
                      "description": "Optional error details (validation errors, etc.)",
                      "additionalProperties": true
                    },
                    "field": {
                      "type": "string",
                      "description": "Optional field name for validation errors",
                      "example": "email"
                    },
                    "correlationId": {
                      "type": "string",
                      "description": "Request correlation ID for debugging",
                      "example": "req-1234567890"
                    },
                    "requestId": {
                      "type": "string",
                      "description": "Request ID for tracing",
                      "example": "req-9876543210"
                    }
                  }
                }
              }
            },
            "example": {
              "error": {
                "code": "VALIDATION_ERROR",
                "message": "Validation error",
                "details": {
                  "email": "Invalid email format",
                  "password": "Password must be at least 8 characters"
                }
              }
            }
          }
        },
        "headers": {
          "X-API-Version": {
            "description": "API semantic version.",
            "schema": {
              "type": "string"
            },
            "example": "0.3.0"
          },
          "X-API-Path-Version": {
            "description": "API URL version prefix.",
            "schema": {
              "type": "string"
            },
            "example": "v1"
          }
        }
      },
      "ConflictError": {
        "description": "Conflict (409) - Resource conflict (e.g., duplicate email, concurrent modification)",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "error"
              ],
              "properties": {
                "error": {
                  "type": "object",
                  "required": [
                    "code",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "UNAUTHORIZED",
                        "FORBIDDEN",
                        "NOT_FOUND",
                        "VALIDATION_ERROR",
                        "CONFLICT",
                        "INTERNAL_ERROR",
                        "SERVICE_UNAVAILABLE",
                        "BAD_REQUEST",
                        "PAYMENT_REQUIRED",
                        "RATE_LIMIT_EXCEEDED",
                        "MODULE_NOT_ENABLED",
                        "PERMISSION_DENIED",
                        "COMPANY_NOT_ACTIVE",
                        "TENANT_NOT_ACTIVE",
                        "INVALID_TOKEN",
                        "TOKEN_EXPIRED",
                        "INVITATION_EXPIRED",
                        "INVALID_CREDENTIALS",
                        "EMAIL_NOT_VERIFIED",
                        "DATA_INTEGRITY_GUARD",
                        "SSO_PROVISIONING_REQUIRED",
                        "MFA_SETUP_REQUIRED",
                        "MFA_VERIFICATION_REQUIRED",
                        "MFA_STEP_UP_REQUIRED",
                        "USER_SUSPENDED",
                        "COMPANY_ARCHIVED",
                        "NETWORK_ERROR",
                        "COUNTRY_NOT_FOUND",
                        "AGENT_TIMEOUT",
                        "TOOL_EXECUTION_ERROR",
                        "LEGACY_APPROVAL_UNSUPPORTED",
                        "MODEL_ERROR",
                        "AGENT_CANCELLED",
                        "SUSPICIOUS_CONTENT_DETECTED",
                        "IMPORT_MOVED_TO_DATA_IMPORTS",
                        "INVALID_PORTAL",
                        "INVALID_PORTAL_FOR_RUNS",
                        "INVALID_PORTAL_FOR_STATS",
                        "ACCESSMODE_USER_MISMATCH",
                        "ACCESSMODE_TENANT_MISMATCH",
                        "ACCESSMODE_COMPANY_MISMATCH",
                        "ORG_PROVISIONING_FAILED"
                      ],
                      "description": "Error code (ErrorCode type)",
                      "example": "NOT_FOUND"
                    },
                    "message": {
                      "type": "string",
                      "description": "Localized error message (via translateError() with i18n keys)",
                      "example": "Company not found"
                    },
                    "details": {
                      "type": "object",
                      "description": "Optional error details (validation errors, etc.)",
                      "additionalProperties": true
                    },
                    "field": {
                      "type": "string",
                      "description": "Optional field name for validation errors",
                      "example": "email"
                    },
                    "correlationId": {
                      "type": "string",
                      "description": "Request correlation ID for debugging",
                      "example": "req-1234567890"
                    },
                    "requestId": {
                      "type": "string",
                      "description": "Request ID for tracing",
                      "example": "req-9876543210"
                    }
                  }
                }
              }
            },
            "example": {
              "error": {
                "code": "CONFLICT",
                "message": "Resource conflict",
                "details": {
                  "field": "email",
                  "reason": "Email already exists"
                }
              }
            }
          }
        },
        "headers": {
          "X-API-Version": {
            "description": "API semantic version.",
            "schema": {
              "type": "string"
            },
            "example": "0.3.0"
          },
          "X-API-Path-Version": {
            "description": "API URL version prefix.",
            "schema": {
              "type": "string"
            },
            "example": "v1"
          }
        }
      },
      "InternalError": {
        "description": "Internal Server Error (500)",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "error"
              ],
              "properties": {
                "error": {
                  "type": "object",
                  "required": [
                    "code",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "UNAUTHORIZED",
                        "FORBIDDEN",
                        "NOT_FOUND",
                        "VALIDATION_ERROR",
                        "CONFLICT",
                        "INTERNAL_ERROR",
                        "SERVICE_UNAVAILABLE",
                        "BAD_REQUEST",
                        "PAYMENT_REQUIRED",
                        "RATE_LIMIT_EXCEEDED",
                        "MODULE_NOT_ENABLED",
                        "PERMISSION_DENIED",
                        "COMPANY_NOT_ACTIVE",
                        "TENANT_NOT_ACTIVE",
                        "INVALID_TOKEN",
                        "TOKEN_EXPIRED",
                        "INVITATION_EXPIRED",
                        "INVALID_CREDENTIALS",
                        "EMAIL_NOT_VERIFIED",
                        "DATA_INTEGRITY_GUARD",
                        "SSO_PROVISIONING_REQUIRED",
                        "MFA_SETUP_REQUIRED",
                        "MFA_VERIFICATION_REQUIRED",
                        "MFA_STEP_UP_REQUIRED",
                        "USER_SUSPENDED",
                        "COMPANY_ARCHIVED",
                        "NETWORK_ERROR",
                        "COUNTRY_NOT_FOUND",
                        "AGENT_TIMEOUT",
                        "TOOL_EXECUTION_ERROR",
                        "LEGACY_APPROVAL_UNSUPPORTED",
                        "MODEL_ERROR",
                        "AGENT_CANCELLED",
                        "SUSPICIOUS_CONTENT_DETECTED",
                        "IMPORT_MOVED_TO_DATA_IMPORTS",
                        "INVALID_PORTAL",
                        "INVALID_PORTAL_FOR_RUNS",
                        "INVALID_PORTAL_FOR_STATS",
                        "ACCESSMODE_USER_MISMATCH",
                        "ACCESSMODE_TENANT_MISMATCH",
                        "ACCESSMODE_COMPANY_MISMATCH",
                        "ORG_PROVISIONING_FAILED"
                      ],
                      "description": "Error code (ErrorCode type)",
                      "example": "NOT_FOUND"
                    },
                    "message": {
                      "type": "string",
                      "description": "Localized error message (via translateError() with i18n keys)",
                      "example": "Company not found"
                    },
                    "details": {
                      "type": "object",
                      "description": "Optional error details (validation errors, etc.)",
                      "additionalProperties": true
                    },
                    "field": {
                      "type": "string",
                      "description": "Optional field name for validation errors",
                      "example": "email"
                    },
                    "correlationId": {
                      "type": "string",
                      "description": "Request correlation ID for debugging",
                      "example": "req-1234567890"
                    },
                    "requestId": {
                      "type": "string",
                      "description": "Request ID for tracing",
                      "example": "req-9876543210"
                    }
                  }
                }
              }
            },
            "example": {
              "error": {
                "code": "INTERNAL_ERROR",
                "message": "Internal server error"
              }
            }
          }
        },
        "headers": {
          "X-API-Version": {
            "description": "API semantic version.",
            "schema": {
              "type": "string"
            },
            "example": "0.3.0"
          },
          "X-API-Path-Version": {
            "description": "API URL version prefix.",
            "schema": {
              "type": "string"
            },
            "example": "v1"
          }
        }
      },
      "RateLimitError": {
        "description": "Rate Limit Exceeded (429)",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "error"
              ],
              "properties": {
                "error": {
                  "type": "object",
                  "required": [
                    "code",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "UNAUTHORIZED",
                        "FORBIDDEN",
                        "NOT_FOUND",
                        "VALIDATION_ERROR",
                        "CONFLICT",
                        "INTERNAL_ERROR",
                        "SERVICE_UNAVAILABLE",
                        "BAD_REQUEST",
                        "PAYMENT_REQUIRED",
                        "RATE_LIMIT_EXCEEDED",
                        "MODULE_NOT_ENABLED",
                        "PERMISSION_DENIED",
                        "COMPANY_NOT_ACTIVE",
                        "TENANT_NOT_ACTIVE",
                        "INVALID_TOKEN",
                        "TOKEN_EXPIRED",
                        "INVITATION_EXPIRED",
                        "INVALID_CREDENTIALS",
                        "EMAIL_NOT_VERIFIED",
                        "DATA_INTEGRITY_GUARD",
                        "SSO_PROVISIONING_REQUIRED",
                        "MFA_SETUP_REQUIRED",
                        "MFA_VERIFICATION_REQUIRED",
                        "MFA_STEP_UP_REQUIRED",
                        "USER_SUSPENDED",
                        "COMPANY_ARCHIVED",
                        "NETWORK_ERROR",
                        "COUNTRY_NOT_FOUND",
                        "AGENT_TIMEOUT",
                        "TOOL_EXECUTION_ERROR",
                        "LEGACY_APPROVAL_UNSUPPORTED",
                        "MODEL_ERROR",
                        "AGENT_CANCELLED",
                        "SUSPICIOUS_CONTENT_DETECTED",
                        "IMPORT_MOVED_TO_DATA_IMPORTS",
                        "INVALID_PORTAL",
                        "INVALID_PORTAL_FOR_RUNS",
                        "INVALID_PORTAL_FOR_STATS",
                        "ACCESSMODE_USER_MISMATCH",
                        "ACCESSMODE_TENANT_MISMATCH",
                        "ACCESSMODE_COMPANY_MISMATCH",
                        "ORG_PROVISIONING_FAILED"
                      ],
                      "description": "Error code (ErrorCode type)",
                      "example": "NOT_FOUND"
                    },
                    "message": {
                      "type": "string",
                      "description": "Localized error message (via translateError() with i18n keys)",
                      "example": "Company not found"
                    },
                    "details": {
                      "type": "object",
                      "description": "Optional error details (validation errors, etc.)",
                      "additionalProperties": true
                    },
                    "field": {
                      "type": "string",
                      "description": "Optional field name for validation errors",
                      "example": "email"
                    },
                    "correlationId": {
                      "type": "string",
                      "description": "Request correlation ID for debugging",
                      "example": "req-1234567890"
                    },
                    "requestId": {
                      "type": "string",
                      "description": "Request ID for tracing",
                      "example": "req-9876543210"
                    }
                  }
                }
              }
            },
            "example": {
              "error": {
                "code": "RATE_LIMIT_EXCEEDED",
                "message": "Rate limit exceeded"
              }
            }
          }
        },
        "headers": {
          "X-API-Version": {
            "description": "API semantic version.",
            "schema": {
              "type": "string"
            },
            "example": "0.3.0"
          },
          "X-API-Path-Version": {
            "description": "API URL version prefix.",
            "schema": {
              "type": "string"
            },
            "example": "v1"
          }
        }
      },
      "PaymentRequiredError": {
        "description": "Payment Required (402) - Subscription payment required",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "error"
              ],
              "properties": {
                "error": {
                  "type": "object",
                  "required": [
                    "code",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "UNAUTHORIZED",
                        "FORBIDDEN",
                        "NOT_FOUND",
                        "VALIDATION_ERROR",
                        "CONFLICT",
                        "INTERNAL_ERROR",
                        "SERVICE_UNAVAILABLE",
                        "BAD_REQUEST",
                        "PAYMENT_REQUIRED",
                        "RATE_LIMIT_EXCEEDED",
                        "MODULE_NOT_ENABLED",
                        "PERMISSION_DENIED",
                        "COMPANY_NOT_ACTIVE",
                        "TENANT_NOT_ACTIVE",
                        "INVALID_TOKEN",
                        "TOKEN_EXPIRED",
                        "INVITATION_EXPIRED",
                        "INVALID_CREDENTIALS",
                        "EMAIL_NOT_VERIFIED",
                        "DATA_INTEGRITY_GUARD",
                        "SSO_PROVISIONING_REQUIRED",
                        "MFA_SETUP_REQUIRED",
                        "MFA_VERIFICATION_REQUIRED",
                        "MFA_STEP_UP_REQUIRED",
                        "USER_SUSPENDED",
                        "COMPANY_ARCHIVED",
                        "NETWORK_ERROR",
                        "COUNTRY_NOT_FOUND",
                        "AGENT_TIMEOUT",
                        "TOOL_EXECUTION_ERROR",
                        "LEGACY_APPROVAL_UNSUPPORTED",
                        "MODEL_ERROR",
                        "AGENT_CANCELLED",
                        "SUSPICIOUS_CONTENT_DETECTED",
                        "IMPORT_MOVED_TO_DATA_IMPORTS",
                        "INVALID_PORTAL",
                        "INVALID_PORTAL_FOR_RUNS",
                        "INVALID_PORTAL_FOR_STATS",
                        "ACCESSMODE_USER_MISMATCH",
                        "ACCESSMODE_TENANT_MISMATCH",
                        "ACCESSMODE_COMPANY_MISMATCH",
                        "ORG_PROVISIONING_FAILED"
                      ],
                      "description": "Error code (ErrorCode type)",
                      "example": "NOT_FOUND"
                    },
                    "message": {
                      "type": "string",
                      "description": "Localized error message (via translateError() with i18n keys)",
                      "example": "Company not found"
                    },
                    "details": {
                      "type": "object",
                      "description": "Optional error details (validation errors, etc.)",
                      "additionalProperties": true
                    },
                    "field": {
                      "type": "string",
                      "description": "Optional field name for validation errors",
                      "example": "email"
                    },
                    "correlationId": {
                      "type": "string",
                      "description": "Request correlation ID for debugging",
                      "example": "req-1234567890"
                    },
                    "requestId": {
                      "type": "string",
                      "description": "Request ID for tracing",
                      "example": "req-9876543210"
                    }
                  }
                }
              }
            },
            "example": {
              "error": {
                "code": "PAYMENT_REQUIRED",
                "message": "Payment required to access this feature"
              }
            }
          }
        },
        "headers": {
          "X-API-Version": {
            "description": "API semantic version.",
            "schema": {
              "type": "string"
            },
            "example": "0.3.0"
          },
          "X-API-Path-Version": {
            "description": "API URL version prefix.",
            "schema": {
              "type": "string"
            },
            "example": "v1"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Authentication",
      "description": "Authentication and authorization endpoints"
    }
  ],
  "paths": {
    "/contact": {
      "post": {
        "operationId": "submitContactForm",
        "summary": "Submit a public contact request",
        "description": "Accepts the public contact form, applies anti-abuse checks, and either creates a support ticket or stores an email-only submission depending on category.",
        "tags": [
          "Public"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "subject",
                  "message",
                  "category"
                ],
                "properties": {
                  "subject": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "category": {
                    "type": "string",
                    "enum": [
                      "general",
                      "support",
                      "sales",
                      "technical",
                      "billing",
                      "partner",
                      "other"
                    ]
                  },
                  "requesterEmail": {
                    "type": "string",
                    "format": "email"
                  },
                  "requesterDisplayName": {
                    "type": "string"
                  },
                  "recaptchaToken": {
                    "type": "string"
                  },
                  "websiteField": {
                    "type": "string"
                  },
                  "sourcePath": {
                    "type": "string"
                  },
                  "sourceContext": {
                    "type": "object",
                    "properties": {
                      "url": {
                        "type": "string"
                      },
                      "pathname": {
                        "type": "string"
                      },
                      "search": {
                        "type": "string"
                      },
                      "hash": {
                        "type": "string"
                      },
                      "referrer": {
                        "type": "string"
                      },
                      "userAgent": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional idempotency key for safe retries."
          }
        ],
        "responses": {
          "200": {
            "description": "Contact request accepted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "message",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "required": [
                        "channel",
                        "ticketId",
                        "contactSubmissionId"
                      ],
                      "properties": {
                        "channel": {
                          "type": "string",
                          "enum": [
                            "ticket",
                            "email_only"
                          ]
                        },
                        "ticketId": {
                          "type": "string",
                          "nullable": true
                        },
                        "contactSubmissionId": {
                          "type": "string",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "429": {
            "description": "Rate Limit Exceeded (429)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMIT_EXCEEDED",
                    "message": "Rate limit exceeded"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      }
    },
    "/auth/mfa/verify": {
      "post": {
        "operationId": "verifyMfa",
        "summary": "Verify MFA code",
        "description": "Verify MFA TOTP code for sensitive operations or during login",
        "tags": [
          "Authentication"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "code"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "minLength": 6,
                    "maxLength": 8,
                    "description": "6-digit TOTP verification code or 8-character backup code"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "MFA code verified successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "description": "Always true for successful responses"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data (structure varies by endpoint)",
                      "additionalProperties": true
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      }
    },
    "/auth/mfa/trusted-devices": {
      "get": {
        "operationId": "listMfaTrustedDevices",
        "summary": "List trusted MFA devices",
        "description": "Returns active trusted devices for the authenticated user.",
        "tags": [
          "Authentication"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Trusted devices list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "description": "Always true for successful responses"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data (structure varies by endpoint)",
                      "additionalProperties": true
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      }
    },
    "/auth/mfa/trusted-devices/{deviceId}": {
      "delete": {
        "operationId": "revokeMfaTrustedDevice",
        "summary": "Revoke one trusted MFA device",
        "description": "Revokes a specific trusted device for the authenticated user.",
        "tags": [
          "Authentication"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "deviceId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Device revoked",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "description": "Always true for successful responses"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data (structure varies by endpoint)",
                      "additionalProperties": true
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      },
      "parameters": [
        {
          "name": "deviceId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ]
    },
    "/auth/mfa/trusted-devices/revoke-all": {
      "post": {
        "operationId": "revokeAllMfaTrustedDevices",
        "summary": "Revoke all trusted MFA devices",
        "description": "Revokes all trusted devices for the authenticated user.",
        "tags": [
          "Authentication"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Devices revoked",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "description": "Always true for successful responses"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data (structure varies by endpoint)",
                      "additionalProperties": true
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      }
    },
    "/auth/mfa/status": {
      "get": {
        "operationId": "getMfaStatus",
        "summary": "Get MFA status",
        "description": "Get multi-factor authentication status for current user",
        "tags": [
          "Authentication"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "MFA status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "description": "Always true for successful responses"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data (structure varies by endpoint)",
                      "additionalProperties": true
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      }
    },
    "/auth/mfa/enable": {
      "post": {
        "operationId": "enableMfa",
        "summary": "Start MFA setup",
        "description": "Start MFA setup process. Returns secret and QR code URL for TOTP app configuration.",
        "tags": [
          "Authentication"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "password"
                ],
                "properties": {
                  "password": {
                    "type": "string",
                    "minLength": 1,
                    "description": "User password for verification"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "MFA setup started, secret and QR code returned",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "description": "Always true for successful responses"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data (structure varies by endpoint)",
                      "additionalProperties": true
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      }
    },
    "/auth/mfa/verify-setup": {
      "post": {
        "operationId": "verifyMfaSetup",
        "summary": "Complete MFA setup",
        "description": "Complete MFA setup by verifying TOTP code. Returns backup codes.",
        "tags": [
          "Authentication"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "code",
                  "secret"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "minLength": 6,
                    "maxLength": 6,
                    "description": "TOTP verification code"
                  },
                  "secret": {
                    "type": "string",
                    "minLength": 1,
                    "description": "MFA secret from enable step"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "MFA setup completed, backup codes returned",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "description": "Always true for successful responses"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data (structure varies by endpoint)",
                      "additionalProperties": true
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      }
    },
    "/auth/mfa/disable": {
      "post": {
        "operationId": "disableMfa",
        "summary": "Disable MFA",
        "description": "Disable multi-factor authentication for current user. Requires password verification.",
        "tags": [
          "Authentication"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "password"
                ],
                "properties": {
                  "password": {
                    "type": "string",
                    "minLength": 1,
                    "description": "User password for verification"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "MFA disabled successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "description": "Always true for successful responses"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data (structure varies by endpoint)",
                      "additionalProperties": true
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      }
    },
    "/auth/mfa/backup-codes/regenerate": {
      "post": {
        "operationId": "regenerateMfaBackupCodes",
        "summary": "Regenerate MFA backup codes",
        "description": "Regenerate backup codes for MFA. Requires password verification.",
        "tags": [
          "Authentication"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "password"
                ],
                "properties": {
                  "password": {
                    "type": "string",
                    "minLength": 1,
                    "description": "User password for verification"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Backup codes regenerated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "description": "Always true for successful responses"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data (structure varies by endpoint)",
                      "additionalProperties": true
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      }
    },
    "/auth/sso/google": {
      "get": {
        "operationId": "initiateGoogleSSO",
        "summary": "Initiate Google SSO login",
        "description": "Get Google SSO authorization URL and state token",
        "tags": [
          "Auth",
          "SSO"
        ],
        "responses": {
          "200": {
            "description": "SSO authorization URL and state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "authUrl": {
                      "type": "string",
                      "description": "Google authorization URL"
                    },
                    "state": {
                      "type": "string",
                      "description": "State token for CSRF protection"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      }
    },
    "/auth/sso/microsoft": {
      "get": {
        "operationId": "initiateMicrosoftSSO",
        "summary": "Initiate Microsoft SSO login",
        "description": "Get Microsoft SSO authorization URL and state token",
        "tags": [
          "Auth",
          "SSO"
        ],
        "responses": {
          "200": {
            "description": "SSO authorization URL and state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "authUrl": {
                      "type": "string",
                      "description": "Microsoft authorization URL"
                    },
                    "state": {
                      "type": "string",
                      "description": "State token for CSRF protection"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      }
    },
    "/auth/sso/saml": {
      "get": {
        "operationId": "initiateSAMLSSO",
        "summary": "Initiate SAML SSO login",
        "description": "Get SAML SSO authorization URL and state token",
        "tags": [
          "Auth",
          "SSO"
        ],
        "responses": {
          "200": {
            "description": "SSO authorization URL and state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "authUrl": {
                      "type": "string",
                      "description": "SAML authorization URL"
                    },
                    "state": {
                      "type": "string",
                      "description": "State token for CSRF protection"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      }
    },
    "/auth/sso/callback": {
      "post": {
        "operationId": "handleSSOCallback",
        "summary": "Handle SSO callback",
        "description": "Handle SSO callback from OAuth or SAML provider",
        "tags": [
          "Auth",
          "SSO"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "provider",
                  "state"
                ],
                "properties": {
                  "provider": {
                    "type": "string",
                    "enum": [
                      "google",
                      "microsoft",
                      "saml"
                    ],
                    "description": "SSO provider"
                  },
                  "code": {
                    "type": "string",
                    "description": "OAuth authorization code"
                  },
                  "state": {
                    "type": "string",
                    "description": "State token for CSRF protection"
                  },
                  "samlResponse": {
                    "type": "string",
                    "description": "SAML response (base64)"
                  },
                  "relayState": {
                    "type": "string",
                    "description": "SAML RelayState"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "SSO authentication successful",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "description": "Always true for successful responses"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data (structure varies by endpoint)",
                      "additionalProperties": true
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      }
    },
    "/auth/refresh": {
      "post": {
        "operationId": "refreshToken",
        "summary": "Refresh access token",
        "description": "Refresh access token using refresh token (from body or HttpOnly cookie). Returns new tokens in HttpOnly cookies.",
        "tags": [
          "Authentication"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "refreshToken": {
                    "type": "string",
                    "description": "Refresh token (optional if provided in HttpOnly cookie)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Token refreshed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "description": "Always true for successful responses"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data (structure varies by endpoint)",
                      "additionalProperties": true
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      }
    },
    "/auth/logout": {
      "post": {
        "operationId": "logout",
        "summary": "User logout",
        "description": "Logout user and revoke current session. Clears authentication cookies.",
        "tags": [
          "Authentication"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Logout successful",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "description": "Always true for successful responses"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data (structure varies by endpoint)",
                      "additionalProperties": true
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      }
    },
    "/auth/sessions": {
      "get": {
        "operationId": "getSessions",
        "summary": "Get active sessions",
        "description": "Get all active sessions for current user",
        "tags": [
          "Authentication"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List of active sessions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "description": "Always true for successful responses"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data (structure varies by endpoint)",
                      "additionalProperties": true
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      }
    },
    "/auth/sessions/{sessionId}": {
      "delete": {
        "operationId": "revokeSession",
        "summary": "Revoke session",
        "description": "Revoke a specific user session by session ID",
        "tags": [
          "Authentication"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Session ID to revoke"
          }
        ],
        "responses": {
          "200": {
            "description": "Session revoked successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "description": "Always true for successful responses"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data (structure varies by endpoint)",
                      "additionalProperties": true
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "404": {
            "description": "Not Found (404)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      },
      "parameters": [
        {
          "name": "sessionId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ]
    },
    "/auth/devices/revoke-all": {
      "post": {
        "operationId": "revokeAllSessions",
        "summary": "Revoke all sessions",
        "description": "Revoke all user sessions except the current one",
        "tags": [
          "Authentication"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "All sessions revoked successfully (except current)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "description": "Always true for successful responses"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data (structure varies by endpoint)",
                      "additionalProperties": true
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      }
    },
    "/auth/verify-email": {
      "post": {
        "operationId": "verifyEmail",
        "summary": "Verify email address",
        "description": "Verify user email address using verification token. Returns access and refresh tokens in HttpOnly cookies.",
        "tags": [
          "Authentication"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "token"
                ],
                "properties": {
                  "token": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Email verification token"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Email verified successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "description": "Always true for successful responses"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data (structure varies by endpoint)",
                      "additionalProperties": true
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      }
    },
    "/auth/resend-verification-email": {
      "post": {
        "operationId": "resendVerificationEmail",
        "summary": "Resend verification email",
        "description": "Resend email verification email. Always returns success (does not reveal if user exists or is already verified).",
        "tags": [
          "Authentication"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "required": [
                      "email"
                    ],
                    "properties": {
                      "email": {
                        "type": "string",
                        "format": "email",
                        "description": "Email used to resend verification."
                      },
                      "token": {
                        "type": "string",
                        "description": "Optional existing verification token."
                      },
                      "recaptchaToken": {
                        "type": "string",
                        "description": "reCAPTCHA token (optional if AUTH_CAPTCHA_BYPASS=true)"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "token"
                    ],
                    "properties": {
                      "token": {
                        "type": "string",
                        "description": "Existing verification token used for direct retry from verify page."
                      },
                      "email": {
                        "type": "string",
                        "format": "email",
                        "description": "Optional fallback email."
                      },
                      "recaptchaToken": {
                        "type": "string",
                        "description": "reCAPTCHA token (optional if AUTH_CAPTCHA_BYPASS=true)"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Verification email sent (always returns success)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "description": "Always true for successful responses"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data (structure varies by endpoint)",
                      "additionalProperties": true
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "429": {
            "description": "Rate Limit Exceeded (429)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMIT_EXCEEDED",
                    "message": "Rate limit exceeded"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      }
    },
    "/auth/register": {
      "post": {
        "operationId": "register",
        "summary": "User registration",
        "description": "Register a new user and create tenant/company. Returns user, tenant, and company data.",
        "tags": [
          "Authentication"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email",
                  "password",
                  "firstName",
                  "lastName",
                  "domain",
                  "companyName",
                  "countryCode"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "password": {
                    "type": "string",
                    "minLength": 8,
                    "pattern": "^(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9]).+$"
                  },
                  "firstName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "lastName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "domain": {
                    "type": "string",
                    "description": "Organization domain (e.g., \"mazars.ch\")"
                  },
                  "companyName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "countryCode": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 2,
                    "pattern": "^[A-Z]{2}$",
                    "description": "ISO 3166-1 alpha-2 country code"
                  },
                  "timezone": {
                    "type": "string",
                    "description": "Browser-detected IANA timezone when available"
                  },
                  "recaptchaToken": {
                    "type": "string",
                    "description": "reCAPTCHA token (optional if AUTH_CAPTCHA_BYPASS=true)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Registration successful",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "description": "Always true for successful responses"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data (structure varies by endpoint)",
                      "additionalProperties": true
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "409": {
            "description": "Conflict (409) - Resource conflict (e.g., duplicate email, concurrent modification)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "Resource conflict",
                    "details": {
                      "field": "email",
                      "reason": "Email already exists"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "429": {
            "description": "Rate Limit Exceeded (429)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMIT_EXCEEDED",
                    "message": "Rate limit exceeded"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      }
    },
    "/auth/register-complete": {
      "post": {
        "operationId": "registerComplete",
        "summary": "Complete SSO registration",
        "description": "Complete SSO registration by creating tenant and company for existing user",
        "tags": [
          "Authentication"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "firstName",
                  "lastName",
                  "companyName",
                  "domain",
                  "countryCode"
                ],
                "properties": {
                  "firstName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "lastName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "companyName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "domain": {
                    "type": "string"
                  },
                  "countryCode": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 2,
                    "pattern": "^[A-Z]{2}$",
                    "description": "ISO 3166-1 alpha-2 country code"
                  },
                  "timezone": {
                    "type": "string",
                    "description": "Browser-detected IANA timezone when available"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Registration complete",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "description": "Always true for successful responses"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data (structure varies by endpoint)",
                      "additionalProperties": true
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "409": {
            "description": "Conflict (409) - Resource conflict (e.g., duplicate email, concurrent modification)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "Resource conflict",
                    "details": {
                      "field": "email",
                      "reason": "Email already exists"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "429": {
            "description": "Rate Limit Exceeded (429)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMIT_EXCEEDED",
                    "message": "Rate limit exceeded"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      }
    },
    "/auth/request-reset": {
      "post": {
        "operationId": "requestPasswordReset",
        "summary": "Request password reset",
        "description": "Request password reset by email. Always returns success to prevent user enumeration.",
        "tags": [
          "Authentication"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "recaptchaToken": {
                    "type": "string",
                    "description": "reCAPTCHA token (optional if AUTH_CAPTCHA_BYPASS=true)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Password reset email sent (always returns success)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "description": "Always true for successful responses"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data (structure varies by endpoint)",
                      "additionalProperties": true
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "429": {
            "description": "Rate Limit Exceeded (429)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMIT_EXCEEDED",
                    "message": "Rate limit exceeded"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      }
    },
    "/auth/reset-password": {
      "post": {
        "operationId": "resetPassword",
        "summary": "Reset password",
        "description": "Reset password using token from password reset email.",
        "tags": [
          "Authentication"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "token",
                  "password"
                ],
                "properties": {
                  "token": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Password reset token from email"
                  },
                  "password": {
                    "type": "string",
                    "minLength": 8
                  },
                  "recaptchaToken": {
                    "type": "string",
                    "description": "reCAPTCHA token (optional if AUTH_CAPTCHA_BYPASS=true)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Password reset successful",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "description": "Always true for successful responses"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data (structure varies by endpoint)",
                      "additionalProperties": true
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "429": {
            "description": "Rate Limit Exceeded (429)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMIT_EXCEEDED",
                    "message": "Rate limit exceeded"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      }
    },
    "/auth/partner-invitation/{token}": {
      "get": {
        "operationId": "getPartnerInvitationMetadata",
        "summary": "Get partner invitation metadata",
        "description": "Get partner-client invitation details by token (for frontend display before accepting)",
        "tags": [
          "Authentication"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Invitation token"
          }
        ],
        "responses": {
          "200": {
            "description": "Partner invitation metadata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "description": "Always true for successful responses"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data (structure varies by endpoint)",
                      "additionalProperties": true
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "404": {
            "description": "Not Found (404)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      },
      "parameters": [
        {
          "name": "token",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ]
    },
    "/auth/accept-partner-invitation": {
      "post": {
        "operationId": "acceptPartnerInvitation",
        "summary": "Accept partner client invitation",
        "description": "Accept a partner-client invitation by setting up a user account. Returns access and refresh tokens in HttpOnly cookies.",
        "tags": [
          "Authentication"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "token",
                  "firstName",
                  "lastName",
                  "password"
                ],
                "properties": {
                  "token": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Invitation token"
                  },
                  "firstName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "lastName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "password": {
                    "type": "string",
                    "minLength": 8
                  },
                  "timezone": {
                    "type": "string",
                    "description": "Browser-detected IANA timezone when available"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Invitation accepted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "description": "Always true for successful responses"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data (structure varies by endpoint)",
                      "additionalProperties": true
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "429": {
            "description": "Rate Limit Exceeded (429)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMIT_EXCEEDED",
                    "message": "Rate limit exceeded"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      }
    },
    "/auth/login": {
      "post": {
        "operationId": "login",
        "summary": "User login",
        "description": "Authenticate user with email and password. Returns access and refresh tokens in HttpOnly cookies.",
        "tags": [
          "Authentication"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email",
                  "password"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "password": {
                    "type": "string",
                    "minLength": 8
                  },
                  "rememberMe": {
                    "type": "boolean",
                    "default": false
                  },
                  "recaptchaToken": {
                    "type": "string",
                    "description": "reCAPTCHA token (optional if AUTH_CAPTCHA_BYPASS=true)"
                  },
                  "deviceLabel": {
                    "type": "string",
                    "description": "Optional device label for session tracking"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Login successful",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "description": "Always true for successful responses"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data (structure varies by endpoint)",
                      "additionalProperties": true
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "429": {
            "description": "Rate Limit Exceeded (429)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMIT_EXCEEDED",
                    "message": "Rate limit exceeded"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      }
    },
    "/auth/accept-invitation": {
      "post": {
        "operationId": "acceptInvitation",
        "summary": "Accept invitation",
        "description": "Accept user invitation by setting password. Returns access and refresh tokens in HttpOnly cookies.",
        "tags": [
          "Authentication"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "token",
                  "password",
                  "firstName",
                  "lastName"
                ],
                "properties": {
                  "token": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Invitation token"
                  },
                  "password": {
                    "type": "string",
                    "minLength": 8,
                    "pattern": "^(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9]).+$"
                  },
                  "firstName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "lastName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "timezone": {
                    "type": "string",
                    "description": "Browser-detected IANA timezone when available"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Invitation accepted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "description": "Always true for successful responses"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data (structure varies by endpoint)",
                      "additionalProperties": true
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "429": {
            "description": "Rate Limit Exceeded (429)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMIT_EXCEEDED",
                    "message": "Rate limit exceeded"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      }
    },
    "/auth/invitation/{token}": {
      "get": {
        "operationId": "getInvitationMetadata",
        "summary": "Get invitation metadata",
        "description": "Get invitation details by token (for frontend display before accepting)",
        "tags": [
          "Authentication"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Invitation token"
          }
        ],
        "responses": {
          "200": {
            "description": "Invitation metadata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "description": "Always true for successful responses"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data (structure varies by endpoint)",
                      "additionalProperties": true
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "404": {
            "description": "Not Found (404)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      },
      "parameters": [
        {
          "name": "token",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ]
    },
    "/auth/check-domain": {
      "get": {
        "operationId": "checkDomain",
        "summary": "Check domain availability",
        "description": "Check if a domain is available for organization registration (real-time validation)",
        "tags": [
          "Authentication"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "domain",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Domain name to check (e.g., \"example.com\")"
          }
        ],
        "responses": {
          "200": {
            "description": "Domain availability check result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "available": {
                      "type": "boolean",
                      "description": "Whether the domain is available"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "429": {
            "description": "Rate Limit Exceeded (429)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "RATE_LIMIT_EXCEEDED",
                    "message": "Rate limit exceeded"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      }
    },
    "/platform/catalog/connectors": {
      "get": {
        "operationId": "getPublicPlatformConnectors",
        "summary": "Get public platform connectors catalog",
        "tags": [
          "Public Platform"
        ],
        "responses": {
          "200": {
            "description": "Public platform connectors catalog",
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      }
    },
    "/platform/catalog/targets": {
      "get": {
        "operationId": "getPublicPlatformTargets",
        "summary": "Get public platform targets catalog",
        "tags": [
          "Public Platform"
        ],
        "responses": {
          "200": {
            "description": "Public platform targets catalog",
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      }
    },
    "/platform/openapi/external.json": {
      "get": {
        "operationId": "getPublicPlatformExternalOpenApi",
        "summary": "Get external platform OpenAPI specification",
        "tags": [
          "Public Platform"
        ],
        "responses": {
          "200": {
            "description": "Filtered external OpenAPI document",
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      }
    },
    "/countries": {
      "get": {
        "operationId": "listCountries",
        "summary": "List all countries",
        "description": "List onboarding-ready countries with their codes, names, currencies, and locales (public endpoint, no authentication required)",
        "tags": [
          "Public"
        ],
        "responses": {
          "200": {
            "description": "List of countries",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "countries": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "description": "ISO 3166-1 alpha-2 country code",
                                "example": "CH"
                              },
                              "name": {
                                "type": "string",
                                "description": "Country name",
                                "example": "Switzerland"
                              },
                              "currency": {
                                "type": "string",
                                "description": "ISO 4217 currency code",
                                "example": "CHF"
                              },
                              "locale": {
                                "type": "string",
                                "description": "Locale code",
                                "example": "fr-CH"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      }
    },
    "/countries/{code}/compliance": {
      "get": {
        "operationId": "getCountryCompliance",
        "summary": "Get country compliance configuration",
        "description": "Get the active compliance configuration for a country (public endpoint, no authentication required)",
        "tags": [
          "Public"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "code",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Z]{2}$"
            },
            "description": "ISO 3166-1 alpha-2 country code (e.g., \"CH\", \"FR\")"
          }
        ],
        "responses": {
          "200": {
            "description": "Country compliance configuration",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": {}
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "404": {
            "description": "Not Found (404)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      },
      "parameters": [
        {
          "name": "code",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ]
    },
    "/public/compliance-knowledge/search": {
      "get": {
        "operationId": "searchPublicComplianceKnowledge",
        "summary": "Search public compliance knowledge",
        "description": "Searches indexed compliance knowledge with public read-only access.",
        "tags": [
          "Public",
          "Compliance Knowledge"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "q",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "in": "query",
            "name": "countryCode",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Z]{2}$"
            }
          },
          {
            "in": "query",
            "name": "scope",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "general",
                "company",
                "invoice",
                "vatRules",
                "accountingPlan",
                "hr",
                "taxes",
                "reporting"
              ]
            }
          },
          {
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pdf",
                "web",
                "tool"
              ]
            }
          },
          {
            "in": "query",
            "name": "language",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 8
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Search results",
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      }
    },
    "/public/compliance-knowledge/stats": {
      "get": {
        "operationId": "getPublicComplianceKnowledgeStats",
        "summary": "Get public compliance knowledge stats",
        "description": "Returns aggregate public stats about active compliance sources.",
        "tags": [
          "Public",
          "Compliance Knowledge"
        ],
        "responses": {
          "200": {
            "description": "Aggregate stats",
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      }
    },
    "/documents/shared/{token}": {
      "get": {
        "operationId": "getPublicDocumentShare",
        "summary": "Get public document share",
        "description": "Get document information from a public share token (no authentication required)",
        "tags": [
          "Public"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Share token"
          }
        ],
        "responses": {
          "200": {
            "description": "Document share information",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "description": "Always true for successful responses"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data (structure varies by endpoint)",
                      "additionalProperties": true
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "404": {
            "description": "Not Found (404)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      },
      "parameters": [
        {
          "name": "token",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ]
    },
    "/documents/shared/{token}/validate": {
      "post": {
        "operationId": "validatePublicDocumentShare",
        "summary": "Validate public share password",
        "description": "Validate password for a password-protected document share (no authentication required)",
        "tags": [
          "Public"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Share token"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "password": {
                    "type": "string",
                    "description": "Share password (optional)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Password validated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "description": "Always true for successful responses"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data (structure varies by endpoint)",
                      "additionalProperties": true
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "404": {
            "description": "Not Found (404)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      },
      "parameters": [
        {
          "name": "token",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ]
    },
    "/documents/shared/{token}/download": {
      "get": {
        "operationId": "getPublicDocumentShareDownloadUrl",
        "summary": "Get public share download URL",
        "description": "Get download URL for a shared document (no authentication required)",
        "tags": [
          "Public"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Share token"
          },
          {
            "name": "password",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Share password (optional, if share is password-protected)"
          }
        ],
        "responses": {
          "200": {
            "description": "Download URL generated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "description": "Always true for successful responses"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data (structure varies by endpoint)",
                      "additionalProperties": true
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "404": {
            "description": "Not Found (404)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "Resource not found"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      },
      "parameters": [
        {
          "name": "token",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ]
    },
    "/public/blog/articles": {
      "get": {
        "operationId": "getPublicBlogArticles",
        "summary": "List public blog articles",
        "tags": [
          "Public Blog"
        ],
        "parameters": [
          {
            "name": "locale",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public blog article list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "description": "Always true for successful responses"
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data (structure varies by endpoint)",
                      "additionalProperties": true
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "400": {
            "description": "Bad Request (400)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request parameters"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "401": {
            "description": "Unauthorized (401) - Missing or invalid JWT token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "UNAUTHORIZED",
                    "message": "Authentication required"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "403": {
            "description": "Forbidden (403) - Missing permission, inactive company, or module not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "FORBIDDEN",
                    "message": "Insufficient permissions",
                    "details": {
                      "requiredPermission": "TASKS:READ"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "422": {
            "description": "Validation Error (422) - Invalid request body or parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_ERROR",
                    "message": "Validation error",
                    "details": {
                      "email": "Invalid email format",
                      "password": "Password must be at least 8 characters"
                    }
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          },
          "500": {
            "description": "Internal Server Error (500)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "VALIDATION_ERROR",
                            "CONFLICT",
                            "INTERNAL_ERROR",
                            "SERVICE_UNAVAILABLE",
                            "BAD_REQUEST",
                            "PAYMENT_REQUIRED",
                            "RATE_LIMIT_EXCEEDED",
                            "MODULE_NOT_ENABLED",
                            "PERMISSION_DENIED",
                            "COMPANY_NOT_ACTIVE",
                            "TENANT_NOT_ACTIVE",
                            "INVALID_TOKEN",
                            "TOKEN_EXPIRED",
                            "INVITATION_EXPIRED",
                            "INVALID_CREDENTIALS",
                            "EMAIL_NOT_VERIFIED",
                            "DATA_INTEGRITY_GUARD",
                            "SSO_PROVISIONING_REQUIRED",
                            "MFA_SETUP_REQUIRED",
                            "MFA_VERIFICATION_REQUIRED",
                            "MFA_STEP_UP_REQUIRED",
                            "USER_SUSPENDED",
                            "COMPANY_ARCHIVED",
                            "NETWORK_ERROR",
                            "COUNTRY_NOT_FOUND",
                            "AGENT_TIMEOUT",
                            "TOOL_EXECUTION_ERROR",
                            "LEGACY_APPROVAL_UNSUPPORTED",
                            "MODEL_ERROR",
                            "AGENT_CANCELLED",
                            "SUSPICIOUS_CONTENT_DETECTED",
                            "IMPORT_MOVED_TO_DATA_IMPORTS",
                            "INVALID_PORTAL",
                            "INVALID_PORTAL_FOR_RUNS",
                            "INVALID_PORTAL_FOR_STATS",
                            "ACCESSMODE_USER_MISMATCH",
                            "ACCESSMODE_TENANT_MISMATCH",
                            "ACCESSMODE_COMPANY_MISMATCH",
                            "ORG_PROVISIONING_FAILED"
                          ],
                          "description": "Error code (ErrorCode type)",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "description": "Localized error message (via translateError() with i18n keys)",
                          "example": "Company not found"
                        },
                        "details": {
                          "type": "object",
                          "description": "Optional error details (validation errors, etc.)",
                          "additionalProperties": true
                        },
                        "field": {
                          "type": "string",
                          "description": "Optional field name for validation errors",
                          "example": "email"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "Request correlation ID for debugging",
                          "example": "req-1234567890"
                        },
                        "requestId": {
                          "type": "string",
                          "description": "Request ID for tracing",
                          "example": "req-9876543210"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "error": {
                    "code": "INTERNAL_ERROR",
                    "message": "Internal server error"
                  }
                }
              }
            },
            "headers": {
              "X-API-Version": {
                "description": "API semantic version.",
                "schema": {
                  "type": "string"
                },
                "example": "0.3.0"
              },
              "X-API-Path-Version": {
                "description": "API URL version prefix.",
                "schema": {
                  "type": "string"
                },
                "example": "v1"
              }
            }
          }
        }
      }
    }
  }
}