/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 204467da11b7 */ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; export type GetWorkflowRegistrationsV1WorkflowsRegistrationsGetRequest = { /** * The workflow ID to filter by */ workflowId?: string | null | undefined; /** * The task queue to filter by */ taskQueue?: string | null | undefined; /** * Whether to only return active workflows versions */ activeOnly?: boolean | undefined; /** * Whether to include shared workflow versions */ includeShared?: boolean | undefined; /** * The workflow name to filter by */ workflowSearch?: string | null | undefined; /** * Filter by archived state. False=exclude archived, True=only archived, None=include all */ archived?: boolean | null | undefined; /** * Whether to include the workflow definition */ withWorkflow?: boolean | undefined; /** * Whether to only return workflows available in chat assistant */ availableInChatAssistant?: boolean | null | undefined; /** * The maximum number of workflows versions to return */ limit?: number | undefined; /** * The cursor for pagination */ cursor?: string | null | undefined; }; /** @internal */ export type GetWorkflowRegistrationsV1WorkflowsRegistrationsGetRequest$Outbound = { workflow_id?: string | null | undefined; task_queue?: string | null | undefined; active_only: boolean; include_shared: boolean; workflow_search?: string | null | undefined; archived?: boolean | null | undefined; with_workflow: boolean; available_in_chat_assistant?: boolean | null | undefined; limit: number; cursor?: string | null | undefined; }; /** @internal */ export const GetWorkflowRegistrationsV1WorkflowsRegistrationsGetRequest$outboundSchema: z.ZodType< GetWorkflowRegistrationsV1WorkflowsRegistrationsGetRequest$Outbound, GetWorkflowRegistrationsV1WorkflowsRegistrationsGetRequest > = z.object({ workflowId: z.nullable(z.string()).optional(), taskQueue: z.nullable(z.string()).optional(), activeOnly: z.boolean().default(false), includeShared: z.boolean().default(true), workflowSearch: z.nullable(z.string()).optional(), archived: z.nullable(z.boolean()).optional(), withWorkflow: z.boolean().default(false), availableInChatAssistant: z.nullable(z.boolean()).optional(), limit: z.int().default(50), cursor: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { workflowId: "workflow_id", taskQueue: "task_queue", activeOnly: "active_only", includeShared: "include_shared", workflowSearch: "workflow_search", withWorkflow: "with_workflow", availableInChatAssistant: "available_in_chat_assistant", }); }); export function getWorkflowRegistrationsV1WorkflowsRegistrationsGetRequestToJSON( getWorkflowRegistrationsV1WorkflowsRegistrationsGetRequest: GetWorkflowRegistrationsV1WorkflowsRegistrationsGetRequest, ): string { return JSON.stringify( GetWorkflowRegistrationsV1WorkflowsRegistrationsGetRequest$outboundSchema .parse(getWorkflowRegistrationsV1WorkflowsRegistrationsGetRequest), ); }