From cdb63586c46456b8a018335c2a878e9eb86dc18a Mon Sep 17 00:00:00 2001 From: John Smith Date: Tue, 10 Dec 2024 11:09:09 +1030 Subject: [PATCH] chore: Expose handleCustomerAuthSchema (#260) --- sdk-node/src/index.ts | 1 + sdk-node/src/types.ts | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/sdk-node/src/index.ts b/sdk-node/src/index.ts index 5472aa1a..e9f05e25 100644 --- a/sdk-node/src/index.ts +++ b/sdk-node/src/index.ts @@ -24,6 +24,7 @@ export const masked = () => { export { statusChangeSchema, + handleCustomerAuthSchema, ContextInput, } from "./types"; diff --git a/sdk-node/src/types.ts b/sdk-node/src/types.ts index 54d8a3d0..48adc9dd 100644 --- a/sdk-node/src/types.ts +++ b/sdk-node/src/types.ts @@ -21,7 +21,7 @@ export type FunctionInput = any; /** - * Schema type that will be returned to a Run's OnStatusChange Function + * Schema for onStatusChange functions * * @example * ```ts @@ -42,6 +42,25 @@ export const statusChangeSchema = { }), }; +/** + * Schema for handleCustomerAuth functions + * + * @example + * ```ts + * inferable.default.register({ + * name: "handleCustomerAuth", + * schema: handleCustomerAuthSchema, + * func: (_input) => {}, + * }); + * ``` + */ +export const handleCustomerAuthSchema = { + input: z.object({ + token: z.string(), + }), +}; + + import type { JSONSchema4Type } from "json-schema"; import type { JsonSchema7Type } from "zod-to-json-schema";