import { Timestamp } from '@bufbuild/protobuf';
export const buildCommonMetadata = ({ id, type, organization, timestamp, tags }) => {
    let timestamps;
    if (timestamp) {
        timestamps = {
            created: Timestamp.fromDate(timestamp.created),
            updated: Timestamp.fromDate(timestamp.updated),
            deactivated: timestamp.deactivated ? Timestamp.fromDate(timestamp.deactivated) : undefined
        };
    }
    return {
        id,
        type,
        organization,
        timestamps,
        tags
    };
};
//# sourceMappingURL=index.js.map