import { APIResource } from "../../core/resource.mjs"; import { APIPromise } from "../../core/api-promise.mjs"; import { RequestOptions } from "../../internal/request-options.mjs"; /** * Logging and monitoring */ export declare class Triggers extends APIResource { /** * DEPRECATED: This endpoint has declining traffic and will be removed in a future * version. * * @deprecated */ retrieve(id: string, options?: RequestOptions): APIPromise; /** * Search and retrieve trigger event logs with advanced filtering capabilities * including search parameters * * @example * ```ts * const triggers = await client.logs.triggers.list(); * ``` */ list(body?: TriggerListParams | null | undefined, options?: RequestOptions): APIPromise; } export interface TriggerRetrieveResponse { log: TriggerRetrieveResponse.Log; } export declare namespace TriggerRetrieveResponse { interface Log { id: string; appName: string; clientId: string; connectionId: string; createdAt: string; entityId: string; meta: Log.Meta; status: string; /** * Log entity type (trigger or action) */ type: 'trigger' | 'action'; } namespace Log { interface Meta { id: string; clientId: string; connectionId: string; createdAt: string; provider: string; /** * Log entity type (trigger or action) */ type: 'trigger' | 'action'; updatedAt: string; triggerClientError?: string; triggerClientPayload?: string; triggerClientResponse?: string; triggerId?: string; triggerName?: string; triggerNanoId?: string; triggerProviderPayload?: string; } } } export interface TriggerListResponse { nextCursor: string | null; data?: Array; } export declare namespace TriggerListResponse { interface Data { id: string; appName: string; clientId: string; connectionId: string; createdAt: string; entityId: string; meta: Data.Meta; status: string; /** * Log entity type (trigger or action) */ type: 'trigger' | 'action'; } namespace Data { interface Meta { id: string; clientId: string; connectionId: string; createdAt: string; provider: string; /** * Log entity type (trigger or action) */ type: 'trigger' | 'action'; updatedAt: string; triggerClientError?: string; triggerClientPayload?: string; triggerClientResponse?: string; triggerId?: string; triggerName?: string; triggerNanoId?: string; triggerProviderPayload?: string; } } } export interface TriggerListParams { cursor?: string | null; entityId?: string; /** * Start time for logs (epoch timestamp in milliseconds) */ from?: number | null; /** * Whether to include payload fields in the response. Set to false for faster list * views. */ include_payload?: boolean; integrationId?: string; /** * The limit of trigger logs to return */ limit?: number | null; /** * Search term to filter logs */ search?: string; /** * Advanced search parameters for filtering logs */ search_params?: Array; /** * Filter logs by their status level */ status?: 'all' | 'success' | 'error'; /** * Return logs from the last N time units */ time?: '5m' | '30m' | '6h' | '1d' | '1w' | '1month' | '1y'; /** * End time for logs (epoch timestamp in milliseconds) */ to?: number | null; /** * Filter logs by user ID */ userId?: string; } export declare namespace TriggerListParams { interface SearchParam { field?: string; operation?: string; value?: string; } } export declare namespace Triggers { export { type TriggerRetrieveResponse as TriggerRetrieveResponse, type TriggerListResponse as TriggerListResponse, type TriggerListParams as TriggerListParams, }; } //# sourceMappingURL=triggers.d.mts.map