UNPKG

oso-cloud

Version:

Oso Cloud Node.js Client SDK

34 lines 1.12 kB
import { Api } from "./api"; /** * A testing utility for comparing expected authorization * decisions with actual results in Oso Migrate. */ export declare class ParityHandle { private api?; private requestId?; private expected; /** * @internal * Internal method called by the API class after authorize. * @param {string | null}requestId The ID of the authorization request * @param api Reference to the API instance * @throws Error If request_id is set twice */ set(requestId: string, api: Api): void; /** * Sets the expected result for this authorization check. * This can be called either before or after the authorization check, * but can only be called once per handle. * * @param expected The expected authorization result * @throws @TypeError If expected is not a boolean * @throws @Error If expected result is set twice */ expect(expected: boolean): void; /** * Internal method to send the expectation to the API. * @private */ private send; } //# sourceMappingURL=parity-handle.d.ts.map