import { Web5Agent } from './types/agent.js'; import { DwnInterface } from './types/dwn.js'; import { CreateGrantParams, CreateRequestParams, CreateRevocationParams, FetchPermissionRequestParams, FetchPermissionsParams, GetPermissionParams, IsGrantRevokedParams, PermissionGrantEntry, PermissionRequestEntry, PermissionRevocationEntry, PermissionsApi } from './types/permissions.js'; export declare class AgentPermissionsApi implements PermissionsApi { /** cache for fetching a permission {@link PermissionGrant}, keyed by a specific MessageType and protocol */ private _cachedPermissions; private _agent?; get agent(): Web5Agent; set agent(agent: Web5Agent); constructor({ agent }?: { agent?: Web5Agent; }); getPermissionForRequest({ connectedDid, delegateDid, delegate, messageType, protocol, cached }: GetPermissionParams): Promise; fetchGrants({ author, target, grantee, grantor, protocol, remote }: FetchPermissionsParams): Promise; fetchRequests({ author, target, protocol, remote }: FetchPermissionRequestParams): Promise; isGrantRevoked({ author, target, grantRecordId, remote }: IsGrantRevokedParams): Promise; createGrant(params: CreateGrantParams): Promise; createRequest(params: CreateRequestParams): Promise; createRevocation(params: CreateRevocationParams): Promise; clear(): Promise; /** * Matches the appropriate grant from an array of grants based on the provided parameters. * * @param delegated if true, only delegated grants are turned, if false all grants are returned including delegated ones. */ static matchGrantFromArray(grantor: string, grantee: string, messageParams: { messageType: T; protocol?: string; protocolPath?: string; contextId?: string; }, grants: PermissionGrantEntry[], delegated?: boolean): Promise; private static matchScopeFromGrant; private static isUnrestrictedProtocolScope; } //# sourceMappingURL=permissions-api.d.ts.map