/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 80d6fb28a717 */ import { workflowsDeploymentsCreateDeployment } from "../funcs/workflowsDeploymentsCreateDeployment.js"; import { workflowsDeploymentsDeleteDeployment } from "../funcs/workflowsDeploymentsDeleteDeployment.js"; import { workflowsDeploymentsGetDeployment } from "../funcs/workflowsDeploymentsGetDeployment.js"; import { workflowsDeploymentsGetDeploymentLogs } from "../funcs/workflowsDeploymentsGetDeploymentLogs.js"; import { workflowsDeploymentsListDeployments } from "../funcs/workflowsDeploymentsListDeployments.js"; import { workflowsDeploymentsListDeploymentWorkers } from "../funcs/workflowsDeploymentsListDeploymentWorkers.js"; import { workflowsDeploymentsRestartDeployment } from "../funcs/workflowsDeploymentsRestartDeployment.js"; import { workflowsDeploymentsStartDeployment } from "../funcs/workflowsDeploymentsStartDeployment.js"; import { workflowsDeploymentsStopDeployment } from "../funcs/workflowsDeploymentsStopDeployment.js"; import { workflowsDeploymentsStreamDeploymentLogs } from "../funcs/workflowsDeploymentsStreamDeploymentLogs.js"; import { workflowsDeploymentsUpdateDeployment } from "../funcs/workflowsDeploymentsUpdateDeployment.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, )); } /** * Create Deployment */ async createDeployment( request: components.CreateDeploymentRequest, options?: RequestOptions, ): Promise { return unwrapAsync(workflowsDeploymentsCreateDeployment( this, request, options, )); } /** * Update Deployment */ async updateDeployment( request: operations.UpdateDeploymentV1WorkflowsDeploymentsNamePatchRequest, options?: RequestOptions, ): Promise { return unwrapAsync(workflowsDeploymentsUpdateDeployment( this, request, options, )); } /** * Delete Deployment */ async deleteDeployment( request: operations.DeleteDeploymentV1WorkflowsDeploymentsNameDeleteRequest, options?: RequestOptions, ): Promise { return unwrapAsync(workflowsDeploymentsDeleteDeployment( this, request, options, )); } /** * Get Deployment */ async getDeployment( request: operations.GetDeploymentV1WorkflowsDeploymentsNameGetRequest, options?: RequestOptions, ): Promise { return unwrapAsync(workflowsDeploymentsGetDeployment( this, request, options, )); } /** * Stop Deployment */ async stopDeployment( request: operations.StopDeploymentV1WorkflowsDeploymentsNameStopPostRequest, options?: RequestOptions, ): Promise { return unwrapAsync(workflowsDeploymentsStopDeployment( this, request, options, )); } /** * Start Deployment */ async startDeployment( request: operations.StartDeploymentV1WorkflowsDeploymentsNameStartPostRequest, options?: RequestOptions, ): Promise { return unwrapAsync(workflowsDeploymentsStartDeployment( this, request, options, )); } /** * Restart Deployment */ async restartDeployment( request: operations.RestartDeploymentV1WorkflowsDeploymentsNameRestartPostRequest, options?: RequestOptions, ): Promise { return unwrapAsync(workflowsDeploymentsRestartDeployment( this, request, options, )); } /** * List Deployment Workers */ async listDeploymentWorkers( request: operations.ListDeploymentWorkersV1WorkflowsDeploymentsNameWorkersGetRequest, options?: RequestOptions, ): Promise { return unwrapAsync(workflowsDeploymentsListDeploymentWorkers( 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, )); } }