import { PrimitiveValue } from './common'; import { SchedulerInterval as QuestionPollingInterval } from './scheduler'; import { PersistedResultType } from './reporting'; export { SchedulerInterval as QuestionPollingInterval } from './scheduler'; export declare enum QueryResultsAre { BAD = "BAD", GOOD = "GOOD", INFORMATIVE = "INFORMATIVE", UNKNOWN = "UNKNOWN" } export interface Query { name?: string; query: string; version?: string; lastResult?: { recordCount: number; lastUpdatedTimestamp: number; }; resultsAre?: QueryResultsAre; } export interface QuestionVariable { name: string; required?: boolean; default?: PrimitiveValue; } export interface ComplianceDetails { name: string; description: string; } export interface ComplianceMetaData { type?: string; details?: ComplianceDetails[]; standard?: string; requirements?: string[]; controls?: string[]; } export interface QuestionDetails { /** * Unique name for the question. The uniqueness of the `name` property is * specifically used for packaged questions. When an update to a packaged * question is requested, we use this property to look up the question. */ name: string; title: string; queries: Query[]; version?: number; description?: string; variables?: QuestionVariable[]; accountId?: string; tags?: string[]; integrationDefinitionId?: string; compliance?: ComplianceMetaData[]; defaultAnswerTemplate?: string; pollingInterval?: QuestionPollingInterval; showTrend?: boolean; } export interface Question extends QuestionDetails { id: string; /** * Used to denote the source of a packaged question. For example, a managed * packaged question from the AWS integration: `managed:aws` */ sourceId?: string; s3ObjectKey?: string; /** * True if the customer edited this question. We currently only use this to * determine whether a packaged question can automatically get updated. */ customerEdited?: boolean; lastUpdatedTimestamp: number; } export interface AnswerOutput { name: string; value: PrimitiveValue; } export interface Answer { answerText?: string; outputs: AnswerOutput[]; queryMetaData: QueryMetaData[]; } export interface QuestionEvaluationQueuePayload { question: Pick; accountId: string; } export interface QueryMetaData { query: string; name: string; rawResultKey?: string; persistedResultType: PersistedResultType | undefined; recordCount: number | undefined; recordCreateCount: number | undefined; recordUpdateCount: number | undefined; recordDeleteCount: number | undefined; }