import type { HttpClient } from "../core/http.js"; import type { CreateShareRequest, ShareResponse, SharedSecretResponse, OneclawResponse } from "../types.js"; export interface ShareListResponse { shares: ShareResponse[]; } /** * Sharing resource — create time-limited, access-controlled share links * for individual secrets. * * Supports four recipient types: * - `user` — direct share to an existing user by UUID * - `agent` — direct share to an agent by UUID * - `external_email` — invite-by-email; recipient doesn't need an account yet. * When they sign up or log in, the share is automatically claimed. * - `anyone_with_link` — anyone with the URL can access the secret */ export declare class SharingResource { private readonly http; constructor(http: HttpClient); /** * Create a shareable link for a secret. * * @example * ```ts * // Share with an existing user * await client.sharing.create(secretId, { * recipient_type: "user", * recipient_id: userId, * expires_at: "2025-04-01T00:00:00Z", * }); * * // Invite by email (recipient doesn't need an account) * await client.sharing.create(secretId, { * recipient_type: "external_email", * email: "alice@example.com", * expires_at: "2025-04-01T00:00:00Z", * max_access_count: 3, * }); * ``` */ create(secretId: string, options: CreateShareRequest): Promise>; /** * Access a shared secret using its share ID. * This is a public endpoint — no authentication required, * but the share must not be expired or over its access limit. */ access(shareId: string): Promise>; /** List shares you have sent (outbound). */ listOutbound(): Promise>; /** List shares others have sent to you (inbound). */ listInbound(): Promise>; /** Accept an inbound share. */ accept(shareId: string): Promise>; /** Decline an inbound share. */ decline(shareId: string): Promise>; /** Revoke an active share link. Only the creator can revoke. */ revoke(shareId: string): Promise>; } //# sourceMappingURL=sharing.d.ts.map