WayrApp Backend & Ecosystem Documentation - v1.0.0
    Preparing search index...

    Function generateUniqueId

    • Generates a unique ID by checking for collisions and appending numeric suffixes.

      Parameters

      • name: string

        The human-readable name to convert to an ID

      • maxLength: number

        Maximum length for the generated ID

      • checkExists: (id: string, parentId?: string) => Promise<boolean>

        Function to check if an ID already exists

      • OptionalparentId: string

        Optional parent ID for hierarchical uniqueness checking

      • Optionaloptions: Partial<IdGenerationOptions> = {}

        Additional configuration options

      Returns Promise<string>

      Promise resolving to a unique ID