import { APIResource } from "../../../core/resource.js"; import * as FilesAPI from "./files.js"; import { APIPromise } from "../../../core/api-promise.js"; import { RequestOptions } from "../../../internal/request-options.js"; export declare class Share extends APIResource { /** * Replace who a file the caller owns is shared with: any active Team of the * caller's Organization and/or the whole Organization (`organization`). Recipients * can view and use the file but cannot delete it. An empty `targets` list stops * sharing. A file saved from a knowledge base that was `confidential` or * `restricted` when saved, is now, or can no longer be found can't be shared, but * sharing can still be stopped. Requires X-Tenant-ID header. */ create(fileID: string, params: ShareCreateParams, options?: RequestOptions): APIPromise; /** * Revoke every share of a file the caller owns. Idempotent: revoking an unshared * file succeeds. Conversations where recipients already attached the file are * unaffected. Requires X-Tenant-ID header. */ deleteAll(fileID: string, params?: ShareDeleteAllParams | null | undefined, options?: RequestOptions): APIPromise; } /** * The share targets of a Library file after a share or revoke. */ export interface LibraryShareResponse { /** * Library file ID. */ id: string; /** * Teams and/or the Organization the file is now shared with. */ shared_with?: Array; } export interface ShareCreateParams { /** * Body param: The complete set of targets the file should be shared with. */ targets: Array; /** * Header param */ 'Accept-Language'?: string; /** * Header param: Set to `structured` to receive errors in the structured envelope. * Omit it to keep the legacy error body. */ 'X-Error-Format'?: string; } export declare namespace ShareCreateParams { /** * A requested share target. */ interface Target { /** * `team` or `organization`. */ type: FilesAPI.ShareTargetType; /** * Team ID. Required for `team`. Optional for `organization`: if given, it must be * the caller's own Organization ID. */ id?: string | null; } } export interface ShareDeleteAllParams { 'Accept-Language'?: string; /** * Set to `structured` to receive errors in the structured envelope. Omit it to * keep the legacy error body. */ 'X-Error-Format'?: string; } export declare namespace Share { export { type LibraryShareResponse as LibraryShareResponse, type ShareCreateParams as ShareCreateParams, type ShareDeleteAllParams as ShareDeleteAllParams, }; } //# sourceMappingURL=share.d.ts.map