import { CredentialType } from '@bubblelab/shared-schemas';
import { ServiceBubble } from '../../../types/service-bubble-class.js';
import type { BubbleContext } from '../../../types/bubble.js';
import { type GranolaParamsInput, type GranolaResult } from './granola.schema.js';
/**
 * GranolaBubble — Integration with Granola meeting notes API.
 *
 * Returns a normalized (camelCase, flat) response shape. Underneath, the
 * Granola REST API uses snake_case and a nested `{note: {...}}` wrapper on
 * get_note — this bubble translates both so callers can write natural
 * code like `result.data.summaryMarkdown`.
 *
 * @example
 * ```typescript
 * // List recent notes
 * const list = await new GranolaBubble({
 *   operation: 'list_notes',
 *   pageSize: 10,
 * }).action();
 *
 * // Get a specific note (summary only — no transcript by default)
 * const note = await new GranolaBubble({
 *   operation: 'get_note',
 *   noteId: 'not_1d3tmYTlCICgjy',
 * }).action();
 * console.log(note.data.summaryMarkdown);
 *
 * // Get with transcript (explicitly requested — transcripts are large)
 * const full = await new GranolaBubble({
 *   operation: 'get_note',
 *   noteId: 'not_1d3tmYTlCICgjy',
 *   sections: ['summary', 'transcript'],
 * }).action();
 * ```
 */
export declare class GranolaBubble<T extends GranolaParamsInput = GranolaParamsInput> extends ServiceBubble<T, Extract<GranolaResult, {
    operation: T['operation'];
}>> {
    static readonly service = "granola";
    static readonly authType: "apikey";
    static readonly bubbleName: "granola";
    static readonly type: "service";
    static readonly schema: import("zod").ZodDiscriminatedUnion<"operation", [import("zod").ZodObject<{
        operation: import("zod").ZodLiteral<"list_notes">;
        createdBefore: import("zod").ZodOptional<import("zod").ZodString>;
        createdAfter: import("zod").ZodOptional<import("zod").ZodString>;
        updatedAfter: import("zod").ZodOptional<import("zod").ZodString>;
        cursor: import("zod").ZodOptional<import("zod").ZodString>;
        pageSize: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
        credentials: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodNativeEnum<typeof CredentialType>, import("zod").ZodString>>;
    }, "strip", import("zod").ZodTypeAny, {
        operation: "list_notes";
        pageSize: number;
        credentials?: Partial<Record<CredentialType, string>> | undefined;
        cursor?: string | undefined;
        createdBefore?: string | undefined;
        createdAfter?: string | undefined;
        updatedAfter?: string | undefined;
    }, {
        operation: "list_notes";
        credentials?: Partial<Record<CredentialType, string>> | undefined;
        cursor?: string | undefined;
        pageSize?: number | undefined;
        createdBefore?: string | undefined;
        createdAfter?: string | undefined;
        updatedAfter?: string | undefined;
    }>, import("zod").ZodObject<{
        operation: import("zod").ZodLiteral<"get_note">;
        noteId: import("zod").ZodString;
        sections: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodEnum<["summary", "attendees", "calendar", "folders", "transcript"]>, "many">>;
        credentials: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodNativeEnum<typeof CredentialType>, import("zod").ZodString>>;
    }, "strip", import("zod").ZodTypeAny, {
        operation: "get_note";
        noteId: string;
        credentials?: Partial<Record<CredentialType, string>> | undefined;
        sections?: ("summary" | "calendar" | "attendees" | "folders" | "transcript")[] | undefined;
    }, {
        operation: "get_note";
        noteId: string;
        credentials?: Partial<Record<CredentialType, string>> | undefined;
        sections?: ("summary" | "calendar" | "attendees" | "folders" | "transcript")[] | undefined;
    }>]>;
    static readonly resultSchema: import("zod").ZodDiscriminatedUnion<"operation", [import("zod").ZodObject<{
        operation: import("zod").ZodLiteral<"list_notes">;
        success: import("zod").ZodBoolean;
        notes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
            id: import("zod").ZodString;
            title: import("zod").ZodNullable<import("zod").ZodString>;
            owner: import("zod").ZodObject<{
                name: import("zod").ZodNullable<import("zod").ZodString>;
                email: import("zod").ZodString;
            }, "strip", import("zod").ZodTypeAny, {
                name: string | null;
                email: string;
            }, {
                name: string | null;
                email: string;
            }>;
            createdAt: import("zod").ZodString;
            updatedAt: import("zod").ZodString;
        }, "strip", import("zod").ZodTypeAny, {
            title: string | null;
            id: string;
            owner: {
                name: string | null;
                email: string;
            };
            createdAt: string;
            updatedAt: string;
        }, {
            title: string | null;
            id: string;
            owner: {
                name: string | null;
                email: string;
            };
            createdAt: string;
            updatedAt: string;
        }>, "many">>;
        hasMore: import("zod").ZodOptional<import("zod").ZodBoolean>;
        cursor: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
        error: import("zod").ZodString;
    }, "strip", import("zod").ZodTypeAny, {
        error: string;
        success: boolean;
        operation: "list_notes";
        cursor?: string | null | undefined;
        notes?: {
            title: string | null;
            id: string;
            owner: {
                name: string | null;
                email: string;
            };
            createdAt: string;
            updatedAt: string;
        }[] | undefined;
        hasMore?: boolean | undefined;
    }, {
        error: string;
        success: boolean;
        operation: "list_notes";
        cursor?: string | null | undefined;
        notes?: {
            title: string | null;
            id: string;
            owner: {
                name: string | null;
                email: string;
            };
            createdAt: string;
            updatedAt: string;
        }[] | undefined;
        hasMore?: boolean | undefined;
    }>, import("zod").ZodObject<{
        operation: import("zod").ZodLiteral<"get_note">;
        success: import("zod").ZodBoolean;
        error: import("zod").ZodString;
    } & {
        id: import("zod").ZodOptional<import("zod").ZodString>;
        title: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
        owner: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodObject<{
            name: import("zod").ZodNullable<import("zod").ZodString>;
            email: import("zod").ZodString;
        }, "strip", import("zod").ZodTypeAny, {
            name: string | null;
            email: string;
        }, {
            name: string | null;
            email: string;
        }>>>;
        createdAt: import("zod").ZodOptional<import("zod").ZodString>;
        updatedAt: import("zod").ZodOptional<import("zod").ZodString>;
        notesUrl: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
        summaryText: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
        summaryMarkdown: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>>;
        attendees: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
            name: import("zod").ZodNullable<import("zod").ZodString>;
            email: import("zod").ZodString;
        }, "strip", import("zod").ZodTypeAny, {
            name: string | null;
            email: string;
        }, {
            name: string | null;
            email: string;
        }>, "many">>>;
        calendarEvent: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodObject<{
            title: import("zod").ZodNullable<import("zod").ZodString>;
            invitees: import("zod").ZodArray<import("zod").ZodString, "many">;
            organiser: import("zod").ZodNullable<import("zod").ZodString>;
            calendarEventId: import("zod").ZodNullable<import("zod").ZodString>;
            startTime: import("zod").ZodNullable<import("zod").ZodString>;
            endTime: import("zod").ZodNullable<import("zod").ZodString>;
        }, "strip", import("zod").ZodTypeAny, {
            title: string | null;
            startTime: string | null;
            endTime: string | null;
            invitees: string[];
            organiser: string | null;
            calendarEventId: string | null;
        }, {
            title: string | null;
            startTime: string | null;
            endTime: string | null;
            invitees: string[];
            organiser: string | null;
            calendarEventId: string | null;
        }>>>>;
        folders: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
            id: import("zod").ZodString;
            name: import("zod").ZodString;
        }, "strip", import("zod").ZodTypeAny, {
            name: string;
            id: string;
        }, {
            name: string;
            id: string;
        }>, "many">>>;
        transcript: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodArray<import("zod").ZodObject<{
            source: import("zod").ZodEnum<["microphone", "speaker"]>;
            speakerLabel: import("zod").ZodNullable<import("zod").ZodString>;
            text: import("zod").ZodString;
            startTime: import("zod").ZodString;
            endTime: import("zod").ZodString;
        }, "strip", import("zod").ZodTypeAny, {
            text: string;
            source: "microphone" | "speaker";
            startTime: string;
            endTime: string;
            speakerLabel: string | null;
        }, {
            text: string;
            source: "microphone" | "speaker";
            startTime: string;
            endTime: string;
            speakerLabel: string | null;
        }>, "many">>>>;
    }, "strip", import("zod").ZodTypeAny, {
        error: string;
        success: boolean;
        operation: "get_note";
        title?: string | null | undefined;
        id?: string | undefined;
        owner?: {
            name: string | null;
            email: string;
        } | undefined;
        attendees?: {
            name: string | null;
            email: string;
        }[] | undefined;
        createdAt?: string | undefined;
        updatedAt?: string | undefined;
        notesUrl?: string | null | undefined;
        summaryText?: string | undefined;
        summaryMarkdown?: string | null | undefined;
        calendarEvent?: {
            title: string | null;
            startTime: string | null;
            endTime: string | null;
            invitees: string[];
            organiser: string | null;
            calendarEventId: string | null;
        } | null | undefined;
        folders?: {
            name: string;
            id: string;
        }[] | undefined;
        transcript?: {
            text: string;
            source: "microphone" | "speaker";
            startTime: string;
            endTime: string;
            speakerLabel: string | null;
        }[] | null | undefined;
    }, {
        error: string;
        success: boolean;
        operation: "get_note";
        title?: string | null | undefined;
        id?: string | undefined;
        owner?: {
            name: string | null;
            email: string;
        } | undefined;
        attendees?: {
            name: string | null;
            email: string;
        }[] | undefined;
        createdAt?: string | undefined;
        updatedAt?: string | undefined;
        notesUrl?: string | null | undefined;
        summaryText?: string | undefined;
        summaryMarkdown?: string | null | undefined;
        calendarEvent?: {
            title: string | null;
            startTime: string | null;
            endTime: string | null;
            invitees: string[];
            organiser: string | null;
            calendarEventId: string | null;
        } | null | undefined;
        folders?: {
            name: string;
            id: string;
        }[] | undefined;
        transcript?: {
            text: string;
            source: "microphone" | "speaker";
            startTime: string;
            endTime: string;
            speakerLabel: string | null;
        }[] | null | undefined;
    }>]>;
    static readonly shortDescription = "Granola meeting notes and transcription integration";
    static readonly longDescription = "\n    Granola is an AI meeting notes tool that captures and summarizes meetings.\n    This bubble provides read-only access to:\n    - List meeting notes with filtering by creation/update dates\n    - Paginate through notes using cursor-based pagination\n    - Get full note details (summary, attendees, calendar, folders, transcript)\n    - Request only the sections you need via the `sections` parameter\n\n    Response shape:\n    - All fields are camelCase.\n    - `get_note` returns the note's fields FLAT on the result (no `.note` wrapper).\n      e.g. `result.data.summaryMarkdown`, `result.data.attendees`, etc.\n    - `notesUrl` is computed for you \u2014 a direct web link to view the\n      meeting in Granola (extracted from the summary footer).\n    - Transcripts are excluded by default; pass `sections: ['transcript']`\n      to include them (they can be very large).\n\n    Authentication:\n    - Uses Bearer token (API key) from Granola Settings > API\n    - Requires Business or Enterprise plan for personal keys\n    - Enterprise keys access all Team space notes\n\n    Rate Limits:\n    - 25 request burst capacity\n    - 5 requests/second sustained rate\n  ";
    static readonly alias = "granola-notes";
    constructor(params?: T, context?: BubbleContext);
    protected chooseCredential(): string | undefined;
    testCredential(): Promise<boolean>;
    protected performAction(context?: BubbleContext): Promise<Extract<GranolaResult, {
        operation: T['operation'];
    }>>;
    private listNotes;
    private getNote;
    private makeGranolaRequest;
}
//# sourceMappingURL=granola.d.ts.map