openapi: 3.0.1
info:
  title: Global Entry Alerts MCP API
  version: '1.0.0'
servers:
  - url: /
paths:
  /mcp/locations:
    get:
      summary: List available locations
      responses:
        '200':
          description: A JSON object containing available locations
          content:
            application/json:
              schema:
                type: object
                properties:
                  locations:
                    type: array
                    items:
                      $ref: '#/components/schemas/Location'
  /mcp/wait-times/{location_id}:
    get:
      summary: Historical wait times for a location and service
      parameters:
        - in: path
          name: location_id
          required: true
          schema:
            type: integer
        - in: query
          name: service
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Wait time history
          content:
            application/json:
              schema:
                type: object
                properties:
                  location_id:
                    type: integer
                  service:
                    type: string
                  wait_times:
                    type: array
                    items:
                      type: object
        '400':
          description: Invalid request
  /mcp/users:
    post:
      summary: Register or update a user
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserRequest'
      responses:
        '201':
          description: User created
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
        '400':
          description: Invalid request
  /mcp/create-checkout-session:
    post:
      summary: Create a Stripe Checkout session
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                phone:
                  type: string
      responses:
        '200':
          description: URL to hosted Stripe Checkout
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
        '400':
          description: Invalid request
components:
  schemas:
    Location:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        services:
          type: array
          items:
            type: string
    UserRequest:
      type: object
      properties:
        phone:
          type: string
        email:
          type: string
        service:
          type: string
        num_people:
          type: integer
      required:
        - phone
        - email
        - service
        - num_people
