/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import * as types from "../../types/primitives.js"; import { TracearrSDKError } from "./tracearr-sdk-error.js"; export type TerminateStreamErrorResponseData = { success: false; error: string; terminationLogId: string; }; export class TerminateStreamErrorResponse extends TracearrSDKError { success: false; error: string; terminationLogId: string; /** The original data that was passed to this error instance. */ data$: TerminateStreamErrorResponseData; constructor( err: TerminateStreamErrorResponseData, httpMeta: { response: Response; request: Request; body: string }, ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message, httpMeta); this.data$ = err; this.success = err.success; this.error = err.error; this.terminationLogId = err.terminationLogId; this.name = "TerminateStreamErrorResponse"; } } /** @internal */ export const TerminateStreamErrorResponse$inboundSchema: z.ZodMiniType< TerminateStreamErrorResponse, unknown > = z.pipe( z.object({ success: types.literal(false), error: types.string(), terminationLogId: types.string(), request$: z.custom(x => x instanceof Request), response$: z.custom(x => x instanceof Response), body$: z.string(), }), z.transform((v) => { return new TerminateStreamErrorResponse(v, { request: v.request$, response: v.response$, body: v.body$, }); }), );