import { PrimitiveValue } from './common'; export interface ResultRecordOutput { name: string; value?: PrimitiveValue; } export declare enum PersistedResultType { RAW = "RAW", JSON = "JSON", CSV = "CSV" } export declare enum CollectionType { QUESTION = "QUESTION", RULE_EVALUATION = "RULE_EVALUATION" } /** * The `BaseRawDataDescriptor` is used to describe the raw results * and where they are stored. */ export interface BaseRawDataDescriptor { /** * name of query for which this metadata is associated */ name: string; /** * The format of the persisted raw results (e.g. `PersistedResultType.JSON`) */ persistedResultType: PersistedResultType; /** * The number of records stored in the raw results * (i.e. the number of records that matched the query). */ recordCount: number | undefined; /** * The number of new records that were not in the last raw results */ recordCreateCount: number | undefined; /** * The number of records that were changed since the last raw results */ recordUpdateCount: number | undefined; /** * The number of records that were deleted since the last raw results */ recordDeleteCount: number | undefined; } /** * The `InternalRawDataDescriptor` is used internally and through * the private API. The internal descriptor has the raw S3 data key * while the public-facing descriptor has a `rawDataKey` which is * basically the same as the S3 key but without `accountId` in the path. */ export interface InternalRawDataDescriptor extends BaseRawDataDescriptor { /** * The key in the "results" S3 bucket associated with the raw results * of this query. */ rawDataS3Key: string; } export interface BaseResultRecord { accountId: string; collectionType: CollectionType; collectionOwnerId: string; collectionOwnerVersion: string; timestamp: number; outputs: ResultRecordOutput[]; tag?: string; } export interface ResultRecord extends BaseResultRecord { rawDataDescriptors?: InternalRawDataDescriptor[]; }