import { type Client } from "@1password/sdk"; import * as z from "zod"; import type { ResolvedIntegrationAccount } from "../../automation/integrations.js"; import { ONEPASSWORD_EVENTS_INTROSPECTION_SCHEMA, type OnePasswordEventsCursor } from "./schemas.js"; export declare const ONEPASSWORD_SERVICE_ACCOUNT_OPTIONS: { readonly connections: readonly [{ readonly connectionMethodId: "service-account"; }]; }; /** * Selects an Events API token with the feature required by one event feed. * * @param requiredScope - Feature the selected account must expose. */ export declare function onePasswordEventsAccountOptions(requiredScope?: "auditevents" | "itemusages" | "signinattempts"): { readonly connections: readonly [{ readonly requiredScope?: "auditevents" | "itemusages" | "signinattempts" | undefined; readonly connectionMethodId: "events-api-token"; }]; }; /** * Creates an authenticated official 1Password SDK client. * * @param account - Resolved service-account connection. * @throws {Error} When called with another connection method. */ export declare function getOnePasswordClient(account: ResolvedIntegrationAccount<"1password">): Promise; /** Structured failure returned by the 1Password Events API. */ export declare class OnePasswordEventsApiError extends Error { /** HTTP status returned by 1Password. */ readonly status: number; /** * Creates an Events API error. * * @param status - HTTP status returned by 1Password. * @param providerMessage - Provider error text, when available. */ constructor(status: number, providerMessage?: string); } /** Official, authenticated 1Password Events API helper. */ export interface OnePasswordEventsApi { /** Retrieves token identity and enabled event features. */ introspect(): Promise>; /** Retrieves and validates one cursor page from an Events API feed. */ list(feed: "auditevents" | "itemusages" | "signinattempts", cursor: OnePasswordEventsCursor, responseSchema: TSchema): Promise>; } /** * Creates a 1Password Events API client restricted to official origins. * * @param account - Resolved Events API token connection. * @throws {Error} When called with another connection method. */ export declare function getOnePasswordEventsApi(account: ResolvedIntegrationAccount<"1password">): OnePasswordEventsApi; /** * Creates a direct Events API client for provider validation and action use. * * @param baseUrl - Official 1Password Events API origin. * @param bearerToken - Events Reporting bearer token. */ export declare function createOnePasswordEventsApi(baseUrl: string, bearerToken: string): OnePasswordEventsApi; /** * Validates and canonicalizes an official Events API origin. * * @param value - Submitted Events API URL. * @throws {Error} When the URL isn't an exact official origin. */ export declare function parseOnePasswordEventsOrigin(value: string): string; //# sourceMappingURL=lib.d.ts.map