UNPKG

@accounter/server

Version:
16 lines (15 loc) 718 B
import type { AuthModule } from '../types.js'; /** * Expose the authenticated caller's own business memberships. * * Gated with `@requiresAnyRole(["business_owner", "accountant"])`: only callers * holding one of these roles may enumerate their memberships. * * The memberships are already resolved on the request auth context * (`AuthContextProvider.getAuthContext()`), so no additional DB query is needed. * An authenticated user with no memberships returns an empty list, not an error. * * Each membership's `id` is a composite of the caller's user id and the business * id, since a membership has no single-column identity of its own. */ export declare const membershipsResolvers: AuthModule.Resolvers;