import type { HttpClient } from "../http-client.js"; import type { Criteria } from "./criteria.js"; import type { SingleFilter } from "./criteria.js"; export declare class ApiContext { private languageId; inheritance: boolean | null; versionId: string | null; skipTriggerFlows: boolean | null; indexingSkip: string | null; indexingBehaviour: string | null; constructor(languageId?: string | null, inheritance?: boolean | null, versionId?: string | null, skipTriggerFlows?: boolean | null, indexingSkip?: string | null, indexingBehaviour?: string | null); toHeaders(): Record; } export declare class EntityRepository { private client; private entityName; constructor(client: HttpClient, entityName: string); /** * Search for entities with the given criteria * * When using Criteria, the returned entities will have type-safe associations * based on which associations were added to the criteria. */ search(criteria: Criteria, context?: ApiContext): Promise>; /** * Search for entity IDs with the given criteria */ searchIds(criteria: Criteria, context?: ApiContext): Promise; /** * Aggregate entities with the given criteria */ aggregate(criteria: Criteria, context?: ApiContext): Promise>; upsert(payload: Entity[], context?: ApiContext): Promise; delete(payload: DeleteType[], context?: ApiContext): Promise; deleteByFilters(filters: SingleFilter[], context?: ApiContext): Promise; } export declare class SyncService { private client; constructor(client: HttpClient); sync(operations: SyncOperation[], context?: ApiContext): Promise; } export declare class SyncOperation { key: string; entity: string; action: "upsert" | "delete"; payload: object[]; criteria: SingleFilter[] | null; constructor(key: string, entity: string, action: "upsert" | "delete", payload: object[], criteria?: SingleFilter[] | null); } /** * Result of an entity search operation * * Contains the search results with proper typing for associated entities * when used with the enhanced Criteria class. */ export declare class EntitySearchResult { total: number; aggregations: Aggregations; data: Entity[]; constructor(total: number, aggregations: Aggregations, data: Entity[]); /** * Get the first result or null if no results * * The returned entity will be properly typed with all associations * that were added to the criteria. */ first(): Entity | null; } export declare const Defaults: { systemLanguageId: string; liveVersion: string; systemCurrencyId: string; salesChannelTypeApi: string; salesChannelTypeSalesChannel: string; salesChannelTypeProductComparision: string; }; export declare function uuid(): string; //# sourceMappingURL=admin-api.d.ts.map