Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 21, 04:45 UTC
| 1 | import type { ZodBackend } from './backend/types'; |
| 2 | import type { JsonSchema, JsonSchemaObject } from './types'; |
| 3 | |
| 4 | export type ParserOverrideOf<S> = (schema: JsonSchemaObject, refs: RefsOf<S>) => S | undefined; |
| 5 | |
| 6 | export type OptionsOf<S> = { |
| 7 | withoutDefaults?: boolean; |
| 8 | withoutDescribes?: boolean; |
| 9 | parserOverride?: ParserOverrideOf<S>; |
| 10 | depth?: number; |
| 11 | }; |
| 12 | |
| 13 | export type RefsOf<S> = OptionsOf<S> & { |
| 14 | path: Array<string | number>; |
| 15 | seen: Map<object | boolean, { n: number; r: S | undefined }>; |
| 16 | /** The document that local `$ref` pointers resolve against. */ |
| 17 | root?: JsonSchema; |
| 18 | }; |
| 19 | |
| 20 | /** What every parser receives: the references plus the builder that turns JSON Schema into `S`. */ |
| 21 | export type ParseContext<S> = RefsOf<S> & { |
| 22 | readonly backend: ZodBackend<S>; |
| 23 | /** Suppresses the JSON Schema annotations a backend would otherwise carry. */ |
| 24 | readonly withoutAnnotations?: boolean; |
| 25 | }; |