twenty / packages /twenty-shared /src /application /deterministic-identifier /compute-deterministic-uuid.util.ts
Jules
Initial clean CRM deployment with prebuilt assets
d9494a5
Raw
History Blame Contribute Delete
456 Bytes
import { v5 } from 'uuid';
import { type DeterministicEntityNamespace } from '@/application/deterministic-identifier/deterministic-entity-namespace.type';
export const computeDeterministicUuid = ({
entityNamespace,
value,
applicationUniversalIdentifier,
}: {
entityNamespace: DeterministicEntityNamespace;
value: string;
applicationUniversalIdentifier: string;
}): string => v5(`${entityNamespace}:${value}`, applicationUniversalIdentifier);