{
 "openapi": "3.1.0",
 "info": {
  "title": "Compliance Training (HRMS)",
  "version": "20261030b",
  "description": "Every assigned course and whether each person is compliant today -- completed, and the completion still valid -- with what is overdue. Filter to compliance courses for the mandatory-training report."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "training-compliance": {
    "type": "object",
    "required": [],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "course_id": {
      "type": "string",
      "format": "uuid",
      "description": "Course id",
      "readOnly": true
     },
     "employee_id": {
      "type": "string",
      "format": "uuid",
      "description": "Employee id",
      "readOnly": true
     },
     "status": {
      "type": "string",
      "description": "Status",
      "readOnly": true
     },
     "due_date": {
      "type": "string",
      "format": "date",
      "description": "Due date",
      "readOnly": true
     },
     "assigned_on": {
      "type": "string",
      "format": "date",
      "description": "Assigned on",
      "readOnly": true
     },
     "completed_at": {
      "type": "string",
      "format": "date-time",
      "description": "Completed at",
      "readOnly": true
     },
     "valid_until": {
      "type": "string",
      "format": "date",
      "description": "Valid until",
      "readOnly": true
     },
     "score": {
      "type": "string",
      "format": "decimal",
      "description": "Score",
      "readOnly": true
     },
     "source": {
      "type": "string",
      "description": "Source",
      "readOnly": true
     },
     "rule_id": {
      "type": "string",
      "format": "uuid",
      "description": "Rule id",
      "readOnly": true
     },
     "course_code": {
      "type": "string",
      "description": "Course code",
      "readOnly": true
     },
     "course_name": {
      "type": "string",
      "description": "Course name",
      "readOnly": true
     },
     "is_compliance": {
      "type": "boolean",
      "description": "Is compliance",
      "readOnly": true
     },
     "category": {
      "type": "string",
      "description": "Category",
      "readOnly": true
     },
     "employee_no": {
      "type": "string",
      "description": "Employee no",
      "readOnly": true
     },
     "employee_name": {
      "type": "string",
      "description": "Employee name",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "readOnly": true
     },
     "org_unit_name": {
      "type": "string",
      "description": "Org unit name",
      "readOnly": true
     },
     "manager_id": {
      "type": "string",
      "format": "uuid",
      "description": "Manager id",
      "readOnly": true
     },
     "work_location_id": {
      "type": "string",
      "format": "uuid",
      "description": "Work location id",
      "readOnly": true
     },
     "compliant": {
      "type": "boolean",
      "description": "Compliant",
      "readOnly": true
     },
     "overdue": {
      "type": "boolean",
      "description": "Overdue",
      "readOnly": true
     },
     "days_overdue": {
      "type": "integer",
      "description": "Days overdue",
      "readOnly": true
     },
     "lapsed": {
      "type": "boolean",
      "description": "Lapsed",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/hrms/training-compliance": {
   "get": {
    "summary": "list training-compliance",
    "operationId": "list_training_compliance_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Post compliance training",
    "operationId": "action_training_compliance_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/training-compliance/{id}": {
   "get": {
    "summary": "get training-compliance",
    "operationId": "get_training_compliance_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "Put compliance training",
    "operationId": "action_training_compliance_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Delete compliance training",
    "operationId": "action_training_compliance_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/training-compliance/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_training_compliance_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"
     }
    }
   }
  }
 }
}