import type { CommandModule } from 'yargs'; import { type PodModelDescriptor } from '@undefineds.co/models'; import { type CliAuthContext } from '../lib/auth-context'; interface ObjArgs { url?: string; json: boolean; } interface ObjMutationRow { op?: string; schema?: string; match?: Record; set?: Record; subject?: string; path?: string; resource?: string; predicate?: string; object?: string; ifMatch?: string; body?: string; from?: string; contentType?: string; } interface ResolvedObjSelector { descriptor: PodModelDescriptor; subject?: string; resourceUrl?: string; where: Record; relations: Record; limit: number; includeMetadata: boolean; } interface DescriptorObject { schema: string; subject: string; resourceUrl: string; etag?: string | null; revision?: string | null; object: Record; } type ItemResult = { index: number; ok: boolean; code: string; message?: string; [key: string]: unknown; }; type ObjMutationContext = CliAuthContext & { planningOnly?: boolean; planningWarning?: string; pendingOnly?: boolean; pendingWarning?: string; outboxPath?: string; }; export declare function resolveObjMutationContext(argv: ObjArgs, commit: boolean): Promise; export declare function getObjLocalOutboxPath(): string; export declare function redactDescriptorObject(descriptor: PodModelDescriptor, value: Record): Record; export declare function serializeSchemaDescriptor(descriptor: PodModelDescriptor): Record; export declare function listSchemaDescriptors(input?: { domain?: string; }, descriptors?: readonly PodModelDescriptor[]): Record[]; export declare function describeSchemaDescriptor(schemaOrAlias: string, descriptors?: readonly PodModelDescriptor[]): Record | null; export declare function buildDescriptorUpsertSparql(descriptor: PodModelDescriptor, subject: string, row: ObjMutationRow): string; export declare function buildDescriptorPatchSparql(descriptor: PodModelDescriptor, subject: string, set: Record): string; export declare function buildDescriptorLinkSparql(subject: string, predicate: string, object: string): string; export declare function buildDescriptorDeleteSparql(subject: string): string; export declare function extractReservedWhereSelectors(where: Record): { where: Record; subject?: string; resource?: string; path?: string; }; export declare function buildDescriptorObjectQuery(selector: ResolvedObjSelector): string; export declare function descriptorObjectFromTurtle(descriptor: PodModelDescriptor, subject: string, resourceUrl: string, turtle: string): DescriptorObject | null; export declare function descriptorUpsertPlanItem(input: { descriptor: PodModelDescriptor; index: number; commit: boolean; podRoot: string; row: ObjMutationRow; }): ItemResult; export declare function executeRows(input: { argv: ObjArgs; rows: ObjMutationRow[]; defaultSchema?: string; commit: boolean; }): Promise; export declare function mutationItemsResultCode(items: ItemResult[], commit: boolean): 'plan_ready' | 'committed' | 'pending_local' | 'partial_failure'; export declare const objCommand: CommandModule; export {};