import { z } from 'zod'; import { ServiceBubble } from '../../../types/service-bubble-class.js'; import type { BubbleContext } from '../../../types/bubble.js'; import { CredentialType } from '@bubblelab/shared-schemas'; import type { ActorId, ActorOutput, ActorInput } from './types.js'; /** * Generic Apify Bubble - Works with ANY Apify Actor * * This is a universal service bubble that can run any Apify actor. * Actor-specific logic and data transformation should be handled by Tool Bubbles. * * Examples: * - InstagramTool uses this to run 'apify/instagram-scraper' * - RedditTool could use this to run 'apify/reddit-scraper' * - LinkedInTool could use this to run 'apify/linkedin-scraper' */ declare const ApifyParamsSchema: z.ZodObject<{ actorId: z.ZodOptional; search: z.ZodOptional; limit: z.ZodDefault>; input: z.ZodRecord; waitForFinish: z.ZodDefault>; timeout: z.ZodDefault>; credentials: z.ZodOptional, z.ZodString>>; }, "strip", z.ZodTypeAny, { timeout: number; input: Record; limit: number; waitForFinish: boolean; credentials?: Partial> | undefined; search?: string | undefined; actorId?: string | undefined; }, { input: Record; credentials?: Partial> | undefined; timeout?: number | undefined; search?: string | undefined; limit?: number | undefined; actorId?: string | undefined; waitForFinish?: boolean | undefined; }>; declare const ApifyResultSchema: z.ZodObject<{ runId: z.ZodString; status: z.ZodString; datasetId: z.ZodOptional; items: z.ZodOptional>; itemsCount: z.ZodOptional; consoleUrl: z.ZodString; success: z.ZodBoolean; error: z.ZodString; discoveredActors: z.ZodOptional>; inputSchemaUrl: z.ZodString; stars: z.ZodOptional>; usage: z.ZodOptional; usersCount: z.ZodOptional; }, "strip", z.ZodTypeAny, { totalRuns?: number | undefined; usersCount?: number | undefined; }, { totalRuns?: number | undefined; usersCount?: number | undefined; }>>>; requiresRental: z.ZodOptional; }, "strip", z.ZodTypeAny, { name: string; id: string; inputSchemaUrl: string; usage?: { totalRuns?: number | undefined; usersCount?: number | undefined; } | null | undefined; description?: string | null | undefined; stars?: number | null | undefined; requiresRental?: boolean | undefined; }, { name: string; id: string; inputSchemaUrl: string; usage?: { totalRuns?: number | undefined; usersCount?: number | undefined; } | null | undefined; description?: string | null | undefined; stars?: number | null | undefined; requiresRental?: boolean | undefined; }>, "many">>; }, "strip", z.ZodTypeAny, { status: string; error: string; success: boolean; runId: string; consoleUrl: string; items?: unknown[] | undefined; itemsCount?: number | undefined; datasetId?: string | undefined; discoveredActors?: { name: string; id: string; inputSchemaUrl: string; usage?: { totalRuns?: number | undefined; usersCount?: number | undefined; } | null | undefined; description?: string | null | undefined; stars?: number | null | undefined; requiresRental?: boolean | undefined; }[] | undefined; }, { status: string; error: string; success: boolean; runId: string; consoleUrl: string; items?: unknown[] | undefined; itemsCount?: number | undefined; datasetId?: string | undefined; discoveredActors?: { name: string; id: string; inputSchemaUrl: string; usage?: { totalRuns?: number | undefined; usersCount?: number | undefined; } | null | undefined; description?: string | null | undefined; stars?: number | null | undefined; requiresRental?: boolean | undefined; }[] | undefined; }>; export type ApifyParamsInput = z.input; export type ApifyActorInput = Record; type ApifyParams = z.output; type ApifyResult = z.output; type TypedApifyInput = T extends ActorId ? ActorInput : Record; type TypedApifyResult = T extends ActorId ? Omit & { items?: ActorOutput[]; } : ApifyResult; type TypedApifyParams = Omit & { input: TypedApifyInput; }; export type TypedApifyParamsInput = Omit & { input: TypedApifyInput; }; export declare class ApifyBubble extends ServiceBubble, TypedApifyResult> { static readonly service = "apify"; static readonly authType: "apikey"; static readonly bubbleName = "apify"; static readonly type: "service"; static readonly schema: z.ZodObject<{ actorId: z.ZodOptional; search: z.ZodOptional; limit: z.ZodDefault>; input: z.ZodRecord; waitForFinish: z.ZodDefault>; timeout: z.ZodDefault>; credentials: z.ZodOptional, z.ZodString>>; }, "strip", z.ZodTypeAny, { timeout: number; input: Record; limit: number; waitForFinish: boolean; credentials?: Partial> | undefined; search?: string | undefined; actorId?: string | undefined; }, { input: Record; credentials?: Partial> | undefined; timeout?: number | undefined; search?: string | undefined; limit?: number | undefined; actorId?: string | undefined; waitForFinish?: boolean | undefined; }>; static readonly resultSchema: z.ZodObject<{ runId: z.ZodString; status: z.ZodString; datasetId: z.ZodOptional; items: z.ZodOptional>; itemsCount: z.ZodOptional; consoleUrl: z.ZodString; success: z.ZodBoolean; error: z.ZodString; discoveredActors: z.ZodOptional>; inputSchemaUrl: z.ZodString; stars: z.ZodOptional>; usage: z.ZodOptional; usersCount: z.ZodOptional; }, "strip", z.ZodTypeAny, { totalRuns?: number | undefined; usersCount?: number | undefined; }, { totalRuns?: number | undefined; usersCount?: number | undefined; }>>>; requiresRental: z.ZodOptional; }, "strip", z.ZodTypeAny, { name: string; id: string; inputSchemaUrl: string; usage?: { totalRuns?: number | undefined; usersCount?: number | undefined; } | null | undefined; description?: string | null | undefined; stars?: number | null | undefined; requiresRental?: boolean | undefined; }, { name: string; id: string; inputSchemaUrl: string; usage?: { totalRuns?: number | undefined; usersCount?: number | undefined; } | null | undefined; description?: string | null | undefined; stars?: number | null | undefined; requiresRental?: boolean | undefined; }>, "many">>; }, "strip", z.ZodTypeAny, { status: string; error: string; success: boolean; runId: string; consoleUrl: string; items?: unknown[] | undefined; itemsCount?: number | undefined; datasetId?: string | undefined; discoveredActors?: { name: string; id: string; inputSchemaUrl: string; usage?: { totalRuns?: number | undefined; usersCount?: number | undefined; } | null | undefined; description?: string | null | undefined; stars?: number | null | undefined; requiresRental?: boolean | undefined; }[] | undefined; }, { status: string; error: string; success: boolean; runId: string; consoleUrl: string; items?: unknown[] | undefined; itemsCount?: number | undefined; datasetId?: string | undefined; discoveredActors?: { name: string; id: string; inputSchemaUrl: string; usage?: { totalRuns?: number | undefined; usersCount?: number | undefined; } | null | undefined; description?: string | null | undefined; stars?: number | null | undefined; requiresRental?: boolean | undefined; }[] | undefined; }>; static readonly shortDescription = "Discover and run specialized Apify actors for complex web scraping tasks not covered by standard tools"; static readonly longDescription = "\n Universal integration with Apify platform for running any Apify actor.\n\n This is a generic service bubble that can execute any Apify actor with any input.\n Actor-specific logic and data transformation should be handled by Tool Bubbles.\n\n Integrated Actors, use them through instagram-tool, reddit-tool, linkedin-tool, youtube-tool, tiktok-tool, twitter-tool, google-maps-tool, app-rankings-tool, etc, not directly:\n - apify/instagram-scraper - Instagram posts, profiles, hashtags\n - apify/instagram-hashtag-scraper - Instagram hashtag posts\n - harvestapi/linkedin-profile-scraper - LinkedIn profile details (name, experience, education, skills)\n - apimaestro/linkedin-profile-posts - LinkedIn profile posts and activity\n - apimaestro/linkedin-posts-search-scraper-no-cookies - Search LinkedIn posts by keyword\n - curious_coder/linkedin-jobs-scraper - LinkedIn job postings\n - streamers/youtube-scraper - YouTube videos and channels\n - pintostudio/youtube-transcript-scraper - YouTube video transcripts\n - clockworks/tiktok-scraper - TikTok profiles, videos, hashtags\n - apidojo/tweet-scraper - Twitter/X profiles, tweets, search results\n - compass/crawler-google-places - Google Maps business listings and reviews\n - slothtechlabs/ios-android-app-rankings-scraper - Apple & Google Play top chart rankings\n - IMPORTANT: For other actors, use discovery mode to find the actor and its page, then use the web scrape tool to scrape the input schema page to get the input/output schema details.\n\n Discovery Mode:\n - Provide a \"search\" parameter to discover available actors\n - Optionally set \"limit\" to control the number of results (default: 20, max: 1000)\n - Returns actor information including input schemas, descriptions, and metadata\n - This mode is specifically designed for discovering available actors and their capabilities\n - Example: { search: \"google flights prices\", limit: 10 } to find Google flights related actors\n\n Use cases:\n - Discovering available actors and their schemas then\n - IMPORTANT: Specific scraping tasks that are not covered by the supported actors and seems hard to do through normal scraping by going to actor https://apify.com/$owner/$actorid/input-schema page and scrape the input schema details.\n\n DO NOT Use:\n - Media generation tasks (e.g., image generation, video generation, audio generation, etc.)\n\n "; static readonly alias = "scrape"; constructor(params: TypedApifyParamsInput, context?: BubbleContext, instanceId?: string); protected chooseCredential(): string | undefined; testCredential(): Promise; protected performAction(context?: BubbleContext): Promise>; private startActorRun; private waitForActorCompletion; private getRunStatus; private fetchDatasetItems; /** * Discovery mode: Search for available Apify actors and return their information * This is a special mode activated when the "search" parameter is provided */ private discoverActors; } export {}; //# sourceMappingURL=apify.d.ts.map