import type { ServiceResult } from '../../models/service-result.js'; import type { DateLiteralRange } from '../../models/date-literal.js'; import type { IRestApiAdapter } from './rest-api-adapter.js'; /** * Standard response envelope from the ISV REST API. */ export type ProfilingRestResponse = { success: boolean; results?: T; result?: T; summary?: Record; errors: string[]; }; /** * Smart definition creation request payload. */ export type SmartCreateRequest = { objects: Array<{ name: string; label: string; }>; method: string; options: { category?: string; timeCategory?: string; segmentCategory?: string; year?: number; usePrior?: boolean; noValueFrequency?: boolean; namePrefix?: string; nameSuffix?: string; origin?: string; recordType?: string; description?: string; dryRun?: boolean; dateLiteralRange?: DateLiteralRange; yearEntries?: Array<{ year: number; unbounded: boolean; }>; }; }; /** * Per-definition result from the smart creation endpoint. */ export type SmartCreateDefinitionResult = { objectName: string; definitionName: string; definitionId?: string; definitionKey?: string; status: 'created' | 'skipped' | 'failed' | 'preview'; errorMessage?: string; fieldCount?: number; type?: string; category?: string; timeCategory?: string; segmentCategory?: string; }; /** * Object filter request payload. */ export type FilterObjectsRequest = { type?: string; namespace?: string; excludeSystemObjects?: boolean; namePattern?: string; nameOperator?: string; classification?: string; hasRecordTypes?: boolean; withOwner?: boolean; limit?: number; }; /** * Thin REST client for calling Cuneiform ISV profiling endpoints. * Wraps the existing IRestApiAdapter.request() method with typed payloads. * * @example * ```typescript * const client = new ProfilingRestClient(restAdapter); * const result = await client.createSmart({ * objects: [{ name: 'Account', label: 'Account' }], * method: 'metadata', * options: { dryRun: true } * }); * ``` */ export declare class ProfilingRestClient { private readonly restAdapter; constructor(restAdapter: IRestApiAdapter); /** * Calls the smart definition creation endpoint. * Server handles naming, categorization, deduplication, and creation. */ createSmart(request: SmartCreateRequest): Promise>>; /** * Calls the object filtering endpoint. * Server applies cost-optimized multi-criteria filter chain. */ filterObjects(request: FilterObjectsRequest): Promise>; /** * Calls the object describe endpoint. */ describeObject(objectName: string, options?: { includeRecordAge?: boolean; includeFieldDistribution?: boolean; withFields?: boolean; withRelationships?: boolean; withProfilingStatus?: boolean; }): Promise>; /** * Calls the data availability grid endpoint. */ getDataAvailability(objects: string[], years: number[]): Promise>; /** * Calls the user readiness endpoint. */ checkUserReadiness(userId?: string): Promise>; /** * Calls the org info endpoint. */ getOrgInfo(): Promise>; /** * Calls the user-configure endpoint (ConfigurationProfileResource). * Separate REST resource at /v1/profiling/configuration/. */ configureUser(options: { userId?: string; enableApiOnlyProfiling?: boolean; enableRegistration?: boolean; profileDeveloperName?: string; dryRun?: boolean; }): Promise>; /** * Generic POST to a profiling REST action. */ private post; }