import { ChainCallDTO, ForbiddenError, UnauthorizedError, UserRole } from "@gala-chain/api"; import { GalaChainContext } from "../types"; export declare class MissingRoleError extends UnauthorizedError { constructor(callingUser: string, callingUserRoles: string[] | undefined, allowedRoles: string[]); } export declare class OrganizationNotAllowedError extends ForbiddenError { constructor(userMsp: string, allowedOrgsMSPs: string[]); } export declare class ChaincodeNotAllowedError extends ForbiddenError { constructor(chaincode: string, allowedChaincodes: string[]); } export declare const useRoleBasedAuth: boolean; export declare const curatorOrgMsp: string; export declare const registrarOrgMsps: string[]; export declare const requireCuratorAuth: { allowedRoles: UserRole[]; allowedOrgs?: undefined; } | { allowedOrgs: string[]; allowedRoles?: undefined; }; export declare const requireRegistrarAuth: { allowedRoles: UserRole[]; allowedOrgs?: undefined; } | { allowedOrgs: string[]; allowedRoles?: undefined; }; export declare function ensureOrganizationIsAllowed(ctx: GalaChainContext, allowedOrgsMSPs: string[] | undefined): void; export declare function ensureCorrectMethodIsUsed(ctx: GalaChainContext, dto: ChainCallDTO | undefined): void; export declare function ensureRoleIsAllowed(ctx: GalaChainContext, allowedRoles: string[]): Promise; export declare function ensureChaincodeIsAllowed(chaincode: string, allowedChaincodes: string[]): void; export interface AuthorizeOptions { allowedOrgs?: string[]; allowedRoles?: string[]; allowedOriginChaincodes?: string[]; quorum?: number; } export declare function authorize(ctx: GalaChainContext, options: AuthorizeOptions, dto: ChainCallDTO | undefined): Promise; //# sourceMappingURL=authorize.d.ts.map