import { APIResource } from './base'; import { LinkedAccount } from '../types/linked-accounts'; import { SecurityScheme } from '../types/apps'; export declare class LinkedAccountsResource extends APIResource { /** * Link an account with the specified authentication type. * * @param params.app_name Name of the app to link account for, e.g., "GMAIL" * @param params.linked_account_owner_id ID of the owner of the linked account, e.g., "johndoe" * @param params.security_scheme The security scheme to use for the linked account. * @param params.api_key API key for authentication (required when security_scheme is API_KEY). * @param params.after_oauth2_link_redirect_url Only applicable when security_scheme is OAUTH2. The URL to redirect to after OAuth2 link. * @returns If security_scheme is API_KEY or NO_AUTH, returns the linked account. If security_scheme is OAUTH2, returns the OAuth2 authorization URL. * @throws ValidationError If required parameters for the specified security scheme are missing. */ link(params: { app_name: string; linked_account_owner_id: string; security_scheme: SecurityScheme; api_key?: string; after_oauth2_link_redirect_url?: string; }): Promise; /** * List linked accounts. * * @param params.app_name Optional name of the app to filter linked accounts by, e.g., "GMAIL" * @param params.linked_account_owner_id Optional ID of the owner of the linked account to filter by, e.g., "johndoe" * @returns A list of linked accounts. */ list(params: { app_name?: string; linked_account_owner_id?: string; }): Promise; /** * Retrieve a specific linked account. * * @param linkedAccountId ID of the linked account to retrieve. * @returns The linked account with security credentials if oauth2 */ get(linkedAccountId: string): Promise; /** * Enable a linked account. * * @param linkedAccountId ID of the linked account to enable. * @returns The updated linked account. */ enable(linkedAccountId: string): Promise; /** * Disable a linked account. * * @param linkedAccountId ID of the linked account to disable. * @returns The updated linked account. */ disable(linkedAccountId: string): Promise; /** * Update a linked account. * * @param linkedAccountId ID of the linked account to update. * @param enabled Whether to enable or disable the linked account. * @returns The updated linked account. * @private */ private _update; /** * Delete a linked account. * * @param linkedAccountId ID of the linked account to delete. */ delete(linkedAccountId: string): Promise; }