{
  "openapi": "3.1.0",
  "info": {
    "title": "Usama Sarwar Portfolio & Agent API",
    "version": "1.0.0",
    "description": "API for accessing professional profile data, checking appointment availability, booking meetings, and initiating project advance payments with Usama Sarwar."
  },
  "x-service-info": {
    "categories": [
      "Software Development",
      "Consulting",
      "Agentic AI",
      "Full-Stack Engineering"
    ]
  },
  "servers": [
    {
      "url": "https://usama.dev",
      "description": "Production server"
    }
  ],
  "paths": {
    "/.well-known/api-catalog": {
      "get": {
        "summary": "Retrieve API Catalog",
        "responses": {
          "200": {
            "description": "API Catalog in Linkset JSON format"
          }
        }
      }
    },
    "/api/calendar/availability": {
      "get": {
        "summary": "Get Appointment Availability",
        "description": "Fetch available 30-minute booking slots for the next 7 business days, grouped by day in the requested timezone.",
        "operationId": "getAvailability",
        "parameters": [
          {
            "name": "timezone",
            "in": "query",
            "required": false,
            "description": "IANA timezone identifier (e.g. 'America/New_York', 'Europe/London', 'Asia/Karachi', 'UTC'). Defaults to 'Asia/Karachi'.",
            "schema": {
              "type": "string",
              "default": "Asia/Karachi",
              "example": "America/New_York"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of available days with bookable slots",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "date": { "type": "string", "example": "2026-08-25" },
                      "label": { "type": "string", "example": "Tue, Aug 25" },
                      "slots": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "start": { "type": "string", "format": "date-time", "example": "2026-08-25T10:00:00.000Z" },
                            "end": { "type": "string", "format": "date-time", "example": "2026-08-25T10:30:00.000Z" },
                            "time": { "type": "string", "example": "03:00 PM" }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid timezone"
          },
          "503": {
            "description": "Calendar service temporarily unavailable"
          }
        }
      }
    },
    "/api/calendar/book": {
      "post": {
        "summary": "Book a Meeting / Appointment",
        "description": "Schedule a 30-minute consultation or discovery meeting on Usama Sarwar's Google Calendar for an available time slot.",
        "operationId": "bookMeeting",
        "x-payment-info": {
          "intent": "charge",
          "method": "card",
          "amount": 150,
          "currency": "USD",
          "description": "1-on-1 Consultation fee or project advance deposit. Multi-currency bank transfer (PKR/USD/EUR/GBP), Raast, Wise, and USDT with WhatsApp verification (+923100007773)."
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["name", "email", "start", "end"],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Full name of attendee",
                    "example": "Jane Doe"
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "description": "Email address to receive calendar invite and meeting link",
                    "example": "jane@example.com"
                  },
                  "whatsapp": {
                    "type": "string",
                    "description": "Optional WhatsApp phone number",
                    "example": "+1234567890"
                  },
                  "agenda": {
                    "type": "string",
                    "description": "Topic or discussion points for the meeting",
                    "example": "Consultation regarding Agentic AI architecture and Flutter app development."
                  },
                  "start": {
                    "type": "string",
                    "format": "date-time",
                    "description": "ISO start timestamp selected from an available slot",
                    "example": "2026-08-25T10:00:00.000Z"
                  },
                  "end": {
                    "type": "string",
                    "format": "date-time",
                    "description": "ISO end timestamp selected from an available slot",
                    "example": "2026-08-25T10:30:00.000Z"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Meeting booked successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": { "type": "boolean", "example": true },
                    "data": { "type": "object" }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing required fields or invalid payload"
          },
          "500": {
            "description": "Failed to create appointment"
          }
        }
      }
    },
    "/api/v1/payments/checkout": {
      "post": {
        "summary": "Initiate Project Advance Payment",
        "description": "Initiate an advance deposit payment for software engineering, Agentic AI, or consulting services with Usama Sarwar.",
        "operationId": "checkoutPayment",
        "x-payment-info": {
          "intent": "charge",
          "method": "card",
          "amount": 500,
          "currency": "USD",
          "description": "Upfront project advance deposit. Direct wire/Raast/Wise/USDT instructions provided with WhatsApp confirmation (+923100007773)."
        },
        "responses": {
          "200": {
            "description": "Payment instructions and confirmation details"
          },
          "402": {
            "description": "Payment required"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  }
}
