import { v1 } from "@authzed/authzed-node"; //#region src/auth/authz/client.d.ts type ZedClientInterface = ReturnType; /** * Get the SpiceDB client singleton. * Creates a new client on first call. */ declare function getSpiceClient(): ZedClientInterface; /** * Reset the client (useful for testing) */ declare function resetSpiceClient(): void; declare const RelationshipOperation: typeof v1.RelationshipUpdate_Operation; declare const Permissionship: typeof v1.CheckPermissionResponse_Permissionship; /** * Check if a subject has a permission on a resource. */ declare function checkPermission(params: { resourceType: string; resourceId: string; permission: string; subjectType: string; subjectId: string; }): Promise; /** * Check multiple permissions on a resource in a single request. * More efficient than multiple checkPermission calls. * * @returns Record mapping permission names to boolean results */ declare function checkBulkPermissions(params: { resourceType: string; resourceId: string; permissions: string[]; subjectType: string; subjectId: string; }): Promise>; /** * Find all resources of a type that a subject has a permission on. */ declare function lookupResources(params: { resourceType: string; permission: string; subjectType: string; subjectId: string; }): Promise; /** * Write a relationship to SpiceDB. */ declare function writeRelationship(params: { resourceType: string; resourceId: string; relation: string; subjectType: string; subjectId: string; }): Promise; /** * Delete a relationship from SpiceDB. */ declare function deleteRelationship(params: { resourceType: string; resourceId: string; relation: string; subjectType: string; subjectId: string; }): Promise; /** * Read relationships for a resource to list subjects with access. * Optionally filter by subject type and ID. */ declare function readRelationships(params: { resourceType: string; resourceId?: string; relation?: string; subjectType?: string; subjectId?: string; }): Promise>; //#endregion export { Permissionship, RelationshipOperation, checkBulkPermissions, checkPermission, deleteRelationship, getSpiceClient, lookupResources, readRelationships, resetSpiceClient, v1, writeRelationship };