import { APIResource } from "../core/resource.js"; import { APIPromise } from "../core/api-promise.js"; import { Cursor, type CursorParams, PagePromise } from "../core/pagination.js"; import { RequestOptions } from "../internal/request-options.js"; export declare class OAuthConnections extends APIResource { /** * Get OAuth connection by name */ retrieve(name: string, options?: RequestOptions): APIPromise; /** * List OAuth connections */ list(query?: OAuthConnectionListParams | null | undefined, options?: RequestOptions): PagePromise; /** * Delete an OAuth connection */ delete(name: string, options?: RequestOptions): APIPromise; /** * Get a fresh access token for a connection */ getToken(name: string, options?: RequestOptions): APIPromise; } export type OAuthConnectionListResponsesCursor = Cursor; export interface OAuthConnectionRetrieveResponse { /** * Connection ID */ id: string; /** * Account identifier (e.g. email) */ accountIdentifier: string | null; /** * Creation timestamp */ createdAt: string; /** * Whether this is the default connection for its provider */ isDefault: boolean; /** * Optional display label */ label: string | null; /** * Last used timestamp */ lastUsedAt: string | null; /** * Provider ID */ providerId: string; /** * Provider display name */ providerName: string; /** * Provider slug */ providerSlug: string; /** * Granted scopes */ scopes: string | null; /** * Connection name (slug) */ slug: string | null; /** * Connection status */ status: string; /** * Token type (e.g. Bearer) */ tokenType: string; } export interface OAuthConnectionListResponse { /** * Connection ID */ id: string; /** * Account identifier (e.g. email) */ accountIdentifier: string | null; /** * Creation timestamp */ createdAt: string; /** * Whether this is the default connection for its provider */ isDefault: boolean; /** * Optional display label */ label: string | null; /** * Last used timestamp */ lastUsedAt: string | null; /** * Provider ID */ providerId: string; /** * Provider display name */ providerName: string; /** * Provider slug */ providerSlug: string; /** * Granted scopes */ scopes: string | null; /** * Connection name (slug) */ slug: string | null; /** * Connection status */ status: string; /** * Token type (e.g. Bearer) */ tokenType: string; } export interface OAuthConnectionGetTokenResponse { /** * Fresh access token */ access_token: string; /** * The connection this token belongs to */ connection: OAuthConnectionGetTokenResponse.Connection; /** * Token expiration timestamp (ISO 8601) */ expires_at: string | null; /** * Token type (e.g. Bearer) */ token_type: string; } export declare namespace OAuthConnectionGetTokenResponse { /** * The connection this token belongs to */ interface Connection { /** * Connection ID */ id: string; /** * Account identifier (e.g. email) */ accountIdentifier: string | null; /** * Creation timestamp */ createdAt: string; /** * Whether this is the default connection for its provider */ isDefault: boolean; /** * Optional display label */ label: string | null; /** * Last used timestamp */ lastUsedAt: string | null; /** * Provider ID */ providerId: string; /** * Provider display name */ providerName: string; /** * Provider slug */ providerSlug: string; /** * Granted scopes */ scopes: string | null; /** * Connection name (slug) */ slug: string | null; /** * Connection status */ status: string; /** * Token type (e.g. Bearer) */ tokenType: string; } } export interface OAuthConnectionListParams extends CursorParams { /** * Filter by provider slug */ provider?: string; } export declare namespace OAuthConnections { export { type OAuthConnectionRetrieveResponse as OAuthConnectionRetrieveResponse, type OAuthConnectionListResponse as OAuthConnectionListResponse, type OAuthConnectionGetTokenResponse as OAuthConnectionGetTokenResponse, type OAuthConnectionListResponsesCursor as OAuthConnectionListResponsesCursor, type OAuthConnectionListParams as OAuthConnectionListParams, }; } //# sourceMappingURL=oauth-connections.d.ts.map