import { APIResource } from "../../../resource.js"; import * as Core from "../../../core.js"; import { SinglePage } from "../../../pagination.js"; export declare class Destinations extends APIResource { /** * Create a new Workers Observability Telemetry Destination. * * @example * ```ts * const destination = * await client.workers.observability.destinations.create({ * account_id: 'account_id', * configuration: { * headers: { foo: 'string' }, * logpushDataset: 'opentelemetry-traces', * type: 'logpush', * url: 'url', * }, * enabled: true, * name: 'name', * }); * ``` */ create(params: DestinationCreateParams, options?: Core.RequestOptions): Core.APIPromise; /** * Update an existing Workers Observability Telemetry Destination. * * @example * ```ts * const destination = * await client.workers.observability.destinations.update( * 'slug', * { * account_id: 'account_id', * configuration: { * headers: { foo: 'string' }, * type: 'logpush', * url: 'url', * }, * enabled: true, * }, * ); * ``` */ update(slug: string, params: DestinationUpdateParams, options?: Core.RequestOptions): Core.APIPromise; /** * List your Workers Observability Telemetry Destinations. * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const destinationListResponse of client.workers.observability.destinations.list( * { account_id: 'account_id' }, * )) { * // ... * } * ``` */ list(params: DestinationListParams, options?: Core.RequestOptions): Core.PagePromise; /** * Delete a Workers Observability Telemetry Destination. * * @example * ```ts * const destination = * await client.workers.observability.destinations.delete( * 'slug', * { account_id: 'account_id' }, * ); * ``` */ delete(slug: string, params: DestinationDeleteParams, options?: Core.RequestOptions): Core.APIPromise; } export declare class DestinationListResponsesSinglePage extends SinglePage { } export interface DestinationCreateResponse { configuration: DestinationCreateResponse.Configuration; enabled: boolean; name: string; scripts: Array; slug: string; } export declare namespace DestinationCreateResponse { interface Configuration { destination_conf: string; logpushDataset: 'opentelemetry-traces' | 'opentelemetry-logs' | 'opentelemetry-metrics'; logpushJob: number; type: 'logpush'; url: string; } } export interface DestinationUpdateResponse { configuration: DestinationUpdateResponse.Configuration; enabled: boolean; name: string; scripts: Array; slug: string; } export declare namespace DestinationUpdateResponse { interface Configuration { destination_conf: string; logpushDataset: 'opentelemetry-traces' | 'opentelemetry-logs' | 'opentelemetry-metrics'; logpushJob: number; type: 'logpush'; url: string; } } export interface DestinationListResponse { configuration: DestinationListResponse.Configuration; enabled: boolean; name: string; scripts: Array; slug: string; } export declare namespace DestinationListResponse { interface Configuration { destination_conf: string; headers: { [key: string]: string; }; jobStatus: Configuration.JobStatus; logpushDataset: 'opentelemetry-traces' | 'opentelemetry-logs' | 'opentelemetry-metrics'; type: 'logpush'; url: string; } namespace Configuration { interface JobStatus { error_message: string; last_complete: string; last_error: string; } } } export interface DestinationDeleteResponse { configuration: DestinationDeleteResponse.Configuration; enabled: boolean; name: string; scripts: Array; slug: string; } export declare namespace DestinationDeleteResponse { interface Configuration { destination_conf: string; logpushDataset: 'opentelemetry-traces' | 'opentelemetry-logs' | 'opentelemetry-metrics'; logpushJob: number; type: 'logpush'; url: string; } } export interface DestinationCreateParams { /** * Path param: Your Cloudflare account ID. */ account_id: string; /** * Body param */ configuration: DestinationCreateParams.Configuration; /** * Body param */ enabled: boolean; /** * Body param */ name: string; /** * Body param */ skipPreflightCheck?: boolean; } export declare namespace DestinationCreateParams { interface Configuration { headers: { [key: string]: string; }; logpushDataset: 'opentelemetry-traces' | 'opentelemetry-logs' | 'opentelemetry-metrics'; type: 'logpush'; url: string; } } export interface DestinationUpdateParams { /** * Path param: Your Cloudflare account ID. */ account_id: string; /** * Body param */ configuration: DestinationUpdateParams.Configuration; /** * Body param */ enabled: boolean; } export declare namespace DestinationUpdateParams { interface Configuration { headers: { [key: string]: string; }; type: 'logpush'; url: string; } } export interface DestinationListParams { /** * Path param: Your Cloudflare account ID. */ account_id: string; /** * Query param */ order?: 'asc' | 'desc'; /** * Query param */ orderBy?: 'created' | 'updated'; /** * Query param */ page?: number; /** * Query param */ perPage?: number; } export interface DestinationDeleteParams { /** * Your Cloudflare account ID. */ account_id: string; } export declare namespace Destinations { export { type DestinationCreateResponse as DestinationCreateResponse, type DestinationUpdateResponse as DestinationUpdateResponse, type DestinationListResponse as DestinationListResponse, type DestinationDeleteResponse as DestinationDeleteResponse, DestinationListResponsesSinglePage as DestinationListResponsesSinglePage, type DestinationCreateParams as DestinationCreateParams, type DestinationUpdateParams as DestinationUpdateParams, type DestinationListParams as DestinationListParams, type DestinationDeleteParams as DestinationDeleteParams, }; } //# sourceMappingURL=destinations.d.ts.map