Skip to content

The open alternative to Salesforce, designed for AI.

605 B
Raw Blame
import { computeDeterministicUuid } from '@/application/deterministic-identifier/compute-deterministic-uuid.util';

// An option is identified by its stable value (not its renameable label) within its field.
export const getSelectOptionUniversalIdentifier = ({
  applicationUniversalIdentifier,
  fieldUniversalIdentifier,
  value,
}: {
  applicationUniversalIdentifier: string;
  fieldUniversalIdentifier: string;
  value: string;
}): string =>
  computeDeterministicUuid({
    entityNamespace: 'selectOption',
    value: `${fieldUniversalIdentifier}:${value}`,
    applicationUniversalIdentifier,
  });