import { v1 } from '@authzed/authzed-node'; import { EntitlementsBatchResult, EntitlementsDynamicQuery, EntitlementsResult, PermissionsEntitlementsContext, RequestContextType, UserSubjectContext } from '../../types'; import { SpiceDBResponse } from '../../types/spicedb.dto'; import { LoggingClient } from '../../logging'; export interface HashOptions { hashResourceId: boolean; hashSubjectId: boolean; } export declare abstract class EntitlementsSpiceDBQuery { protected readonly client: v1.ZedPromiseClientInterface; protected readonly loggingClient?: LoggingClient | undefined; protected readonly logResults: boolean; protected constructor(client: v1.ZedPromiseClientInterface, loggingClient?: LoggingClient | undefined, logResults?: boolean); abstract query(entitlementsQuery: EntitlementsDynamicQuery): Promise>; protected createCaveatContext(context: UserSubjectContext): v1.PbStruct; protected createBulkPermissionRequestItem(resourceObjectType: string, resourceObjectId: string, subjectObjectType: string, subjectObjectId: string, caveatContext: v1.PbStruct, hashOptions?: HashOptions): v1.CheckBulkPermissionsRequestItem; protected createBulkPermissionsRequest(objectType: string, objectId: string, context: UserSubjectContext, caveatContext: v1.PbStruct, hashOptions?: HashOptions): v1.CheckBulkPermissionsRequest; protected createManyBulkPermissionsRequest(objectType: string, objectIds: string[], context: UserSubjectContext, caveatContext: v1.PbStruct, hashOptions?: HashOptions): v1.CheckBulkPermissionsRequest; protected processCheckBulkPermissionsResponse(res: v1.CheckBulkPermissionsResponse): boolean; protected processManyCheckBulkPermissionsResponse(res: v1.CheckBulkPermissionsResponse, objectIds: string[], hashResourceId?: boolean): EntitlementsBatchResult; protected executeCommonQuery(objectType: string, objectId: string, subjectContext: UserSubjectContext): Promise>; protected executeManyCommonQuery(objectType: string, objectIds: string[], subjectContext: UserSubjectContext): Promise>; protected isPermissionLinkedToFeatures(requestContext: PermissionsEntitlementsContext, hashResourceId?: boolean): Promise; protected hasPermission(permissionKey: string, permissions?: string[]): boolean; }