import { SalesforceLookupService, SalesforceSchemaService } from '@vlocode/salesforce'; import { Logger } from '@vlocode/core'; import { CancellationToken } from '@vlocode/util'; import { VlocityNamespaceService, VlocityMatchingKeyService, VlocityDatapackReference } from '@vlocode/vlocity'; import { DatapackDeploymentRecord } from './datapackDeploymentRecord'; import { DatapackDependencyResolver, DependencyResolutionRequest } from './datapackDependencyResolver'; /** * Describes a records status in the target org. */ /** * Represents the status of a record in an org. */ export interface OrgRecordStatus { /** * Record ID in the target org. */ recordId: string; /** * True if the record is in sync with the target org and all fields match. */ inSync: boolean; mismatchedFields?: Array<{ field: string; actual: any; expected: any; }>; } export declare class DatapackLookupService implements DatapackDependencyResolver { private readonly namespaceService; private readonly matchingKeyService; private readonly lookupService; private readonly schema; private readonly logger; private readonly lookupCache; private readonly distinctLogger; constructor(namespaceService: VlocityNamespaceService, matchingKeyService: VlocityMatchingKeyService, lookupService: SalesforceLookupService, schema: SalesforceSchemaService, logger?: Logger); /** * Resolve the record if od a dependency in Salesforce; returns the real record ID of a decency. * @param dependency Dependency who's ID to resolve */ resolveDependency(dependency: VlocityDatapackReference, datapackRecord: DatapackDeploymentRecord): Promise; /** * Resolve the record if od a dependency in Salesforce; returns the real record ID of a decency. * @param dependency Dependency who's ID to resolve */ resolveDependencies(dependencies: DependencyResolutionRequest[]): Promise>; /** * Bulk lookup of records in Salesforce using the current matching key configuration; * @param records Array of Records to lookup; note the index of the record corresponds to the index in the result array * @returns Array with all IDs found in Salesforce; array index matches the order of the records as provided */ lookupIds(datapackRecords: DatapackDeploymentRecord[], cancelToken?: CancellationToken): Promise>; /** * Lookup multiple records over multiple SObjects using the specified filters * @param lookups lookup requests * @returns Array with all matched records or undefined when no matches found */ private lookupMultiple; /** * Compare datapack records with ID @see DatapackDeploymentRecord.recordId to org data and return per record details * if the record is up to date with the org * @param datapacks Datapack records to lookup * @param cancelToken * @returns Record org status returned as map keyed by both record ID and source key */ compareRecordsToOrgData(datapacks: DatapackDeploymentRecord[], cancelToken?: CancellationToken): Promise>; private isUpdateableField; private fieldEquals; private buildFilter; private normalizeFilter; private getParentRecordMatchingFields; private resolveFieldDescribe; private isLookupFormula; private getSourceKey; private getCachedEntry; private updateCachedEntry; private getCache; } //# sourceMappingURL=datapackLookupService.d.ts.map