import { Command } from '@oclif/core'; import { OAuthCommand } from '@salesforce/b2c-tooling-sdk/cli'; import type { ResolvedB2CConfig } from '@salesforce/b2c-tooling-sdk/config'; import { type SlasClient, type SlasComponents } from '@salesforce/b2c-tooling-sdk'; export type Client = SlasComponents['schemas']['Client']; export type ClientRequest = SlasComponents['schemas']['ClientRequest']; /** * JSON output structure for SLAS client commands */ export interface ClientOutput { clientId: string; name: string; secret?: string; scopes: string[]; channels: string[]; redirectUri: string; callbackUri?: string; isPrivateClient: boolean; } /** * Normalize a client response from the API. * Handles scopes being returned as space-separated string. */ export declare function normalizeClientResponse(client: Client): ClientOutput; /** * Print client details in a formatted table. */ export declare function printClientDetails(output: ClientOutput, showSecret?: boolean): void; /** * Parse a SLAS URI list (redirect URIs or callback URIs) into individual URIs. * * The SLAS API returns both fields as a single pipe-delimited string (e.g. "http://a|http://b"). * This helper also accepts: * - an array response, where each element is a URI (and may itself be pipe-delimited); and * - a comma-delimited string, which is what {@link normalizeClientResponse} produces when it * joins an array response for display. * * This is the single source of truth for splitting SLAS URI lists — both the display path and * the update request-building path use it, so the two cannot drift (as they previously did when * update split callback URIs on commas instead of pipes). * * Empty segments are dropped. */ export declare function parseUriList(value: null | string | string[] | undefined): string[]; export { getApiErrorMessage as formatApiError } from '@salesforce/b2c-tooling-sdk/clients'; /** * Base command for SLAS client operations. * Provides common flags and helper methods. */ export declare abstract class SlasClientCommand extends OAuthCommand { /** * Check if a tenant exists. * Returns true if the tenant exists, false if not found. * Throws (via this.error) if an unexpected error occurs. */ protected checkTenantExists(slasClient: SlasClient, tenantId: string): Promise; /** * Ensure tenant exists, creating it if necessary. * This is required before creating SLAS clients. */ protected ensureTenantExists(slasClient: SlasClient, tenantId: string): Promise; protected getDefaultClientId(method?: 'implicit' | 'user'): string; /** * Get the SLAS client, ensuring short code is configured. */ protected getSlasClient(): SlasClient; } /** * Base command for operations that target an existing SLAS client. * Resolves the client ID from an explicit positional argument first, then configuration. */ export declare abstract class ExistingSlasClientCommand extends SlasClientCommand { static baseFlags: { 'slas-client-id': import("@oclif/core/interfaces").OptionFlag; '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; }; protected loadConfiguration(): Promise; protected requireSlasClientId(clientId?: string): string; }