import { Command } from '@oclif/core'; import { InstanceCommand } from './instance-command.js'; /** * WebDAV root location identifiers. * * These map to the standard B2C Commerce WebDAV directories. */ export declare const WEBDAV_ROOTS: { readonly IMPEX: "Impex"; readonly TEMP: "Temp"; readonly CARTRIDGES: "Cartridges"; readonly REALMDATA: "Realmdata"; readonly CATALOGS: "Catalogs"; readonly LIBRARIES: "Libraries"; readonly STATIC: "Static"; readonly LOGS: "Logs"; readonly SECURITYLOGS: "Securitylogs"; }; /** * Type for valid WebDAV root keys. */ export type WebDavRootKey = keyof typeof WEBDAV_ROOTS; /** * Array of valid root location values for flag validation. */ export declare const VALID_ROOTS: WebDavRootKey[]; /** * Base command for WebDAV file operations. * * Extends InstanceCommand with a `--root` flag to specify the WebDAV * directory root for operations. Provides helper methods for building * paths relative to the selected root. * * @example * ```typescript * export default class MyWebDavCommand extends WebDavCommand { * static args = { * path: Args.string({ required: true, description: 'Remote path' }), * }; * * async run(): Promise { * const fullPath = this.buildPath(this.args.path); * // fullPath = "Impex/src/data/file.xml" when --root=impex path=src/data/file.xml * const entries = await this.instance.webdav.propfind(fullPath); * } * } * ``` */ export declare abstract class WebDavCommand extends InstanceCommand { static baseFlags: { root: import("@oclif/core/interfaces").OptionFlag; server: import("@oclif/core/interfaces").OptionFlag; 'webdav-server': import("@oclif/core/interfaces").OptionFlag; 'code-version': import("@oclif/core/interfaces").OptionFlag; username: import("@oclif/core/interfaces").OptionFlag; password: import("@oclif/core/interfaces").OptionFlag; certificate: import("@oclif/core/interfaces").OptionFlag; passphrase: import("@oclif/core/interfaces").OptionFlag; selfsigned: import("@oclif/core/interfaces").BooleanFlag; verify: import("@oclif/core/interfaces").BooleanFlag; 'client-id': import("@oclif/core/interfaces").OptionFlag; 'client-secret': import("@oclif/core/interfaces").OptionFlag; 'auth-scope': import("@oclif/core/interfaces").OptionFlag; 'short-code': import("@oclif/core/interfaces").OptionFlag; 'tenant-id': import("@oclif/core/interfaces").OptionFlag; 'auth-methods': import("@oclif/core/interfaces").OptionFlag; 'user-auth': import("@oclif/core/interfaces").BooleanFlag; 'account-manager-host': import("@oclif/core/interfaces").OptionFlag; 'jwt-cert': import("@oclif/core/interfaces").OptionFlag; 'jwt-key': import("@oclif/core/interfaces").OptionFlag; 'jwt-passphrase': import("@oclif/core/interfaces").OptionFlag; 'log-level': import("@oclif/core/interfaces").OptionFlag<"trace" | "debug" | "info" | "warn" | "error" | "silent" | undefined, import("@oclif/core/interfaces").CustomOptions>; debug: import("@oclif/core/interfaces").BooleanFlag; json: import("@oclif/core/interfaces").BooleanFlag; jsonl: import("@oclif/core/interfaces").BooleanFlag; lang: import("@oclif/core/interfaces").OptionFlag; config: import("@oclif/core/interfaces").OptionFlag; instance: import("@oclif/core/interfaces").OptionFlag; 'project-directory': import("@oclif/core/interfaces").OptionFlag; 'extra-query': import("@oclif/core/interfaces").OptionFlag; 'extra-body': import("@oclif/core/interfaces").OptionFlag; 'extra-headers': import("@oclif/core/interfaces").OptionFlag; }; /** * Builds a full WebDAV path from the root and a relative path. * * @param relativePath - Path relative to the root directory * @returns Full WebDAV path including the root prefix * * @example * ```typescript * // With --root=impex * this.buildPath('src/data/file.xml') // Returns: "Impex/src/data/file.xml" * this.buildPath('/src/data/file.xml') // Returns: "Impex/src/data/file.xml" * this.buildPath('') // Returns: "Impex" * ``` */ protected buildPath(relativePath: string): string; /** * Gets the current root path. * * @returns The WebDAV root path (e.g., "Impex") */ protected get rootPath(): string; /** * Validates that WebDAV credentials are available before operations. * Called by subclasses that need to ensure auth is configured. */ protected ensureWebDavAuth(): void; }