import { BaseFormBuilderAction, FormResponse } from '../../base/base-form-builder.action.js'; import { AxiosInstance } from 'axios'; /** * SurveyMonkey API response structures */ export interface SurveyMonkeyResponse { id: string; href: string; recipient_id?: string; collection_mode: string; response_status: string; custom_value?: string; first_name?: string; last_name?: string; email_address?: string; ip_address?: string; logic_path?: Record; metadata?: Record; page_path?: Array<{ id: string; }>; collector_id: string; survey_id: string; custom_variables?: Record; edit_url?: string; analyze_url?: string; total_time: number; date_created: string; date_modified: string; pages?: Array<{ id: string; questions: Array<{ id: string; variable_id?: string; answers: Array<{ choice_id?: string; row_id?: string; col_id?: string; other_id?: string; text?: string; tag_data?: Array<{ text: string; tag?: string; }>; }>; }>; }>; } export interface SurveyMonkeyResponsesResult { data: SurveyMonkeyResponse[]; per_page: number; page: number; total: number; links: { self: string; next?: string; }; } export interface SurveyMonkeySurveyDetails { id: string; title: string; nickname?: string; href: string; language: string; question_count: number; page_count: number; response_count: number; date_created: string; date_modified: string; buttons_text?: { next_button?: string; prev_button?: string; done_button?: string; exit_button?: string; }; custom_variables?: Record; preview?: string; edit_url?: string; collect_url?: string; analyze_url?: string; summary_url?: string; } export interface SurveyMonkeyCollector { id: string; type: string; name: string; status: string; response_count: number; href: string; } /** * Base class for all SurveyMonkey actions. * Handles SurveyMonkey-specific authentication and API interaction patterns. */ export declare abstract class SurveyMonkeyBaseAction extends BaseFormBuilderAction { protected get formPlatform(): string; protected get integrationName(): string; protected get apiBaseUrl(): string; private axiosInstance; private currentAccessToken; /** * Get axios instance with SurveyMonkey authentication */ protected getAxiosInstance(accessToken: string): AxiosInstance; /** * Get responses from a SurveyMonkey survey */ protected getSurveyMonkeyResponses(surveyId: string, accessToken: string, options?: { per_page?: number; page?: number; start_created_at?: string; end_created_at?: string; start_modified_at?: string; end_modified_at?: string; sort_order?: 'ASC' | 'DESC'; sort_by?: 'date_modified' | 'date_created'; status?: 'completed' | 'partial' | 'overquota' | 'disqualified'; }): Promise; /** * Get all responses with automatic pagination */ protected getAllSurveyMonkeyResponses(surveyId: string, accessToken: string, options?: { start_created_at?: string; end_created_at?: string; start_modified_at?: string; end_modified_at?: string; sort_order?: 'ASC' | 'DESC'; sort_by?: 'date_modified' | 'date_created'; status?: 'completed' | 'partial' | 'overquota' | 'disqualified'; maxResponses?: number; }): Promise; /** * Get a single response by ID with detailed information */ protected getSingleSurveyMonkeyResponse(surveyId: string, responseId: string, accessToken: string): Promise; /** * Get survey details */ protected getSurveyMonkeyDetails(surveyId: string, accessToken: string): Promise; /** * Get survey pages and questions for detailed response normalization */ protected getSurveyMonkeyPages(surveyId: string, accessToken: string): Promise; /** * Get collectors for a survey */ protected getSurveyMonkeyCollectors(surveyId: string, accessToken: string): Promise; /** * Create a new collector for a survey */ protected createSurveyMonkeyCollector(surveyId: string, accessToken: string, collectorData: { type: 'weblink' | 'email'; name: string; thank_you_message?: string; redirect_url?: string; }): Promise; /** * Update survey details */ protected updateSurveyMonkey(surveyId: string, accessToken: string, updateData: { title?: string; nickname?: string; language?: string; buttons_text?: { next_button?: string; prev_button?: string; done_button?: string; exit_button?: string; }; custom_variables?: Record; }): Promise; /** * Normalize SurveyMonkey response to common format */ protected normalizeSurveyMonkeyResponse(smResponse: SurveyMonkeyResponse): FormResponse; /** * Handle SurveyMonkey-specific errors */ protected handleSurveyMonkeyError(error: any): Error; /** * Sleep helper for rate limiting */ protected sleep(ms: number): Promise; /** * Format date for SurveyMonkey API (ISO 8601 format) */ protected formatSurveyMonkeyDate(date: Date): string; /** * Parse SurveyMonkey date string */ protected parseSurveyMonkeyDate(dateValue: string): Date; } //# sourceMappingURL=surveymonkey-base.action.d.ts.map