Skip to content

Commit

Permalink
chore: Expose handleCustomerAuthSchema (#260)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnjcsmith authored Dec 10, 2024
1 parent 2dfadad commit cdb6358
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions sdk-node/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const masked = () => {

export {
statusChangeSchema,
handleCustomerAuthSchema,
ContextInput,
} from "./types";

Expand Down
21 changes: 20 additions & 1 deletion sdk-node/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export type FunctionInput<T extends z.ZodTypeAny | JsonSchemaInput> =
any;

/**
* Schema type that will be returned to a Run's OnStatusChange Function
* Schema for onStatusChange functions
*
* @example
* ```ts
Expand All @@ -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";

Expand Down

0 comments on commit cdb6358

Please sign in to comment.