{
 "openapi": "3.1.0",
 "info": {
  "title": "AI Capabilities (Manufacturing)",
  "version": "20261030b",
  "description": "The fourteen, with the two columns that matter: what each is ALLOWED to do, and how accurate it has been measured to be. Nothing ships able to act on its own."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "ai-capabilities": {
    "type": "object",
    "required": [],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "readOnly": true
     },
     "capability_key": {
      "type": "string",
      "description": "Capability key",
      "readOnly": true
     },
     "name": {
      "type": "string",
      "description": "Name",
      "readOnly": true
     },
     "blurb": {
      "type": "string",
      "description": "Blurb",
      "readOnly": true
     },
     "category": {
      "type": "string",
      "description": "Category",
      "readOnly": true
     },
     "module": {
      "type": "string",
      "description": "Module",
      "readOnly": true
     },
     "subject_entity": {
      "type": "string",
      "description": "Subject entity",
      "readOnly": true
     },
     "method": {
      "type": "string",
      "description": "Method",
      "readOnly": true
     },
     "provider": {
      "type": "string",
      "description": "Provider"
     },
     "model_ref": {
      "type": "string",
      "description": "Model reference"
     },
     "inputs_summary": {
      "type": "string",
      "description": "Inputs summary",
      "readOnly": true
     },
     "output_summary": {
      "type": "string",
      "description": "Output summary",
      "readOnly": true
     },
     "autonomy": {
      "type": "string",
      "description": "What it may do",
      "enum": [
       "advise",
       "recommend",
       "approve_then_act",
       "act_and_notify"
      ]
     },
     "confidence_floor": {
      "type": "string",
      "format": "decimal",
      "description": "Confidence floor"
     },
     "accuracy_pct": {
      "type": "string",
      "format": "decimal",
      "description": "Accuracy pct",
      "readOnly": true
     },
     "precision_pct": {
      "type": "string",
      "format": "decimal",
      "description": "Precision pct",
      "readOnly": true
     },
     "recall_pct": {
      "type": "string",
      "format": "decimal",
      "description": "Recall pct",
      "readOnly": true
     },
     "predictions_made": {
      "type": "integer",
      "description": "Predictions made",
      "readOnly": true
     },
     "predictions_scored": {
      "type": "integer",
      "description": "Predictions scored",
      "readOnly": true
     },
     "acceptance_pct": {
      "type": "string",
      "format": "decimal",
      "description": "Acceptance pct",
      "readOnly": true
     },
     "last_run_at": {
      "type": "string",
      "format": "date-time",
      "description": "Last run at",
      "readOnly": true
     },
     "run_frequency": {
      "type": "string",
      "description": "Run frequency"
     },
     "is_enabled": {
      "type": "boolean",
      "description": "Enabled"
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     },
     "xf_text_1": {
      "type": "string",
      "description": "Xf text 1",
      "readOnly": true
     },
     "xf_text_2": {
      "type": "string",
      "description": "Xf text 2",
      "readOnly": true
     },
     "xf_text_3": {
      "type": "string",
      "description": "Xf text 3",
      "readOnly": true
     },
     "xf_text_4": {
      "type": "string",
      "description": "Xf text 4",
      "readOnly": true
     },
     "xf_text_5": {
      "type": "string",
      "description": "Xf text 5",
      "readOnly": true
     },
     "xf_num_1": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 1",
      "readOnly": true
     },
     "xf_num_2": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 2",
      "readOnly": true
     },
     "xf_num_3": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 3",
      "readOnly": true
     },
     "xf_date_1": {
      "type": "string",
      "format": "date",
      "description": "Xf date 1",
      "readOnly": true
     },
     "xf_date_2": {
      "type": "string",
      "format": "date",
      "description": "Xf date 2",
      "readOnly": true
     },
     "created_by": {
      "type": "string",
      "format": "uuid",
      "description": "Created by",
      "readOnly": true
     },
     "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Updated at",
      "readOnly": true
     },
     "updated_by": {
      "type": "string",
      "format": "uuid",
      "description": "Updated by",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/mfg/ai-capabilities": {
   "get": {
    "summary": "list ai-capabilities",
    "operationId": "list_ai_capabilities_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create ai-capabilities",
    "operationId": "create_ai_capabilities_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/mfg/ai-capabilities/{id}": {
   "get": {
    "summary": "get ai-capabilities",
    "operationId": "get_ai_capabilities_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change ai-capabilities",
    "operationId": "change_ai_capabilities_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete ai-capabilities",
    "operationId": "delete_ai_capabilities_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/mfg/ai-capabilities/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_ai_capabilities_0_6",
    "description": "Body keys: overrides, preview, withLines",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}