import { APIResource } from "../../resource.js"; import * as Core from "../../core.js"; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from "../../pagination.js"; export declare class Streams extends APIResource { /** * Create a new Stream. * * @example * ```ts * const stream = await client.pipelines.streams.create({ * account_id: '0123105f4ecef8ad9ca31a8372d0c353', * name: 'my_stream', * }); * ``` */ create(params: StreamCreateParams, options?: Core.RequestOptions): Core.APIPromise; /** * Update a Stream. * * @example * ```ts * const stream = await client.pipelines.streams.update( * '033e105f4ecef8ad9ca31a8372d0c353', * { account_id: '0123105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ update(streamId: string, params: StreamUpdateParams, options?: Core.RequestOptions): Core.APIPromise; /** * List/Filter Streams in Account. * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const streamListResponse of client.pipelines.streams.list( * { account_id: '0123105f4ecef8ad9ca31a8372d0c353' }, * )) { * // ... * } * ``` */ list(params: StreamListParams, options?: Core.RequestOptions): Core.PagePromise; /** * Delete Stream in Account. * * @example * ```ts * const stream = await client.pipelines.streams.delete( * '033e105f4ecef8ad9ca31a8372d0c353', * { account_id: '0123105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ delete(streamId: string, params: StreamDeleteParams, options?: Core.RequestOptions): Core.APIPromise; /** * Get Stream Details. * * @example * ```ts * const stream = await client.pipelines.streams.get( * '033e105f4ecef8ad9ca31a8372d0c353', * { account_id: '0123105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ get(streamId: string, params: StreamGetParams, options?: Core.RequestOptions): Core.APIPromise; } export declare class StreamListResponsesV4PagePaginationArray extends V4PagePaginationArray { } export interface StreamCreateResponse { /** * Indicates a unique identifier for this stream. */ id: string; created_at: string; http: StreamCreateResponse.HTTP; modified_at: string; /** * Indicates the name of the Stream. */ name: string; /** * Indicates the current version of this stream. */ version: number; worker_binding: StreamCreateResponse.WorkerBinding; /** * Indicates the endpoint URL of this stream. */ endpoint?: string; format?: StreamCreateResponse.Json | StreamCreateResponse.Parquet; schema?: StreamCreateResponse.Schema; } export declare namespace StreamCreateResponse { interface HTTP { /** * Indicates that authentication is required for the HTTP endpoint. */ authentication: boolean; /** * Indicates that the HTTP endpoint is enabled. */ enabled: boolean; /** * Specifies the CORS options for the HTTP endpoint. */ cors?: HTTP.CORS; } namespace HTTP { /** * Specifies the CORS options for the HTTP endpoint. */ interface CORS { origins?: Array; } } interface WorkerBinding { /** * Indicates that the worker binding is enabled. */ enabled: boolean; } interface Json { type: 'json'; decimal_encoding?: 'number' | 'string' | 'bytes'; timestamp_format?: 'rfc3339' | 'unix_millis'; unstructured?: boolean; } interface Parquet { type: 'parquet'; compression?: 'uncompressed' | 'snappy' | 'gzip' | 'zstd' | 'lz4'; row_group_bytes?: number | null; } interface Schema { fields?: Array; format?: Schema.Json | Schema.Parquet; inferred?: boolean | null; } namespace Schema { interface Int32 { type: 'int32'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; } interface Int64 { type: 'int64'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; } interface Float32 { type: 'float32'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; } interface Float64 { type: 'float64'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; } interface Bool { type: 'bool'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; } interface String { type: 'string'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; } interface Binary { type: 'binary'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; } interface Timestamp { type: 'timestamp'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; unit?: 'second' | 'millisecond' | 'microsecond' | 'nanosecond'; } interface Json { type: 'json'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; } interface Struct { } interface List { } interface Json { type: 'json'; decimal_encoding?: 'number' | 'string' | 'bytes'; timestamp_format?: 'rfc3339' | 'unix_millis'; unstructured?: boolean; } interface Parquet { type: 'parquet'; compression?: 'uncompressed' | 'snappy' | 'gzip' | 'zstd' | 'lz4'; row_group_bytes?: number | null; } } } export interface StreamUpdateResponse { /** * Indicates a unique identifier for this stream. */ id: string; created_at: string; http: StreamUpdateResponse.HTTP; modified_at: string; /** * Indicates the name of the Stream. */ name: string; /** * Indicates the current version of this stream. */ version: number; worker_binding: StreamUpdateResponse.WorkerBinding; /** * Indicates the endpoint URL of this stream. */ endpoint?: string; format?: StreamUpdateResponse.Json | StreamUpdateResponse.Parquet; } export declare namespace StreamUpdateResponse { interface HTTP { /** * Indicates that authentication is required for the HTTP endpoint. */ authentication: boolean; /** * Indicates that the HTTP endpoint is enabled. */ enabled: boolean; /** * Specifies the CORS options for the HTTP endpoint. */ cors?: HTTP.CORS; } namespace HTTP { /** * Specifies the CORS options for the HTTP endpoint. */ interface CORS { origins?: Array; } } interface WorkerBinding { /** * Indicates that the worker binding is enabled. */ enabled: boolean; } interface Json { type: 'json'; decimal_encoding?: 'number' | 'string' | 'bytes'; timestamp_format?: 'rfc3339' | 'unix_millis'; unstructured?: boolean; } interface Parquet { type: 'parquet'; compression?: 'uncompressed' | 'snappy' | 'gzip' | 'zstd' | 'lz4'; row_group_bytes?: number | null; } } export interface StreamListResponse { /** * Indicates a unique identifier for this stream. */ id: string; created_at: string; http: StreamListResponse.HTTP; modified_at: string; /** * Indicates the name of the Stream. */ name: string; /** * Indicates the current version of this stream. */ version: number; worker_binding: StreamListResponse.WorkerBinding; /** * Indicates the endpoint URL of this stream. */ endpoint?: string; format?: StreamListResponse.Json | StreamListResponse.Parquet; schema?: StreamListResponse.Schema; } export declare namespace StreamListResponse { interface HTTP { /** * Indicates that authentication is required for the HTTP endpoint. */ authentication: boolean; /** * Indicates that the HTTP endpoint is enabled. */ enabled: boolean; /** * Specifies the CORS options for the HTTP endpoint. */ cors?: HTTP.CORS; } namespace HTTP { /** * Specifies the CORS options for the HTTP endpoint. */ interface CORS { origins?: Array; } } interface WorkerBinding { /** * Indicates that the worker binding is enabled. */ enabled: boolean; } interface Json { type: 'json'; decimal_encoding?: 'number' | 'string' | 'bytes'; timestamp_format?: 'rfc3339' | 'unix_millis'; unstructured?: boolean; } interface Parquet { type: 'parquet'; compression?: 'uncompressed' | 'snappy' | 'gzip' | 'zstd' | 'lz4'; row_group_bytes?: number | null; } interface Schema { fields?: Array; format?: Schema.Json | Schema.Parquet; inferred?: boolean | null; } namespace Schema { interface Int32 { type: 'int32'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; } interface Int64 { type: 'int64'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; } interface Float32 { type: 'float32'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; } interface Float64 { type: 'float64'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; } interface Bool { type: 'bool'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; } interface String { type: 'string'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; } interface Binary { type: 'binary'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; } interface Timestamp { type: 'timestamp'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; unit?: 'second' | 'millisecond' | 'microsecond' | 'nanosecond'; } interface Json { type: 'json'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; } interface Struct { } interface List { } interface Json { type: 'json'; decimal_encoding?: 'number' | 'string' | 'bytes'; timestamp_format?: 'rfc3339' | 'unix_millis'; unstructured?: boolean; } interface Parquet { type: 'parquet'; compression?: 'uncompressed' | 'snappy' | 'gzip' | 'zstd' | 'lz4'; row_group_bytes?: number | null; } } } export type StreamDeleteResponse = unknown; export interface StreamGetResponse { /** * Indicates a unique identifier for this stream. */ id: string; created_at: string; http: StreamGetResponse.HTTP; modified_at: string; /** * Indicates the name of the Stream. */ name: string; /** * Indicates the current version of this stream. */ version: number; worker_binding: StreamGetResponse.WorkerBinding; /** * Indicates the endpoint URL of this stream. */ endpoint?: string; format?: StreamGetResponse.Json | StreamGetResponse.Parquet; schema?: StreamGetResponse.Schema; } export declare namespace StreamGetResponse { interface HTTP { /** * Indicates that authentication is required for the HTTP endpoint. */ authentication: boolean; /** * Indicates that the HTTP endpoint is enabled. */ enabled: boolean; /** * Specifies the CORS options for the HTTP endpoint. */ cors?: HTTP.CORS; } namespace HTTP { /** * Specifies the CORS options for the HTTP endpoint. */ interface CORS { origins?: Array; } } interface WorkerBinding { /** * Indicates that the worker binding is enabled. */ enabled: boolean; } interface Json { type: 'json'; decimal_encoding?: 'number' | 'string' | 'bytes'; timestamp_format?: 'rfc3339' | 'unix_millis'; unstructured?: boolean; } interface Parquet { type: 'parquet'; compression?: 'uncompressed' | 'snappy' | 'gzip' | 'zstd' | 'lz4'; row_group_bytes?: number | null; } interface Schema { fields?: Array; format?: Schema.Json | Schema.Parquet; inferred?: boolean | null; } namespace Schema { interface Int32 { type: 'int32'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; } interface Int64 { type: 'int64'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; } interface Float32 { type: 'float32'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; } interface Float64 { type: 'float64'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; } interface Bool { type: 'bool'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; } interface String { type: 'string'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; } interface Binary { type: 'binary'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; } interface Timestamp { type: 'timestamp'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; unit?: 'second' | 'millisecond' | 'microsecond' | 'nanosecond'; } interface Json { type: 'json'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; } interface Struct { } interface List { } interface Json { type: 'json'; decimal_encoding?: 'number' | 'string' | 'bytes'; timestamp_format?: 'rfc3339' | 'unix_millis'; unstructured?: boolean; } interface Parquet { type: 'parquet'; compression?: 'uncompressed' | 'snappy' | 'gzip' | 'zstd' | 'lz4'; row_group_bytes?: number | null; } } } export interface StreamCreateParams { /** * Path param: Specifies the public ID of the account. */ account_id: string; /** * Body param: Specifies the name of the Stream. */ name: string; /** * Body param */ format?: StreamCreateParams.Json | StreamCreateParams.Parquet; /** * Body param */ http?: StreamCreateParams.HTTP; /** * Body param */ schema?: StreamCreateParams.Schema; /** * Body param */ worker_binding?: StreamCreateParams.WorkerBinding; } export declare namespace StreamCreateParams { interface Json { type: 'json'; decimal_encoding?: 'number' | 'string' | 'bytes'; timestamp_format?: 'rfc3339' | 'unix_millis'; unstructured?: boolean; } interface Parquet { type: 'parquet'; compression?: 'uncompressed' | 'snappy' | 'gzip' | 'zstd' | 'lz4'; row_group_bytes?: number | null; } interface HTTP { /** * Indicates that authentication is required for the HTTP endpoint. */ authentication: boolean; /** * Indicates that the HTTP endpoint is enabled. */ enabled: boolean; /** * Specifies the CORS options for the HTTP endpoint. */ cors?: HTTP.CORS; } namespace HTTP { /** * Specifies the CORS options for the HTTP endpoint. */ interface CORS { origins?: Array; } } interface Schema { fields?: Array; format?: Schema.Json | Schema.Parquet; inferred?: boolean | null; } namespace Schema { interface Int32 { type: 'int32'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; } interface Int64 { type: 'int64'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; } interface Float32 { type: 'float32'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; } interface Float64 { type: 'float64'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; } interface Bool { type: 'bool'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; } interface String { type: 'string'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; } interface Binary { type: 'binary'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; } interface Timestamp { type: 'timestamp'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; unit?: 'second' | 'millisecond' | 'microsecond' | 'nanosecond'; } interface Json { type: 'json'; metadata_key?: string | null; name?: string; required?: boolean; sql_name?: string; } interface Struct { } interface List { } interface Json { type: 'json'; decimal_encoding?: 'number' | 'string' | 'bytes'; timestamp_format?: 'rfc3339' | 'unix_millis'; unstructured?: boolean; } interface Parquet { type: 'parquet'; compression?: 'uncompressed' | 'snappy' | 'gzip' | 'zstd' | 'lz4'; row_group_bytes?: number | null; } } interface WorkerBinding { /** * Indicates that the worker binding is enabled. */ enabled: boolean; } } export interface StreamUpdateParams { /** * Path param: Specifies the public ID of the account. */ account_id: string; /** * Body param */ http?: StreamUpdateParams.HTTP; /** * Body param */ worker_binding?: StreamUpdateParams.WorkerBinding; } export declare namespace StreamUpdateParams { interface HTTP { /** * Indicates that authentication is required for the HTTP endpoint. */ authentication: boolean; /** * Indicates that the HTTP endpoint is enabled. */ enabled: boolean; /** * Specifies the CORS options for the HTTP endpoint. */ cors?: HTTP.CORS; } namespace HTTP { /** * Specifies the CORS options for the HTTP endpoint. */ interface CORS { origins?: Array; } } interface WorkerBinding { /** * Indicates that the worker binding is enabled. */ enabled: boolean; } } export interface StreamListParams extends V4PagePaginationArrayParams { /** * Path param: Specifies the public ID of the account. */ account_id: string; /** * Query param: Specifies the public ID of the pipeline. */ pipeline_id?: string; } export interface StreamDeleteParams { /** * Path param: Specifies the public ID of the account. */ account_id: string; /** * Query param: Delete stream forcefully, including deleting any dependent * pipelines. */ force?: string; } export interface StreamGetParams { /** * Specifies the public ID of the account. */ account_id: string; } export declare namespace Streams { export { type StreamCreateResponse as StreamCreateResponse, type StreamUpdateResponse as StreamUpdateResponse, type StreamListResponse as StreamListResponse, type StreamDeleteResponse as StreamDeleteResponse, type StreamGetResponse as StreamGetResponse, StreamListResponsesV4PagePaginationArray as StreamListResponsesV4PagePaginationArray, type StreamCreateParams as StreamCreateParams, type StreamUpdateParams as StreamUpdateParams, type StreamListParams as StreamListParams, type StreamDeleteParams as StreamDeleteParams, type StreamGetParams as StreamGetParams, }; } //# sourceMappingURL=streams.d.ts.map