import { SecurityContext } from "../../types"; import { Identity } from "@webiny/api-authentication/types"; export type GroupSlug = string | undefined; export type TeamSlug = string | undefined; export interface GroupsTeamsAuthorizerConfig { /** * Specify an `identityType` if you want to only run this authorizer for specific identities. */ identityType?: string; /** * @deprecated Return group slugs from the `getIdentity` function instead. * Get a group slug to load permissions from. */ getGroupSlug?: (context: TContext) => Promise | GroupSlug; /** * If a security group is not found, try loading it from a parent tenant (default: true). */ inheritGroupsFromParentTenant?: boolean; /** * Check whether the current identity is authorized to access the current tenant. */ canAccessTenant?: (context: TContext) => boolean | Promise; } export interface ListPermissionsFromGroupsAndTeamsParams { config: GroupsTeamsAuthorizerConfig; identity: Identity; localeCode: string; context: TContext; } export declare const listPermissionsFromGroupsAndTeams: = SecurityContext>(params: ListPermissionsFromGroupsAndTeamsParams) => Promise<{ _src: string; name: string; }[] | null>;