import type { AnswerId } from '../models/AnswerId'; import type { AnswerQuestionCommandDto } from '../models/AnswerQuestionCommandDto'; import type { StartSurveyDto } from '../models/StartSurveyDto'; import type { SurveyResponseId } from '../models/SurveyResponseId'; import type { UserSurveyVm } from '../models/UserSurveyVm'; import type { CancelablePromise } from '../core/CancelablePromise'; export declare class SurveysPublicService { /** * Begins a new survey response for the authenticated user for the specified survey. * @param surveyId * @param requestBody * @returns SurveyResponseId OK * @throws ApiError */ static createSurveyResponse(surveyId: string, requestBody?: StartSurveyDto): CancelablePromise; /** * Returns the active survey for the application that the user has not yet answered for that application. * Only returns an Sam.Api.Enums.Surveys.SurveyState.Active survey for the application that the authenticated user has not completed or opted out of. * @param applicationName The name of the application. * @returns UserSurveyVm The active survey for the application to prompt the user with. Null if no active survey is available. * @throws ApiError */ static getActiveSurveyForApplication(applicationName: string): CancelablePromise; /** * Updates or creates the authenticated user's answer to the question. * ## Business Rules: * One answer per user per question. * * ## Restrictions: * - The OptionIds listed must exist for that question * - The number of OptionIds listed cannot exceed Sam.Api.Models.Dto.SurveyPublic.Response.QuestionPublicDto.MaxSelections for the question. * - Survey must be Sam.Api.Enums.Surveys.SurveyState.Active * - User cannot have Sam.Api.Enums.Surveys.SurveyResponseStatus.Completed the survey or Sam.Api.Enums.Surveys.SurveyResponseStatus.OptedOut. * @param surveyResponseId * @param requestBody * @returns AnswerId The updated answer. * @throws ApiError */ static upsertSurveyResponse(surveyResponseId: string, requestBody?: AnswerQuestionCommandDto): CancelablePromise; /** * Finalizes the survey response * ## Business Rules: * All questions must be answered before finalizing * @param surveyResponseId * @returns void * @throws ApiError */ static finalizeSurveyResponse(surveyResponseId: string): CancelablePromise; }