iya-sts
    Preparing search index...

    Variable spendPreAuthorizedCode

    spendPreAuthorizedCode: (
        code: string,
        record: any,
    ) => Promise<
        | { description?: undefined; errorCode?: undefined; ok: boolean }
        | { description: string; errorCode: string; ok: boolean },
    > = ...

    Type Declaration

      • (
            code: string,
            record: any,
        ): Promise<
            | { description?: undefined; errorCode?: undefined; ok: boolean }
            | { description: string; errorCode: string; ok: boolean },
        >
      • Claims a pre-authorized code once across the cluster; exactly one caller on any node gets { ok: true }. Fails closed when the store cannot be asked.

        Parameters

        • code: string

          the pre-authorized code

        • record: any

          its record

        Returns Promise<
            | { description?: undefined; errorCode?: undefined; ok: boolean }
            | { description: string; errorCode: string; ok: boolean },
        >

        { ok: true }, or { ok: false, errorCode, description }