import { ApiPath, HttpMethod } from '../core/decorators/kos-service-request';
import { IKosDataModel } from '../core/kosModel';
/**
 * Utility functions for accessing cached service responses from ServiceResponseStore
 *
 * These functions provide type-safe access to responses stored by @kosServiceRequest
 * decorated methods, eliminating the need for "magic last parameter" patterns.
 *
 * @example
 * ```typescript
 * @kosServiceRequest({
 *   path: PATH_INGREDIENTS,
 *   method: 'get',
 *   lifecycle: DependencyLifecycle.LOAD
 * })
 * private onIngredientsLoaded(): void {
 *   const response = getServiceResponse(this, PATH_INGREDIENTS, 'get');
 *   this.processIngredients(response.data.ingredients);
 * }
 * ```
 */
/**
 * Get cached service response by path and method
 *
 * Returns the response data cached by @kosServiceRequest decorated methods.
 * TypeScript will infer types from your OpenAPI schema when using typed path constants.
 *
 * For cross-package scenarios where OpenAPI specs differ, you can optionally
 * provide an explicit type parameter.
 *
 * @param model - The KOS model instance
 * @param path - The API path constant
 * @param method - The HTTP method (defaults to 'get')
 * @returns The cached response data, or undefined if not found/expired
 *
 * @kosService core.service-response
 *
 * @example Standard usage (types inferred from OpenAPI)
 * ```typescript
 * const status = getServiceResponse(this, PATH_DEVICE_STATUS, 'get');
 * // TypeScript infers the type from PATH_DEVICE_STATUS
 * ```
 *
 * @example Cross-package usage with explicit type (when OpenAPI schemas differ)
 * ```typescript
 * // Studio models using different OpenAPI than main SDK
 * const vms = getServiceResponse<StudioVMResponse>(this, PATH_VMS, 'get');
 * ```
 * @kosApiLevel 15
 */
export declare function getServiceResponse<T = any>(model: IKosDataModel, path: ApiPath, method?: HttpMethod): T | undefined;
/**
 * Check if a cached response exists for the given path and method
 *
 * @param model - The KOS model instance
 * @param path - The API path constant
 * @param method - The HTTP method (defaults to 'get')
 * @returns true if a valid cached response exists
 *
 * @kosService core.service-response
 *
 * @example
 * ```typescript
 * if (hasCachedResponse(this, PATH_DEVICE_STATUS, 'get')) {
 *   // Use cached data
 *   const status = getServiceResponse(this, PATH_DEVICE_STATUS, 'get');
 * } else {
 *   // Fetch fresh data
 *   await this.refreshStatus();
 * }
 * ```
 * @kosApiLevel 15
 */
export declare function hasCachedResponse(model: IKosDataModel, path: ApiPath, method?: HttpMethod): boolean;
/**
 * Manually clear a cached service response
 *
 * @param model - The KOS model instance
 * @param path - The API path constant
 * @param method - The HTTP method (defaults to 'get')
 *
 * @kosService core.service-response
 *
 * @example
 * ```typescript
 * // Clear cached response to force refresh on next request
 * clearServiceResponse(this, PATH_TEMP_DATA, 'post');
 * ```
 * @kosApiLevel 15
 */
export declare function clearServiceResponse(model: IKosDataModel, path: ApiPath, method?: HttpMethod): void;
/**
 * Clear all cached responses for a specific path (all methods)
 *
 * @param model - The KOS model instance
 * @param path - The API path constant
 *
 * @kosService core.service-response
 *
 * @example
 * ```typescript
 * // Clear all cached responses for this endpoint
 * clearPath(this, PATH_INGREDIENTS);
 * // Clears GET, POST, PUT, DELETE responses for this path
 * ```
 * @kosApiLevel 15
 */
export declare function clearPath(model: IKosDataModel, path: ApiPath): void;
/**
 * Clear all cached service responses in the model
 *
 * @param model - The KOS model instance
 *
 * @kosService core.service-response
 *
 * @example
 * ```typescript
 * // Clear all cached responses (typically during model cleanup)
 * clearAllServiceResponses(this);
 * ```
 * @kosApiLevel 15
 */
export declare function clearAllServiceResponses(model: IKosDataModel): void;
//# sourceMappingURL=service-response.d.ts.map