@cfxlabsinc/b2b-services
    Preparing search index...

    Type Alias CognitoLinkableUsers<TUser>

    The dashboard user services' shape, as linking reads and writes it.

    type CognitoLinkableUsers<TUser extends { id: string }> = {
        linkCognito(
            input: { cognitoSub: string; id: TUser["id"] },
        ): Promise<
            { ok: true }
            | { error: { code: string; message?: string }; ok: false },
        >;
        search(
            input: {
                cognitoLinked?: boolean;
                cognitoSubs?: string[];
                emails?: string[];
                pageSize: number;
            },
        ): Promise<{ value: { items: TUser[] } }>;
    }

    Type Parameters

    • TUser extends { id: string }
    Index
    • Parameters

      • input: { cognitoSub: string; id: TUser["id"] }

      Returns Promise<{ ok: true } | { error: { code: string; message?: string }; ok: false }>

    • Parameters

      • input: {
            cognitoLinked?: boolean;
            cognitoSubs?: string[];
            emails?: string[];
            pageSize: number;
        }

      Returns Promise<{ value: { items: TUser[] } }>