import { J as JsonValue, P as PagedSubmissionStorageAdapter, h as SubmissionPageQueryOptions, i as FormResponse, a as FormSubmission, j as SubmissionFilter } from './analytics-B1eUnjBp.cjs'; import './lifecycle.cjs'; import './i18n/keys.cjs'; interface PaginationIteratorOptions { readonly pageSize?: number; readonly maxItems?: number; readonly signal?: AbortSignal; } interface SubmissionCursorPayload { readonly kind: "submission"; readonly formId: string; readonly submittedAt: string; readonly id: string; } interface TextAnswerCursorPayload { readonly kind: "text_answer"; readonly formId: string; readonly fieldId: string; readonly submittedAt: string; readonly submissionId: string; } type StorageCursor = string; interface StorageFilterCriteria { readonly fieldId?: string; readonly fromDate?: string; readonly toDate?: string; readonly metadataFilters?: Readonly>; } interface PaginatedResult { readonly items: readonly T[]; readonly hasMore: boolean; readonly nextCursor?: StorageCursor; readonly totalScannedCount: number; } interface CursorPagingOptions { readonly pageSize: number; readonly cursor?: StorageCursor; readonly maxScanPages?: number; } declare function paginateWithFilter(params: { readonly pageSize: number; readonly cursor?: StorageCursor; readonly maxScanPages?: number; readonly fetchPage: (rawCursor: StorageCursor | undefined, limit: number) => Promise<{ readonly rawItems: readonly T[]; readonly rawNextCursor?: StorageCursor; }>; readonly filterPredicate: (item: T) => boolean; readonly encodeCursor: (lastItem: T) => StorageCursor; }): Promise>; declare function iterateSubmissionPages(adapter: PagedSubmissionStorageAdapter, formId: string, queryOptions?: SubmissionPageQueryOptions, options?: PaginationIteratorOptions): AsyncIterable; interface SubmissionCursorValue { readonly submittedAt: string; readonly responseId: string; } declare function encodeStorageSubmissionCursor(value: SubmissionCursorPayload): StorageCursor; declare function decodeStorageSubmissionCursor(cursor: StorageCursor): SubmissionCursorPayload; declare function encodeStorageTextAnswerCursor(value: TextAnswerCursorPayload): StorageCursor; declare function decodeStorageTextAnswerCursor(cursor: StorageCursor): TextAnswerCursorPayload; interface TextAnswerCursorValue { readonly responseId: string; readonly fieldId: string; } declare function encodeSubmissionCursor(value: SubmissionCursorValue): string; declare function decodeSubmissionCursor(cursor: string): SubmissionCursorValue; declare function encodeTextAnswerCursor(value: TextAnswerCursorValue): string; declare function decodeTextAnswerCursor(cursor: string): TextAnswerCursorValue; declare function normalizeSubmissionPageSize(pageSize: number | undefined, fallback?: number): number; declare function jsonValuesEqual(left: JsonValue | undefined, right: JsonValue | undefined): boolean; declare function matchesSubmissionFilter(submission: FormSubmission, filter: SubmissionFilter): boolean; declare function matchesSubmissionPageFilters(submission: FormSubmission, options: Pick): boolean; export { type CursorPagingOptions, type PaginatedResult, type PaginationIteratorOptions, type StorageCursor, type StorageFilterCriteria, type SubmissionCursorPayload, type SubmissionCursorValue, type TextAnswerCursorPayload, type TextAnswerCursorValue, decodeStorageSubmissionCursor, decodeStorageTextAnswerCursor, decodeSubmissionCursor, decodeTextAnswerCursor, encodeStorageSubmissionCursor, encodeStorageTextAnswerCursor, encodeSubmissionCursor, encodeTextAnswerCursor, iterateSubmissionPages, jsonValuesEqual, matchesSubmissionFilter, matchesSubmissionPageFilters, normalizeSubmissionPageSize, paginateWithFilter };