import { Command } from '@oclif/core'; import { type MetricCategory, type MetricsDataResponse } from '@salesforce/b2c-tooling-sdk'; import { MetricsCommand } from './index.js'; /** * The effective query parameters echoed back to the caller (JSON mode) so the * resolved time bounds and filters actually sent to the API are always visible. * Both `from` and `to` are always present: the resolver derives whichever bound * was left open from the 24-hour default window. Filter fields appear only when * the command defines and receives them. */ interface MetricsQueryEcho { category: MetricCategory; /** Resolved start bound (ISO 8601). */ from: string; /** Resolved end bound (ISO 8601). */ to: string; /** Resolved start bound (epoch seconds — the API wire unit). */ fromEpochSeconds: number; /** Resolved end bound (epoch seconds — the API wire unit). */ toEpochSeconds: number; /** True when a bound was derived from the 24-hour default window. */ defaultedWindow?: boolean; /** True when `from` was clamped forward to stay within the 30-day retention window. */ clampedFrom?: boolean; thirdPartyServiceId?: string; apiFamily?: string; apiName?: string; ocapiCategory?: string; ocapiApi?: string; } /** * Command output: the metrics response plus the effective query parameters. */ export interface MetricsGetOutput extends MetricsDataResponse { query: MetricsQueryEcho; } /** * SCAPI-only filter flags (`b2c metrics scapi`). */ export declare const scapiFilterFlags: { 'api-family': import("@oclif/core/interfaces").OptionFlag; 'api-name': import("@oclif/core/interfaces").OptionFlag; }; /** * OCAPI-only filter flags (`b2c metrics ocapi`). */ export declare const ocapiFilterFlags: { 'ocapi-category': import("@oclif/core/interfaces").OptionFlag; 'ocapi-api': import("@oclif/core/interfaces").OptionFlag; }; /** * Third-party-only filter flag (`b2c metrics third-party`). */ export declare const thirdPartyFilterFlags: { 'third-party-service-id': import("@oclif/core/interfaces").OptionFlag; }; /** * Base command for a single metric category (`b2c metrics `). * * Each category is a first-class command — mirroring `b2c cip report ` — * so its `--help` shows only the flags that actually apply to it. The base holds * the shared time-window/output flags and the entire run() body (resolve window * → fetch → enrich tags → render); a subclass only declares its `category` and * spreads in any category-specific filter flags. Because filter flags live on the * subclasses, passing e.g. `--api-family` to `b2c metrics overall` is a * "Nonexistent flag" error rather than a silently-ignored no-op. */ export declare abstract class MetricsCategoryCommand extends MetricsCommand { static enableJsonFlag: boolean; /** * The time-window, tag, and column flags shared by every category command. * Subclasses spread this in and add their own filter flags. */ static timeWindowFlags: { columns: import("@oclif/core/interfaces").OptionFlag; extended: import("@oclif/core/interfaces").BooleanFlag; from: import("@oclif/core/interfaces").OptionFlag; to: import("@oclif/core/interfaces").OptionFlag; window: import("@oclif/core/interfaces").OptionFlag; tags: import("@oclif/core/interfaces").BooleanFlag; }; /** The metric category this command fetches. */ protected abstract readonly category: MetricCategory; run(): Promise; } export {};