import { type Databases } from "node-appwrite"; import { z } from "zod"; import type { DatabaseAdapter } from "appwrite-utils-helpers"; /** * Object that contains the context for an action that needs to be executed after import * Used in the afterImportActionsDefinitions * @type {ContextObject} * @typedef {Object} ContextObject * @property {string} collectionId - The ID of the collection * @property {any} finalItem - The final item that was imported * @property {string} action - The name of the action * @property {string[]} params - The parameters for the action * @property {Object} context - The context object for the action (all the data of this specific item) */ export declare const ContextObject: z.ZodObject<{ dbId: z.ZodString; collectionId: z.ZodString; finalItem: z.ZodAny; attributeMappings: z.ZodArray; oldKeys: z.ZodOptional>; targetKey: z.ZodString; valueToSet: z.ZodOptional; fileData: z.ZodOptional>; converters: z.ZodOptional>>; validationActions: z.ZodOptional; }, z.core.$strip>>>>; postImportActions: z.ZodOptional]>>; }, z.core.$strip>>>>; }, z.core.$strip>>; context: z.ZodAny; }, z.core.$strip>; export type ContextObject = z.infer; export declare const createOrFindAfterImportOperation: (database: Databases, collectionId: string, context: ContextObject) => Promise; export declare const addBatch: (database: Databases, data: string) => Promise; export declare const getAfterImportOperations: (database: Databases, collectionId: string) => Promise<{ $id: string; $createdAt: string; $updatedAt: string; operationType: string; collectionId: string; data: any; progress: number; total: number; error: string; status: "error" | "pending" | "ready" | "in_progress" | "completed" | "cancelled"; batches?: string[] | undefined; }[]>; export declare const findOrCreateOperation: (db: DatabaseAdapter, databaseId: string, operationType: string, collectionId?: string, data?: any) => Promise; export declare const updateOperation: (db: DatabaseAdapter, databaseId: string, operationId: string, updates: any) => Promise; export declare const getOperation: (db: DatabaseAdapter, databaseId: string, operationId: string) => Promise; export declare const maxDataLength = 1073741820; export declare const maxBatchItems = 25; export declare const splitIntoBatches: (data: any[]) => any[][];