{
  "swagger": "2.0",
  "info": {
    "title": "Zetaleap Power Suite",
    "description": "All-in-one Power Automate connector combining RegEx, CSV-to-JSON, Adaptive Cards, Null-Safe JSON Schema, PII Masking, AI Markdown-to-HTML, SFTP SSH Gateway, 150+ FX rates, URL validation, and Drive storage.",
    "version": "1.0.0",
    "contact": {
      "name": "Zetaleap Support Team",
      "url": "https://zetaleap.com/#contact",
      "email": "support_team@zetaleap.com"
    }
  },
  "x-ms-connector-metadata": [
    {
      "propertyName": "Website",
      "propertyValue": "https://zetaleap.com"
    },
    {
      "propertyName": "Privacy policy",
      "propertyValue": "https://zetaleap.com/privacy"
    },
    {
      "propertyName": "Categories",
      "propertyValue": "Productivity;Data"
    }
  ],
  "host": "test.zetaleap.com",
  "basePath": "/",
  "schemes": [
    "https"
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "securityDefinitions": {
    "api_key": {
      "type": "apiKey",
      "in": "header",
      "name": "Authorization",
      "description": "Enter your Zetaleap Personal Access Token prefixed with Bearer (example: Bearer zl_your_api_token). Generate tokens free at https://zetaleap.com/profile."
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "paths": {
    "/api/pp/regex": {
      "post": {
        "operationId": "RegexMatchExtract",
        "summary": "Match extract or replace text with Regular Expressions",
        "description": "Executes bounded Regular Expression matching, named group extraction, or replacement in Power Automate.",
        "x-ms-visibility": "important",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "required": [
                "text",
                "pattern"
              ],
              "properties": {
                "text": {
                  "type": "string",
                  "x-ms-summary": "Source Text"
                },
                "pattern": {
                  "type": "string",
                  "x-ms-summary": "RegEx Pattern"
                },
                "flags": {
                  "type": "string",
                  "default": "gi",
                  "x-ms-summary": "RegEx Flags"
                },
                "mode": {
                  "type": "string",
                  "enum": [
                    "extract",
                    "replace",
                    "split"
                  ],
                  "default": "extract",
                  "x-ms-summary": "Mode"
                },
                "replacement": {
                  "type": "string",
                  "x-ms-summary": "Replacement Text"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Regex evaluation result",
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean",
                  "x-ms-summary": "Success"
                },
                "isMatch": {
                  "type": "boolean",
                  "x-ms-summary": "Is Match"
                },
                "matchCount": {
                  "type": "integer",
                  "x-ms-summary": "Match Count"
                },
                "firstMatch": {
                  "type": "string",
                  "x-ms-summary": "First Match"
                },
                "matches": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "x-ms-summary": "All Matches"
                },
                "replacedText": {
                  "type": "string",
                  "x-ms-summary": "Replaced Text"
                }
              }
            }
          }
        }
      }
    },
    "/api/pp/csv-to-json": {
      "post": {
        "operationId": "ParseCsvToJson",
        "summary": "Parse CSV string into typed JSON array",
        "description": "Parses comma, semicolon, tab, or pipe CSV content into structured JSON rows ready for Apply to each.",
        "x-ms-visibility": "important",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "required": [
                "csv"
              ],
              "properties": {
                "csv": {
                  "type": "string",
                  "x-ms-summary": "Raw CSV Content"
                },
                "delimiter": {
                  "type": "string",
                  "default": "auto",
                  "x-ms-summary": "Delimiter (auto , ; |)"
                },
                "normalizeHeaders": {
                  "type": "boolean",
                  "default": true,
                  "x-ms-summary": "Normalize Headers"
                },
                "autoType": {
                  "type": "boolean",
                  "default": true,
                  "x-ms-summary": "Auto Cast Numbers and Booleans"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Parsed CSV rows",
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean",
                  "x-ms-summary": "Success"
                },
                "delimiterUsed": {
                  "type": "string",
                  "x-ms-summary": "Detected Delimiter"
                },
                "rowCount": {
                  "type": "integer",
                  "x-ms-summary": "Row Count"
                },
                "headers": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "x-ms-summary": "Column Headers"
                },
                "rows": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  },
                  "x-ms-summary": "Parsed JSON Rows"
                }
              }
            }
          }
        }
      }
    },
    "/api/pp/adaptive-card": {
      "post": {
        "operationId": "BuildTeamsAdaptiveCard",
        "summary": "Build Microsoft Teams Adaptive Card v1.5 JSON",
        "description": "Generates a valid Microsoft Teams Adaptive Card v1.5 JSON payload for approvals, KPIs, and alerts.",
        "x-ms-visibility": "important",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "required": [
                "title",
                "summary"
              ],
              "properties": {
                "template": {
                  "type": "string",
                  "enum": [
                    "approval",
                    "kpi",
                    "incident",
                    "copilot"
                  ],
                  "default": "approval",
                  "x-ms-summary": "Card Template"
                },
                "title": {
                  "type": "string",
                  "x-ms-summary": "Card Title"
                },
                "summary": {
                  "type": "string",
                  "x-ms-summary": "Summary Body"
                },
                "metricValue": {
                  "type": "string",
                  "x-ms-summary": "Highlight Metric"
                },
                "metricDelta": {
                  "type": "string",
                  "x-ms-summary": "Metric Delta"
                },
                "primaryActionTitle": {
                  "type": "string",
                  "x-ms-summary": "Action Button Label"
                },
                "primaryActionUrl": {
                  "type": "string",
                  "x-ms-summary": "Action Button URL"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Generated Adaptive Card payload",
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean",
                  "x-ms-summary": "Success"
                },
                "schemaVersion": {
                  "type": "string",
                  "x-ms-summary": "Adaptive Card Version"
                },
                "cardJsonString": {
                  "type": "string",
                  "x-ms-summary": "Adaptive Card JSON String"
                }
              }
            }
          }
        }
      }
    },
    "/api/pp/json-schema": {
      "post": {
        "operationId": "GenerateParseJsonSchema",
        "summary": "Generate null-safe Parse JSON schema from sample payload",
        "description": "Infers a crash-proof nullable JSON schema from any sample payload for Power Automate Parse JSON.",
        "x-ms-visibility": "important",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "required": [
                "sample"
              ],
              "properties": {
                "sample": {
                  "type": "object",
                  "x-ms-summary": "Sample JSON Object"
                },
                "nullSafe": {
                  "type": "boolean",
                  "default": true,
                  "x-ms-summary": "Allow Null Values"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Generated Parse JSON schema",
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean",
                  "x-ms-summary": "Success"
                },
                "schemaString": {
                  "type": "string",
                  "x-ms-summary": "Parse JSON Schema String"
                }
              }
            }
          }
        }
      }
    },
    "/api/pp/mask-pii": {
      "post": {
        "operationId": "MaskSensitivePii",
        "summary": "Redact emails IBANs cards and phones before AI prompts",
        "description": "Masks sensitive PII tokens in unstructured text prior to Copilot Studio or OpenAI prompts.",
        "x-ms-visibility": "important",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "required": [
                "text"
              ],
              "properties": {
                "text": {
                  "type": "string",
                  "x-ms-summary": "Input Text"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Redacted text result",
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean",
                  "x-ms-summary": "Success"
                },
                "maskedText": {
                  "type": "string",
                  "x-ms-summary": "Masked Safe Text"
                },
                "redactionCount": {
                  "type": "integer",
                  "x-ms-summary": "Redaction Count"
                }
              }
            }
          }
        }
      }
    },
    "/api/pp/business-days": {
      "post": {
        "operationId": "CalculateBusinessDays",
        "summary": "Calculate SLA business days excluding weekends and holidays",
        "description": "Adds business days or calculates working day difference using regional holiday calendars.",
        "x-ms-visibility": "important",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "required": [
                "startDate"
              ],
              "properties": {
                "startDate": {
                  "type": "string",
                  "x-ms-summary": "Start Date (YYYY-MM-DD)"
                },
                "daysToAdd": {
                  "type": "integer",
                  "default": 5,
                  "x-ms-summary": "Business Days to Add"
                },
                "country": {
                  "type": "string",
                  "default": "US",
                  "x-ms-summary": "Holiday Country (US UK EU DE TR)"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "SLA calculation response",
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean",
                  "x-ms-summary": "Success"
                },
                "resultDate": {
                  "type": "string",
                  "x-ms-summary": "Target Business Date"
                },
                "businessDays": {
                  "type": "integer",
                  "x-ms-summary": "Business Days"
                },
                "weekendDaysSkipped": {
                  "type": "integer",
                  "x-ms-summary": "Weekends Skipped"
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/convert": {
      "post": {
        "tags": [
          "AI Formatter"
        ],
        "operationId": "ConvertFormat",
        "summary": "Convert Markdown to HTML or HTML to Markdown",
        "description": "Converts LLM/AI Markdown output (ChatGPT, Azure OpenAI, Claude, Copilot) into sanitized HTML for Outlook/Teams/PDFs, or converts HTML into clean Markdown.",
        "x-ms-visibility": "important",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "required": true,
            "x-ms-summary": "Conversion Payload",
            "schema": {
              "type": "object",
              "required": [
                "mode",
                "text"
              ],
              "properties": {
                "mode": {
                  "type": "string",
                  "enum": [
                    "md2html",
                    "html2md"
                  ],
                  "default": "md2html",
                  "x-ms-summary": "Conversion Mode",
                  "description": "Select md2html (Markdown to HTML) or html2md (HTML to Markdown)."
                },
                "text": {
                  "type": "string",
                  "x-ms-summary": "Input Content (Max 100KB)",
                  "description": "Raw Markdown or HTML string to transform."
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Converted content returned successfully",
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean",
                  "x-ms-summary": "Success"
                },
                "result": {
                  "type": "string",
                  "x-ms-summary": "Converted Output",
                  "description": "Clean HTML or Markdown string ready for Outlook, Teams, or Dataverse."
                }
              }
            }
          }
        }
      }
    },
    "/api/sftp/companies": {
      "get": {
        "tags": [
          "SFTP Gateway"
        ],
        "operationId": "ListSftpProfiles",
        "summary": "List saved SFTP and FTP connection profiles",
        "description": "Returns all saved SFTP/FTP server connection profiles accessible by the authenticated token.",
        "x-ms-visibility": "important",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "List of saved SFTP connection profiles",
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean",
                  "x-ms-summary": "Success"
                },
                "companies": {
                  "type": "array",
                  "x-ms-summary": "Connection Profiles",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "x-ms-summary": "Connection ID"
                      },
                      "display_name": {
                        "type": "string",
                        "x-ms-summary": "Display Name"
                      },
                      "protocol": {
                        "type": "string",
                        "x-ms-summary": "Protocol (sftp/ftp)"
                      },
                      "host": {
                        "type": "string",
                        "x-ms-summary": "Server Hostname"
                      },
                      "port": {
                        "type": "integer",
                        "format": "int32",
                        "x-ms-summary": "Port"
                      },
                      "username": {
                        "type": "string",
                        "x-ms-summary": "SSH/FTP Username"
                      },
                      "root_path": {
                        "type": "string",
                        "x-ms-summary": "Default Root Path"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/sftp/{companyId}": {
      "get": {
        "tags": [
          "SFTP Gateway"
        ],
        "operationId": "ListSftpDirectory",
        "summary": "List files in remote SFTP or FTP folder",
        "description": "Connects over SSH Private Key (PEM) or password via Zetaleap Gateway and lists files and folders in the target remote directory without Power Automate timeout errors.",
        "x-ms-visibility": "important",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "type": "string",
            "required": true,
            "x-ms-summary": "Connection Profile ID",
            "description": "Saved connection slug (e.g. rebex or erp-prod)."
          },
          {
            "name": "path",
            "in": "query",
            "type": "string",
            "required": false,
            "default": "/",
            "x-ms-summary": "Remote Directory Path",
            "description": "Remote SFTP folder path to list (default: /)."
          }
        ],
        "responses": {
          "200": {
            "description": "Remote directory contents",
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean",
                  "x-ms-summary": "Success"
                },
                "target_path": {
                  "type": "string",
                  "x-ms-summary": "Resolved Remote Path"
                },
                "target_dir_files": {
                  "type": "array",
                  "x-ms-summary": "Remote Files and Folders",
                  "items": {
                    "type": "object",
                    "properties": {
                      "filename": {
                        "type": "string",
                        "x-ms-summary": "File or Folder Name"
                      },
                      "is_directory": {
                        "type": "boolean",
                        "x-ms-summary": "Is Directory"
                      },
                      "size": {
                        "type": "integer",
                        "format": "int64",
                        "x-ms-summary": "Size in Bytes"
                      },
                      "modified_time": {
                        "type": "string",
                        "x-ms-summary": "Last Modified ISO Date"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/sftp/{companyId}/download": {
      "get": {
        "tags": [
          "SFTP Gateway"
        ],
        "operationId": "DownloadSftpFile",
        "summary": "Download file from remote SFTP or FTP server",
        "description": "Streams a binary or text file directly from the remote SFTP/FTP server into Power Automate.",
        "x-ms-visibility": "important",
        "produces": [
          "application/octet-stream"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "type": "string",
            "required": true,
            "x-ms-summary": "Connection Profile ID",
            "description": "Saved connection slug (e.g. rebex or erp-prod)."
          },
          {
            "name": "file",
            "in": "query",
            "type": "string",
            "required": true,
            "x-ms-summary": "Remote File Path",
            "description": "Full remote file path to download (e.g. /outbound/readme.txt)."
          }
        ],
        "responses": {
          "200": {
            "description": "File binary stream",
            "schema": {
              "type": "string",
              "format": "binary"
            }
          }
        }
      }
    },
    "/api/sftp/r2/files": {
      "get": {
        "tags": [
          "SFTP Gateway"
        ],
        "operationId": "ListSftpVaultFiles",
        "summary": "List synced SFTP files in Cloud Vault",
        "description": "Lists files archived into Zetaleap R2 Storage Vault by automated SFTP sync schedules.",
        "x-ms-visibility": "advanced",
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "Archived vault files",
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean",
                  "x-ms-summary": "Success"
                },
                "files": {
                  "type": "array",
                  "x-ms-summary": "Vault Files",
                  "items": {
                    "type": "object",
                    "properties": {
                      "key": {
                        "type": "string",
                        "x-ms-summary": "Storage Object Key"
                      },
                      "filename": {
                        "type": "string",
                        "x-ms-summary": "File Name"
                      },
                      "connection_id": {
                        "type": "string",
                        "x-ms-summary": "Source Connection ID"
                      },
                      "size": {
                        "type": "integer",
                        "format": "int64",
                        "x-ms-summary": "File Size (Bytes)"
                      },
                      "uploaded": {
                        "type": "string",
                        "x-ms-summary": "Uploaded Timestamp"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/rates": {
      "get": {
        "tags": [
          "Currency FX"
        ],
        "operationId": "GetExchangeRates",
        "summary": "Get real-time currency exchange rates",
        "description": "Returns live foreign exchange rates for 150+ ISO 4217 world currencies relative to the selected base currency.",
        "x-ms-visibility": "important",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "base",
            "in": "query",
            "type": "string",
            "required": false,
            "default": "USD",
            "x-ms-summary": "Base Currency (ISO 4217)",
            "description": "Three-letter base currency code such as USD, EUR, GBP, or TRY."
          },
          {
            "name": "targets",
            "in": "query",
            "type": "string",
            "required": false,
            "x-ms-summary": "Target Currencies (Comma-Separated)",
            "description": "Optional comma-separated ISO codes (e.g. EUR,GBP,TRY,CHF,JPY,CAD). Leave empty for all 150+ currencies."
          }
        ],
        "responses": {
          "200": {
            "description": "Exchange rates payload",
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean",
                  "x-ms-summary": "Success"
                },
                "base": {
                  "type": "string",
                  "x-ms-summary": "Base Currency"
                },
                "last_updated": {
                  "type": "string",
                  "x-ms-summary": "Last Updated Timestamp"
                },
                "rates": {
                  "type": "object",
                  "x-ms-summary": "Currency Rates Map",
                  "properties": {
                    "USD": {
                      "type": "number",
                      "format": "double",
                      "x-ms-summary": "USD Rate"
                    },
                    "EUR": {
                      "type": "number",
                      "format": "double",
                      "x-ms-summary": "EUR Rate"
                    },
                    "GBP": {
                      "type": "number",
                      "format": "double",
                      "x-ms-summary": "GBP Rate"
                    },
                    "TRY": {
                      "type": "number",
                      "format": "double",
                      "x-ms-summary": "TRY Rate"
                    },
                    "CHF": {
                      "type": "number",
                      "format": "double",
                      "x-ms-summary": "CHF Rate"
                    },
                    "JPY": {
                      "type": "number",
                      "format": "double",
                      "x-ms-summary": "JPY Rate"
                    },
                    "CAD": {
                      "type": "number",
                      "format": "double",
                      "x-ms-summary": "CAD Rate"
                    },
                    "AUD": {
                      "type": "number",
                      "format": "double",
                      "x-ms-summary": "AUD Rate"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/validate-url": {
      "post": {
        "tags": [
          "URL Validator"
        ],
        "operationId": "ValidateUrl",
        "summary": "Validate URL reachability and redirects",
        "description": "Checks URL syntax, live HTTP reachability (with 3-second timeout protection), HTTP status code, and final redirect URL.",
        "x-ms-visibility": "important",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "required": true,
            "x-ms-summary": "URL Validation Request",
            "schema": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "x-ms-summary": "Target URL",
                  "description": "Full HTTP or HTTPS URL to inspect (e.g. https://microsoft.com)."
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Validation result returned cleanly",
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean",
                  "x-ms-summary": "Success"
                },
                "isValidSyntax": {
                  "type": "boolean",
                  "x-ms-summary": "Valid URL Syntax"
                },
                "isReachable": {
                  "type": "boolean",
                  "x-ms-summary": "Is Reachable Online"
                },
                "statusCode": {
                  "type": "integer",
                  "format": "int32",
                  "x-ms-summary": "HTTP Status Code"
                },
                "isRedirected": {
                  "type": "boolean",
                  "x-ms-summary": "Was Redirected"
                },
                "finalUrl": {
                  "type": "string",
                  "x-ms-summary": "Final Destination URL"
                },
                "domain": {
                  "type": "string",
                  "x-ms-summary": "Hostname Domain"
                }
              }
            }
          }
        }
      }
    },
    "/api/shorten": {
      "post": {
        "tags": [
          "URL Shortener"
        ],
        "operationId": "CreateShortUrl",
        "summary": "Create a short link with click tracking",
        "description": "Shortens a long destination URL with an optional custom alias and campaign title.",
        "x-ms-visibility": "important",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "required": true,
            "x-ms-summary": "Short Link Request",
            "schema": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "x-ms-summary": "Destination Long URL",
                  "description": "Full destination URL starting with https:// or http://."
                },
                "custom_code": {
                  "type": "string",
                  "x-ms-summary": "Custom Alias (Optional)",
                  "description": "Optional custom slug (3 to 32 alphanumeric/hyphen characters)."
                },
                "title": {
                  "type": "string",
                  "x-ms-summary": "Link Title (Optional)",
                  "description": "Optional friendly campaign or document label."
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Created short link",
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean",
                  "x-ms-summary": "Success"
                },
                "code": {
                  "type": "string",
                  "x-ms-summary": "Short Code"
                },
                "short_url": {
                  "type": "string",
                  "x-ms-summary": "Full Short URL"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "URL Shortener"
        ],
        "operationId": "ListShortUrls",
        "summary": "List created short links and click counts",
        "description": "Retrieves paginated short links and live click metrics for the authenticated account.",
        "x-ms-visibility": "advanced",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "type": "integer",
            "format": "int32",
            "default": 1,
            "required": false,
            "x-ms-summary": "Page Number"
          },
          {
            "name": "limit",
            "in": "query",
            "type": "integer",
            "format": "int32",
            "default": 20,
            "required": false,
            "x-ms-summary": "Items Per Page"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated short links list",
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean",
                  "x-ms-summary": "Success"
                },
                "total": {
                  "type": "integer",
                  "format": "int32",
                  "x-ms-summary": "Total Links"
                }
              }
            }
          }
        }
      }
    },
    "/api/drive/items": {
      "get": {
        "tags": [
          "Cloud Drive"
        ],
        "operationId": "ListDriveItems",
        "summary": "List folders and files in Zetaleap Drive",
        "description": "Lists folders and stored files inside Zetaleap Drive Cloud Vault.",
        "x-ms-visibility": "important",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "folderId",
            "in": "query",
            "type": "string",
            "required": false,
            "x-ms-summary": "Parent Folder ID (Optional)",
            "description": "Leave empty to list root Drive items, or pass a folder ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Drive folders and files",
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean",
                  "x-ms-summary": "Success"
                },
                "folders": {
                  "type": "array",
                  "x-ms-summary": "Folders",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "format": "int32",
                        "x-ms-summary": "Folder ID"
                      },
                      "name": {
                        "type": "string",
                        "x-ms-summary": "Folder Name"
                      }
                    }
                  }
                },
                "files": {
                  "type": "array",
                  "x-ms-summary": "Files",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "format": "int32",
                        "x-ms-summary": "File ID"
                      },
                      "name": {
                        "type": "string",
                        "x-ms-summary": "File Name"
                      },
                      "mime_type": {
                        "type": "string",
                        "x-ms-summary": "MIME Type"
                      },
                      "size_bytes": {
                        "type": "integer",
                        "format": "int64",
                        "x-ms-summary": "Size in Bytes"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/drive/folders": {
      "post": {
        "tags": [
          "Cloud Drive"
        ],
        "operationId": "CreateDriveFolder",
        "summary": "Create a folder in Zetaleap Drive",
        "description": "Creates a new organized folder inside Zetaleap Drive Cloud Vault.",
        "x-ms-visibility": "important",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "required": true,
            "x-ms-summary": "New Folder Details",
            "schema": {
              "type": "object",
              "required": [
                "name"
              ],
              "properties": {
                "name": {
                  "type": "string",
                  "x-ms-summary": "Folder Name"
                },
                "color": {
                  "type": "string",
                  "default": "#3b82f6",
                  "x-ms-summary": "Folder Hex Color"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Created folder response",
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean",
                  "x-ms-summary": "Success"
                }
              }
            }
          }
        }
      }
    }
  }
}