export interface HasCustomFields { /** * Points at the schema in `erpCustomFieldsSchemas` that should validate `customFields`. * Omit (undefined) to avoid unintentionally overwriting existing server-side values. */ customFieldsSchemaRef?: number | null; /** * Schema-bound custom fields stored on the ERP entity. * Omit (undefined) to avoid unintentionally overwriting existing server-side values. */ customFields?: Record | null; } /** * Apply `customFields` and `customFieldsSchemaRef` to an outgoing API payload. * * IMPORTANT: We only set fields when they are not `undefined` (null is allowed) to avoid * unintended overwrites when callers don't specify custom fields. */ export declare function applyCustomFields>(obj: T, customFields: Pick): T; /** * Convenience helper to construct a "full" API payload from a REST-style payload. */ export declare function toFullApiObjectFromRest(restObj: Record, source: HasCustomFields): Record; /** * Merge non-empty `customFields` into a REST payload. Returns a shallow copy so callers can * keep a strict `Record` base type before widening with optional `customFields`. */ export declare function applyNonEmptyCustomFieldsToRest>(obj: T, customFields: Record | null | undefined): T & { customFields?: Record; }; //# sourceMappingURL=custom-fields.d.ts.map