var E=Object.defineProperty;var F=(q)=>q;function H(q,y){this[q]=F.bind(null,y)}var K=(q,y)=>{for(var B in y)E(q,B,{get:y[B],enumerable:!0,configurable:!0,set:H.bind(y,B)})};var M=(q,y)=>()=>(q&&(y=q(q=0)),y);import D from"@contractspec/lib.ui-link";import{ChevronRight as J}from"lucide-react";import{jsx as f,jsxs as z}from"react/jsx-runtime";function T(){return z("div",{className:"space-y-8",children:[z("div",{className:"space-y-4",children:[f("h1",{className:"font-bold text-4xl",children:"Gmail API"}),f("p",{className:"text-muted-foreground",children:"The Gmail API integration allows you to read inbound emails, manage threads, and build email-based workflows. Perfect for support tickets, email parsing, and automated responses."})]}),z("div",{className:"space-y-4",children:[f("h2",{className:"font-bold text-2xl",children:"Setup"}),f("p",{className:"text-muted-foreground",children:"Configure OAuth 2.0 credentials in Google Cloud Console:"}),f("div",{className:"overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",children:f("pre",{children:`# .env
GOOGLE_CLIENT_ID=...
GOOGLE_CLIENT_SECRET=...
GOOGLE_REDIRECT_URI=https://your-app.com/auth/google/callback`})})]}),z("div",{className:"space-y-4",children:[f("h2",{className:"font-bold text-2xl",children:"Reading emails"}),f("div",{className:"overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",children:f("pre",{children:`capabilityId: gmail-list-messages
provider:
  type: gmail
  operation: listMessages

inputs:
  query:
    type: string
    description: "Gmail search query"
  maxResults:
    type: number
    default: 10

outputs:
  messages:
    type: array
    items:
      type: object
      properties:
        id: string
        threadId: string
        snippet: string`})})]}),z("div",{className:"space-y-4",children:[f("h2",{className:"font-bold text-2xl",children:"Use cases"}),z("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[f("li",{children:"Parse support emails and create tickets"}),f("li",{children:"Extract attachments and process them"}),f("li",{children:"Build email-to-task workflows"}),f("li",{children:"Monitor specific email threads"})]})]}),z("div",{className:"flex items-center gap-4 pt-4",children:[f(D,{href:"/docs/integrations/resend",className:"btn-ghost",children:"Previous: Resend"}),z(D,{href:"/docs/integrations/google-calendar",className:"btn-primary",children:["Next: Google Calendar ",f(J,{size:16})]})]})]})}export{T as IntegrationsGmailPage};
