/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 80d6fb28a717 */ import { workflowsDeploymentsGetDeployment } from "../funcs/workflowsDeploymentsGetDeployment.js"; import { workflowsDeploymentsGetDeploymentLogs } from "../funcs/workflowsDeploymentsGetDeploymentLogs.js"; import { workflowsDeploymentsListDeployments } from "../funcs/workflowsDeploymentsListDeployments.js"; import { workflowsDeploymentsStreamDeploymentLogs } from "../funcs/workflowsDeploymentsStreamDeploymentLogs.js"; import { EventStream } from "../lib/event-streams.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Deployments extends ClientSDK { /** * List Deployments */ async listDeployments( request?: | operations.ListDeploymentsV1WorkflowsDeploymentsGetRequest | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(workflowsDeploymentsListDeployments( this, request, options, )); } /** * Get Deployment */ async getDeployment( request: operations.GetDeploymentV1WorkflowsDeploymentsNameGetRequest, options?: RequestOptions, ): Promise { return unwrapAsync(workflowsDeploymentsGetDeployment( this, request, options, )); } /** * Get Deployment Logs * * @remarks * Retrieve logs for a deployment (across all of its workers). * * Use `after`/`before`/`order` on the first request to set the time range and sort order; for * the next pages pass the `cursor` from the previous response (it remembers the range and order). */ async getDeploymentLogs( request: operations.GetDeploymentLogsRequest, options?: RequestOptions, ): Promise { return unwrapAsync(workflowsDeploymentsGetDeploymentLogs( this, request, options, )); } /** * Stream Deployment Logs * * @remarks * Stream logs for a deployment (all of its workers) via SSE. * * Resume cursor comes from the `Last-Event-ID` header or `last_event_id` query param (header wins) * and takes precedence over `after`; omit all to tail from the deployment start. */ async streamDeploymentLogs( request: operations.StreamDeploymentLogsRequest, options?: RequestOptions, ): Promise> { return unwrapAsync(workflowsDeploymentsStreamDeploymentLogs( this, request, options, )); } }