import type { AdminForthResource, AdminForthResourceColumn } from '../types/Back.js'; /** * Separator used to glue values of composite primary key columns into one record id string. * Values are URI-encoded before gluing, and '~' inside of value is escaped to '%7E', * so separator can't appear in encoded parts. */ export declare const COMPOSITE_RECORD_ID_SEPARATOR = "~"; /** * Returns all columns marked with primaryKey: true, in order in which they are defined in resource. * For resources with composite primary key returns more than one column. */ export declare function primaryKeyColumns(resource: AdminForthResource): AdminForthResourceColumn[]; export declare function primaryKeyColumnNames(resource: AdminForthResource): string[]; export declare function isCompositePrimaryKey(resource: AdminForthResource): boolean; /** * Builds record id (value used in urls and in all AdminForth APIs) from record object. * * For resource with single primary key column returns raw value of that column (no encoding is done, * so behavior is fully backward compatible). * * For resource with composite primary key returns string like 'BTC~ERC20' where each part is * URI-encoded value of corresponding primary key column, in order of definition in resource. */ export declare function encodeRecordId(resource: AdminForthResource, record: any): any; /** * Splits record id back into values of primary key columns. * Returns object like { assetSymbol: 'BTC', networkCode: 'ERC20' }. * * Values are returned as strings for composite keys (they come from url/API), * connectors cast them to column types using setFieldValue. */ export declare function decodeRecordId(resource: AdminForthResource, recordId: any): Record; /** * Returns pkValues argument for connector's updateRecordOriginalValues/deleteRecord. * * Returns undefined for resources with single primary key, so connectors receive exactly the same * arguments as before composite primary key support was added (pure extension, old path untouched). */ export declare function compositePkValues(connector: { getPrimaryKeyValues?: (resource: AdminForthResource, recordId: any) => Record; }, resource: AdminForthResource, recordId: any): Record | undefined; //# sourceMappingURL=recordId.d.ts.map