Skip to content

The open alternative to Salesforce, designed for AI.

456 B
Raw Blame
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);