• Enforce shortcode uniqueness when a document is created. Resolves the (type, shortcode) key (deriving from the name / generating a random id per the resolveShortcodeKey matrix) and writes it back via updateSource, or vetoes the create on an un-deduped collision.

    Parameters

    • doc: any

      The document being created.

    • data: any

      The creation source data (carries _stats.duplicateSource).

    • options: any

      The create options; shortcodeDedupe opts into auto-dedup.

    Returns Promise<boolean | void>

    false to veto the creation, otherwise undefined.