@@ -232,6 +232,33 @@ Advanced Options are intended to support edge cases or testing pipelines and are
232232
233233</ParamField >
234234
235+ <ParamField path = " schema" type = " z.ZodType" >
236+ Alternative to ` initialPayloadParser ` , you can pass a ` schema ` in the TypeScript SDK.
237+
238+ The schema is used to validate and parse the initial request payload automatically using [ Zod] ( https://zod.dev/ ) .
239+
240+ <CodeGroup >
241+
242+ ``` typescript TypeScript
243+
244+ import { z } from " zod" ;
245+
246+ const parameters = z .object ({ expression: z .string () });
247+
248+ export const { POST } = serve (
249+ async (context ) => {
250+ // context.requestPayload is typed as `{ expression: string }`
251+ const payload = context .requestPayload ;
252+ },
253+ {
254+ schema: parameters ,
255+ }
256+ );
257+ ```
258+
259+ </CodeGroup >
260+ </ParamField >
261+
235262<ParamField path = " url" type = " string" >
236263 Specifies the full endpoint URL of the workflow, including the route path.
237264
@@ -460,3 +487,38 @@ async def example(context: AsyncWorkflowContext[str]) -> None:
460487</ParamField >
461488
462489
490+ <ParamField path = " disableTelemetry" type = " boolean" >
491+ Disables anonymous telemetry data collection for this workflow endpoint. Since we don't collect telemetry
492+ in Python SDK, this option is only available in the TypeScript SDK.
493+
494+ By default, the Upstash Workflow SDK collects anonymous telemetry data to help improve the service.
495+ The collected data includes:
496+
497+ - SDK version
498+ - Platform (Vercel, AWS, etc.)
499+ - Runtime version (Node.js, Python, etc.)
500+
501+ Set ` disableTelemetry ` to ` true ` to opt out of telemetry for this specific workflow endpoint.
502+
503+ <CodeGroup >
504+
505+ ``` typescript TypeScript
506+ export const { POST } = serve <string >(
507+ async (context ) => { ... },
508+ {
509+ disableTelemetry: true
510+ }
511+ );
512+ ```
513+
514+ ``` python Python
515+ @serve.post (" /api/example" , disable_telemetry = True )
516+ async def example (context : AsyncWorkflowContext[str ]) -> None : ...
517+ ```
518+ </CodeGroup >
519+
520+ <Tip >
521+ You should also
522+ set [ ` disableTelemetry ` when triggering workflow runs via ` client.trigger() ` ] ( /workflow/basics/client/trigger#param-disable-telemetry ) to fully disable telemetry
523+ </Tip >
524+ </ParamField >
0 commit comments