openai 4.53.2 → 4.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/README.md +2 -2
- package/_vendor/partial-json-parser/parser.d.ts +3 -0
- package/_vendor/partial-json-parser/parser.d.ts.map +1 -0
- package/_vendor/partial-json-parser/parser.js +226 -0
- package/_vendor/partial-json-parser/parser.js.map +1 -0
- package/_vendor/partial-json-parser/parser.mjs +223 -0
- package/_vendor/partial-json-parser/parser.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/Options.d.ts +32 -0
- package/_vendor/zod-to-json-schema/Options.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/Options.js +36 -0
- package/_vendor/zod-to-json-schema/Options.js.map +1 -0
- package/_vendor/zod-to-json-schema/Options.mjs +32 -0
- package/_vendor/zod-to-json-schema/Options.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/Refs.d.ts +15 -0
- package/_vendor/zod-to-json-schema/Refs.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/Refs.js +26 -0
- package/_vendor/zod-to-json-schema/Refs.js.map +1 -0
- package/_vendor/zod-to-json-schema/Refs.mjs +22 -0
- package/_vendor/zod-to-json-schema/Refs.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/errorMessages.d.ts +12 -0
- package/_vendor/zod-to-json-schema/errorMessages.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/errorMessages.js +20 -0
- package/_vendor/zod-to-json-schema/errorMessages.js.map +1 -0
- package/_vendor/zod-to-json-schema/errorMessages.mjs +15 -0
- package/_vendor/zod-to-json-schema/errorMessages.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/index.d.ts +38 -0
- package/_vendor/zod-to-json-schema/index.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/index.js +54 -0
- package/_vendor/zod-to-json-schema/index.js.map +1 -0
- package/_vendor/zod-to-json-schema/index.mjs +38 -0
- package/_vendor/zod-to-json-schema/index.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/parseDef.d.ts +38 -0
- package/_vendor/zod-to-json-schema/parseDef.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/parseDef.js +168 -0
- package/_vendor/zod-to-json-schema/parseDef.js.map +1 -0
- package/_vendor/zod-to-json-schema/parseDef.mjs +164 -0
- package/_vendor/zod-to-json-schema/parseDef.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/any.d.ts +3 -0
- package/_vendor/zod-to-json-schema/parsers/any.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/any.js +8 -0
- package/_vendor/zod-to-json-schema/parsers/any.js.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/any.mjs +4 -0
- package/_vendor/zod-to-json-schema/parsers/any.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/array.d.ts +13 -0
- package/_vendor/zod-to-json-schema/parsers/array.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/array.js +30 -0
- package/_vendor/zod-to-json-schema/parsers/array.js.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/array.mjs +26 -0
- package/_vendor/zod-to-json-schema/parsers/array.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/bigint.d.ts +15 -0
- package/_vendor/zod-to-json-schema/parsers/bigint.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/bigint.js +54 -0
- package/_vendor/zod-to-json-schema/parsers/bigint.js.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/bigint.mjs +50 -0
- package/_vendor/zod-to-json-schema/parsers/bigint.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/boolean.d.ts +5 -0
- package/_vendor/zod-to-json-schema/parsers/boolean.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/boolean.js +10 -0
- package/_vendor/zod-to-json-schema/parsers/boolean.js.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/boolean.mjs +6 -0
- package/_vendor/zod-to-json-schema/parsers/boolean.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/branded.d.ts +4 -0
- package/_vendor/zod-to-json-schema/parsers/branded.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/branded.js +9 -0
- package/_vendor/zod-to-json-schema/parsers/branded.js.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/branded.mjs +5 -0
- package/_vendor/zod-to-json-schema/parsers/branded.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/catch.d.ts +4 -0
- package/_vendor/zod-to-json-schema/parsers/catch.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/catch.js +9 -0
- package/_vendor/zod-to-json-schema/parsers/catch.js.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/catch.mjs +5 -0
- package/_vendor/zod-to-json-schema/parsers/catch.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/date.d.ts +16 -0
- package/_vendor/zod-to-json-schema/parsers/date.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/date.js +51 -0
- package/_vendor/zod-to-json-schema/parsers/date.js.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/date.mjs +47 -0
- package/_vendor/zod-to-json-schema/parsers/date.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/default.d.ts +7 -0
- package/_vendor/zod-to-json-schema/parsers/default.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/default.js +12 -0
- package/_vendor/zod-to-json-schema/parsers/default.js.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/default.mjs +8 -0
- package/_vendor/zod-to-json-schema/parsers/default.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/effects.d.ts +5 -0
- package/_vendor/zod-to-json-schema/parsers/effects.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/effects.js +9 -0
- package/_vendor/zod-to-json-schema/parsers/effects.js.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/effects.mjs +5 -0
- package/_vendor/zod-to-json-schema/parsers/effects.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/enum.d.ts +7 -0
- package/_vendor/zod-to-json-schema/parsers/enum.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/enum.js +11 -0
- package/_vendor/zod-to-json-schema/parsers/enum.js.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/enum.mjs +7 -0
- package/_vendor/zod-to-json-schema/parsers/enum.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/intersection.d.ts +9 -0
- package/_vendor/zod-to-json-schema/parsers/intersection.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/intersection.js +54 -0
- package/_vendor/zod-to-json-schema/parsers/intersection.js.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/intersection.mjs +50 -0
- package/_vendor/zod-to-json-schema/parsers/intersection.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/literal.d.ts +10 -0
- package/_vendor/zod-to-json-schema/parsers/literal.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/literal.js +26 -0
- package/_vendor/zod-to-json-schema/parsers/literal.js.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/literal.mjs +22 -0
- package/_vendor/zod-to-json-schema/parsers/literal.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/map.d.ts +16 -0
- package/_vendor/zod-to-json-schema/parsers/map.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/map.js +30 -0
- package/_vendor/zod-to-json-schema/parsers/map.js.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/map.mjs +26 -0
- package/_vendor/zod-to-json-schema/parsers/map.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/nativeEnum.d.ts +7 -0
- package/_vendor/zod-to-json-schema/parsers/nativeEnum.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/nativeEnum.js +21 -0
- package/_vendor/zod-to-json-schema/parsers/nativeEnum.js.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/nativeEnum.mjs +17 -0
- package/_vendor/zod-to-json-schema/parsers/nativeEnum.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/never.d.ts +5 -0
- package/_vendor/zod-to-json-schema/parsers/never.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/never.js +10 -0
- package/_vendor/zod-to-json-schema/parsers/never.js.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/never.mjs +6 -0
- package/_vendor/zod-to-json-schema/parsers/never.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/null.d.ts +6 -0
- package/_vendor/zod-to-json-schema/parsers/null.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/null.js +15 -0
- package/_vendor/zod-to-json-schema/parsers/null.js.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/null.mjs +11 -0
- package/_vendor/zod-to-json-schema/parsers/null.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/nullable.d.ts +11 -0
- package/_vendor/zod-to-json-schema/parsers/nullable.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/nullable.js +35 -0
- package/_vendor/zod-to-json-schema/parsers/nullable.js.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/nullable.mjs +31 -0
- package/_vendor/zod-to-json-schema/parsers/nullable.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/number.d.ts +14 -0
- package/_vendor/zod-to-json-schema/parsers/number.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/number.js +57 -0
- package/_vendor/zod-to-json-schema/parsers/number.js.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/number.mjs +53 -0
- package/_vendor/zod-to-json-schema/parsers/number.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/object.d.ts +11 -0
- package/_vendor/zod-to-json-schema/parsers/object.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/object.js +51 -0
- package/_vendor/zod-to-json-schema/parsers/object.js.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/object.mjs +47 -0
- package/_vendor/zod-to-json-schema/parsers/object.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/optional.d.ts +5 -0
- package/_vendor/zod-to-json-schema/parsers/optional.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/optional.js +25 -0
- package/_vendor/zod-to-json-schema/parsers/optional.js.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/optional.mjs +21 -0
- package/_vendor/zod-to-json-schema/parsers/optional.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/pipeline.d.ts +6 -0
- package/_vendor/zod-to-json-schema/parsers/pipeline.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/pipeline.js +25 -0
- package/_vendor/zod-to-json-schema/parsers/pipeline.js.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/pipeline.mjs +21 -0
- package/_vendor/zod-to-json-schema/parsers/pipeline.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/promise.d.ts +5 -0
- package/_vendor/zod-to-json-schema/parsers/promise.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/promise.js +9 -0
- package/_vendor/zod-to-json-schema/parsers/promise.js.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/promise.mjs +5 -0
- package/_vendor/zod-to-json-schema/parsers/promise.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/readonly.d.ts +4 -0
- package/_vendor/zod-to-json-schema/parsers/readonly.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/readonly.js +9 -0
- package/_vendor/zod-to-json-schema/parsers/readonly.js.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/readonly.mjs +5 -0
- package/_vendor/zod-to-json-schema/parsers/readonly.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/record.d.ts +14 -0
- package/_vendor/zod-to-json-schema/parsers/record.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/record.js +50 -0
- package/_vendor/zod-to-json-schema/parsers/record.js.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/record.mjs +46 -0
- package/_vendor/zod-to-json-schema/parsers/record.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/set.d.ts +14 -0
- package/_vendor/zod-to-json-schema/parsers/set.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/set.js +25 -0
- package/_vendor/zod-to-json-schema/parsers/set.js.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/set.mjs +21 -0
- package/_vendor/zod-to-json-schema/parsers/set.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/string.d.ts +70 -0
- package/_vendor/zod-to-json-schema/parsers/string.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/string.js +316 -0
- package/_vendor/zod-to-json-schema/parsers/string.js.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/string.mjs +312 -0
- package/_vendor/zod-to-json-schema/parsers/string.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/tuple.d.ts +14 -0
- package/_vendor/zod-to-json-schema/parsers/tuple.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/tuple.js +37 -0
- package/_vendor/zod-to-json-schema/parsers/tuple.js.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/tuple.mjs +33 -0
- package/_vendor/zod-to-json-schema/parsers/tuple.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/undefined.d.ts +5 -0
- package/_vendor/zod-to-json-schema/parsers/undefined.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/undefined.js +10 -0
- package/_vendor/zod-to-json-schema/parsers/undefined.js.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/undefined.mjs +6 -0
- package/_vendor/zod-to-json-schema/parsers/undefined.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/union.d.ts +24 -0
- package/_vendor/zod-to-json-schema/parsers/union.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/union.js +77 -0
- package/_vendor/zod-to-json-schema/parsers/union.js.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/union.mjs +73 -0
- package/_vendor/zod-to-json-schema/parsers/union.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/unknown.d.ts +3 -0
- package/_vendor/zod-to-json-schema/parsers/unknown.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/unknown.js +8 -0
- package/_vendor/zod-to-json-schema/parsers/unknown.js.map +1 -0
- package/_vendor/zod-to-json-schema/parsers/unknown.mjs +4 -0
- package/_vendor/zod-to-json-schema/parsers/unknown.mjs.map +1 -0
- package/_vendor/zod-to-json-schema/zodToJsonSchema.d.ts +11 -0
- package/_vendor/zod-to-json-schema/zodToJsonSchema.d.ts.map +1 -0
- package/_vendor/zod-to-json-schema/zodToJsonSchema.js +53 -0
- package/_vendor/zod-to-json-schema/zodToJsonSchema.js.map +1 -0
- package/_vendor/zod-to-json-schema/zodToJsonSchema.mjs +50 -0
- package/_vendor/zod-to-json-schema/zodToJsonSchema.mjs.map +1 -0
- package/error.d.ts +6 -0
- package/error.d.ts.map +1 -1
- package/error.js +13 -1
- package/error.js.map +1 -1
- package/error.mjs +10 -0
- package/error.mjs.map +1 -1
- package/helpers/zod.d.ts +57 -0
- package/helpers/zod.d.ts.map +1 -0
- package/helpers/zod.js +79 -0
- package/helpers/zod.js.map +1 -0
- package/helpers/zod.mjs +74 -0
- package/helpers/zod.mjs.map +1 -0
- package/index.d.mts +8 -0
- package/index.d.ts +8 -0
- package/index.d.ts.map +1 -1
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/index.mjs +1 -0
- package/index.mjs.map +1 -1
- package/lib/AbstractChatCompletionRunner.d.ts +15 -68
- package/lib/AbstractChatCompletionRunner.d.ts.map +1 -1
- package/lib/AbstractChatCompletionRunner.js +47 -200
- package/lib/AbstractChatCompletionRunner.js.map +1 -1
- package/lib/AbstractChatCompletionRunner.mjs +48 -201
- package/lib/AbstractChatCompletionRunner.mjs.map +1 -1
- package/lib/AssistantStream.d.ts +10 -6
- package/lib/AssistantStream.d.ts.map +1 -1
- package/lib/AssistantStream.js +18 -6
- package/lib/AssistantStream.js.map +1 -1
- package/lib/AssistantStream.mjs +18 -6
- package/lib/AssistantStream.mjs.map +1 -1
- package/lib/ChatCompletionRunner.d.ts +8 -6
- package/lib/ChatCompletionRunner.d.ts.map +1 -1
- package/lib/ChatCompletionRunner.js +4 -4
- package/lib/ChatCompletionRunner.js.map +1 -1
- package/lib/ChatCompletionRunner.mjs +4 -4
- package/lib/ChatCompletionRunner.mjs.map +1 -1
- package/lib/ChatCompletionStream.d.ts +71 -12
- package/lib/ChatCompletionStream.d.ts.map +1 -1
- package/lib/ChatCompletionStream.js +233 -42
- package/lib/ChatCompletionStream.js.map +1 -1
- package/lib/ChatCompletionStream.mjs +234 -43
- package/lib/ChatCompletionStream.mjs.map +1 -1
- package/lib/ChatCompletionStreamingRunner.d.ts +8 -6
- package/lib/ChatCompletionStreamingRunner.d.ts.map +1 -1
- package/lib/ChatCompletionStreamingRunner.js +9 -7
- package/lib/ChatCompletionStreamingRunner.js.map +1 -1
- package/lib/ChatCompletionStreamingRunner.mjs +9 -7
- package/lib/ChatCompletionStreamingRunner.mjs.map +1 -1
- package/lib/EventStream.d.ts +63 -0
- package/lib/EventStream.d.ts.map +1 -0
- package/lib/EventStream.js +200 -0
- package/lib/EventStream.js.map +1 -0
- package/lib/EventStream.mjs +196 -0
- package/lib/EventStream.mjs.map +1 -0
- package/lib/RunnableFunction.d.ts +4 -2
- package/lib/RunnableFunction.d.ts.map +1 -1
- package/lib/RunnableFunction.js.map +1 -1
- package/lib/RunnableFunction.mjs.map +1 -1
- package/lib/parser.d.ts +37 -0
- package/lib/parser.d.ts.map +1 -0
- package/lib/parser.js +133 -0
- package/lib/parser.js.map +1 -0
- package/lib/parser.mjs +121 -0
- package/lib/parser.mjs.map +1 -0
- package/package.json +10 -2
- package/resources/audio/audio.d.ts +4 -0
- package/resources/audio/audio.d.ts.map +1 -1
- package/resources/audio/audio.js.map +1 -1
- package/resources/audio/audio.mjs.map +1 -1
- package/resources/audio/index.d.ts +2 -2
- package/resources/audio/index.d.ts.map +1 -1
- package/resources/audio/index.js.map +1 -1
- package/resources/audio/index.mjs.map +1 -1
- package/resources/audio/speech.d.ts +3 -1
- package/resources/audio/speech.d.ts.map +1 -1
- package/resources/audio/speech.js.map +1 -1
- package/resources/audio/speech.mjs.map +1 -1
- package/resources/audio/transcriptions.d.ts +2 -1
- package/resources/audio/transcriptions.d.ts.map +1 -1
- package/resources/audio/transcriptions.js.map +1 -1
- package/resources/audio/transcriptions.mjs.map +1 -1
- package/resources/audio/translations.d.ts +2 -1
- package/resources/audio/translations.d.ts.map +1 -1
- package/resources/audio/translations.js.map +1 -1
- package/resources/audio/translations.mjs.map +1 -1
- package/resources/beta/assistants.d.ts +19 -3
- package/resources/beta/assistants.d.ts.map +1 -1
- package/resources/beta/assistants.js.map +1 -1
- package/resources/beta/assistants.mjs.map +1 -1
- package/resources/beta/beta.d.ts +0 -1
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/chat/completions.d.ts +25 -5
- package/resources/beta/chat/completions.d.ts.map +1 -1
- package/resources/beta/chat/completions.js +17 -5
- package/resources/beta/chat/completions.js.map +1 -1
- package/resources/beta/chat/completions.mjs +17 -5
- package/resources/beta/chat/completions.mjs.map +1 -1
- package/resources/beta/index.d.ts +1 -1
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta/threads/index.d.ts +2 -2
- package/resources/beta/threads/index.d.ts.map +1 -1
- package/resources/beta/threads/index.js.map +1 -1
- package/resources/beta/threads/index.mjs.map +1 -1
- package/resources/beta/threads/messages.d.ts +28 -2
- package/resources/beta/threads/messages.d.ts.map +1 -1
- package/resources/beta/threads/messages.js.map +1 -1
- package/resources/beta/threads/messages.mjs.map +1 -1
- package/resources/beta/threads/runs/runs.d.ts +12 -1
- package/resources/beta/threads/runs/runs.d.ts.map +1 -1
- package/resources/beta/threads/runs/runs.js.map +1 -1
- package/resources/beta/threads/runs/runs.mjs.map +1 -1
- package/resources/beta/threads/threads.d.ts +22 -8
- package/resources/beta/threads/threads.d.ts.map +1 -1
- package/resources/beta/threads/threads.js.map +1 -1
- package/resources/beta/threads/threads.mjs.map +1 -1
- package/resources/beta/vector-stores/files.d.ts +1 -1
- package/resources/beta/vector-stores/files.d.ts.map +1 -1
- package/resources/chat/chat.d.ts +2 -1
- package/resources/chat/chat.d.ts.map +1 -1
- package/resources/chat/chat.js.map +1 -1
- package/resources/chat/chat.mjs.map +1 -1
- package/resources/chat/completions.d.ts +37 -26
- package/resources/chat/completions.d.ts.map +1 -1
- package/resources/chat/completions.js.map +1 -1
- package/resources/chat/completions.mjs.map +1 -1
- package/resources/chat/index.d.ts +1 -1
- package/resources/chat/index.d.ts.map +1 -1
- package/resources/chat/index.js.map +1 -1
- package/resources/chat/index.mjs.map +1 -1
- package/resources/fine-tuning/jobs/jobs.d.ts +3 -3
- package/resources/fine-tuning/jobs/jobs.d.ts.map +1 -1
- package/resources/images.d.ts +5 -3
- package/resources/images.d.ts.map +1 -1
- package/resources/images.js.map +1 -1
- package/resources/images.mjs.map +1 -1
- package/resources/index.d.ts +3 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/moderations.d.ts +3 -1
- package/resources/moderations.d.ts.map +1 -1
- package/resources/moderations.js.map +1 -1
- package/resources/moderations.mjs.map +1 -1
- package/resources/shared.d.ts +53 -0
- package/resources/shared.d.ts.map +1 -1
- package/src/_vendor/partial-json-parser/README.md +3 -0
- package/src/_vendor/partial-json-parser/parser.ts +264 -0
- package/src/_vendor/zod-to-json-schema/Options.ts +73 -0
- package/src/_vendor/zod-to-json-schema/Refs.ts +39 -0
- package/src/_vendor/zod-to-json-schema/errorMessages.ts +31 -0
- package/src/_vendor/zod-to-json-schema/index.ts +37 -0
- package/src/_vendor/zod-to-json-schema/parseDef.ts +231 -0
- package/src/_vendor/zod-to-json-schema/parsers/any.ts +5 -0
- package/src/_vendor/zod-to-json-schema/parsers/array.ts +36 -0
- package/src/_vendor/zod-to-json-schema/parsers/bigint.ts +60 -0
- package/src/_vendor/zod-to-json-schema/parsers/boolean.ts +9 -0
- package/src/_vendor/zod-to-json-schema/parsers/branded.ts +7 -0
- package/src/_vendor/zod-to-json-schema/parsers/catch.ts +7 -0
- package/src/_vendor/zod-to-json-schema/parsers/date.ts +83 -0
- package/src/_vendor/zod-to-json-schema/parsers/default.ts +10 -0
- package/src/_vendor/zod-to-json-schema/parsers/effects.ts +7 -0
- package/src/_vendor/zod-to-json-schema/parsers/enum.ts +13 -0
- package/src/_vendor/zod-to-json-schema/parsers/intersection.ts +64 -0
- package/src/_vendor/zod-to-json-schema/parsers/literal.ts +37 -0
- package/src/_vendor/zod-to-json-schema/parsers/map.ts +42 -0
- package/src/_vendor/zod-to-json-schema/parsers/nativeEnum.ts +27 -0
- package/src/_vendor/zod-to-json-schema/parsers/never.ts +9 -0
- package/src/_vendor/zod-to-json-schema/parsers/null.ts +16 -0
- package/src/_vendor/zod-to-json-schema/parsers/nullable.ts +49 -0
- package/src/_vendor/zod-to-json-schema/parsers/number.ts +62 -0
- package/src/_vendor/zod-to-json-schema/parsers/object.ts +63 -0
- package/src/_vendor/zod-to-json-schema/parsers/optional.ts +25 -0
- package/src/_vendor/zod-to-json-schema/parsers/pipeline.ts +28 -0
- package/src/_vendor/zod-to-json-schema/parsers/promise.ts +7 -0
- package/src/_vendor/zod-to-json-schema/parsers/readonly.ts +7 -0
- package/src/_vendor/zod-to-json-schema/parsers/record.ts +73 -0
- package/src/_vendor/zod-to-json-schema/parsers/set.ts +36 -0
- package/src/_vendor/zod-to-json-schema/parsers/string.ts +400 -0
- package/src/_vendor/zod-to-json-schema/parsers/tuple.ts +54 -0
- package/src/_vendor/zod-to-json-schema/parsers/undefined.ts +9 -0
- package/src/_vendor/zod-to-json-schema/parsers/union.ts +119 -0
- package/src/_vendor/zod-to-json-schema/parsers/unknown.ts +5 -0
- package/src/_vendor/zod-to-json-schema/zodToJsonSchema.ts +91 -0
- package/src/error.ts +12 -0
- package/src/helpers/zod.ts +102 -0
- package/src/index.ts +8 -0
- package/src/lib/AbstractChatCompletionRunner.ts +72 -258
- package/src/lib/AssistantStream.ts +47 -19
- package/src/lib/ChatCompletionRunner.ts +16 -12
- package/src/lib/ChatCompletionStream.ts +423 -47
- package/src/lib/ChatCompletionStreamingRunner.ts +19 -15
- package/src/lib/{AbstractAssistantStreamRunner.ts → EventStream.ts} +37 -138
- package/src/lib/RunnableFunction.ts +4 -2
- package/src/lib/parser.ts +235 -0
- package/src/resources/audio/audio.ts +5 -0
- package/src/resources/audio/index.ts +2 -2
- package/src/resources/audio/speech.ts +4 -1
- package/src/resources/audio/transcriptions.ts +2 -1
- package/src/resources/audio/translations.ts +2 -1
- package/src/resources/beta/assistants.ts +19 -26
- package/src/resources/beta/beta.ts +0 -1
- package/src/resources/beta/chat/completions.ts +77 -27
- package/src/resources/beta/index.ts +0 -1
- package/src/resources/beta/threads/index.ts +2 -1
- package/src/resources/beta/threads/messages.ts +41 -2
- package/src/resources/beta/threads/runs/runs.ts +12 -25
- package/src/resources/beta/threads/threads.ts +26 -32
- package/src/resources/beta/vector-stores/files.ts +1 -1
- package/src/resources/chat/chat.ts +2 -0
- package/src/resources/chat/completions.ts +47 -27
- package/src/resources/chat/index.ts +1 -0
- package/src/resources/fine-tuning/jobs/jobs.ts +3 -3
- package/src/resources/images.ts +6 -3
- package/src/resources/index.ts +9 -2
- package/src/resources/moderations.ts +4 -1
- package/src/resources/shared.ts +62 -0
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/lib/AbstractAssistantStreamRunner.d.ts +0 -74
- package/lib/AbstractAssistantStreamRunner.d.ts.map +0 -1
- package/lib/AbstractAssistantStreamRunner.js +0 -246
- package/lib/AbstractAssistantStreamRunner.js.map +0 -1
- package/lib/AbstractAssistantStreamRunner.mjs +0 -242
- package/lib/AbstractAssistantStreamRunner.mjs.map +0 -1
- package/lib/ChatCompletionRunFunctions.test.d.ts +0 -2
- package/lib/ChatCompletionRunFunctions.test.d.ts.map +0 -1
- package/lib/ChatCompletionRunFunctions.test.js +0 -2177
- package/lib/ChatCompletionRunFunctions.test.js.map +0 -1
- package/lib/ChatCompletionRunFunctions.test.mjs +0 -2172
- package/lib/ChatCompletionRunFunctions.test.mjs.map +0 -1
- package/src/lib/ChatCompletionRunFunctions.test.ts +0 -2328
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ZodNullableDef } from 'zod';
|
|
2
|
+
import { JsonSchema7Type } from "../parseDef.js";
|
|
3
|
+
import { Refs } from "../Refs.js";
|
|
4
|
+
import { JsonSchema7NullType } from "./null.js";
|
|
5
|
+
export type JsonSchema7NullableType = {
|
|
6
|
+
anyOf: [JsonSchema7Type, JsonSchema7NullType];
|
|
7
|
+
} | {
|
|
8
|
+
type: [string, 'null'];
|
|
9
|
+
};
|
|
10
|
+
export declare function parseNullableDef(def: ZodNullableDef, refs: Refs): JsonSchema7NullableType | undefined;
|
|
11
|
+
//# sourceMappingURL=nullable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nullable.d.ts","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/nullable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,eAAe,EAAY,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAG7C,MAAM,MAAM,uBAAuB,GAC/B;IACE,KAAK,EAAE,CAAC,eAAe,EAAE,mBAAmB,CAAC,CAAC;CAC/C,GACD;IACE,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACxB,CAAC;AAEN,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,GAAG,uBAAuB,GAAG,SAAS,CAkCrG"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseNullableDef = void 0;
|
|
4
|
+
const parseDef_1 = require("../parseDef.js");
|
|
5
|
+
const union_1 = require("./union.js");
|
|
6
|
+
function parseNullableDef(def, refs) {
|
|
7
|
+
if (['ZodString', 'ZodNumber', 'ZodBigInt', 'ZodBoolean', 'ZodNull'].includes(def.innerType._def.typeName) &&
|
|
8
|
+
(!def.innerType._def.checks || !def.innerType._def.checks.length)) {
|
|
9
|
+
if (refs.target === 'openApi3') {
|
|
10
|
+
return {
|
|
11
|
+
type: union_1.primitiveMappings[def.innerType._def.typeName],
|
|
12
|
+
nullable: true,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
return {
|
|
16
|
+
type: [union_1.primitiveMappings[def.innerType._def.typeName], 'null'],
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
if (refs.target === 'openApi3') {
|
|
20
|
+
const base = (0, parseDef_1.parseDef)(def.innerType._def, {
|
|
21
|
+
...refs,
|
|
22
|
+
currentPath: [...refs.currentPath],
|
|
23
|
+
});
|
|
24
|
+
if (base && '$ref' in base)
|
|
25
|
+
return { allOf: [base], nullable: true };
|
|
26
|
+
return base && { ...base, nullable: true };
|
|
27
|
+
}
|
|
28
|
+
const base = (0, parseDef_1.parseDef)(def.innerType._def, {
|
|
29
|
+
...refs,
|
|
30
|
+
currentPath: [...refs.currentPath, 'anyOf', '0'],
|
|
31
|
+
});
|
|
32
|
+
return base && { anyOf: [base, { type: 'null' }] };
|
|
33
|
+
}
|
|
34
|
+
exports.parseNullableDef = parseNullableDef;
|
|
35
|
+
//# sourceMappingURL=nullable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nullable.js","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/nullable.ts"],"names":[],"mappings":";;;AACA,6CAAwD;AAGxD,sCAA4C;AAU5C,SAAgB,gBAAgB,CAAC,GAAmB,EAAE,IAAU;IAC9D,IACE,CAAC,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC;QACtG,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EACjE;QACA,IAAI,IAAI,CAAC,MAAM,KAAK,UAAU,EAAE;YAC9B,OAAO;gBACL,IAAI,EAAE,yBAAiB,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,QAA0C,CAAC;gBACtF,QAAQ,EAAE,IAAI;aACR,CAAC;SACV;QAED,OAAO;YACL,IAAI,EAAE,CAAC,yBAAiB,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,QAA0C,CAAC,EAAE,MAAM,CAAC;SACjG,CAAC;KACH;IAED,IAAI,IAAI,CAAC,MAAM,KAAK,UAAU,EAAE;QAC9B,MAAM,IAAI,GAAG,IAAA,mBAAQ,EAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE;YACxC,GAAG,IAAI;YACP,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC;SACnC,CAAC,CAAC;QAEH,IAAI,IAAI,IAAI,MAAM,IAAI,IAAI;YAAE,OAAO,EAAE,KAAK,EAAE,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAS,CAAC;QAE5E,OAAO,IAAI,IAAK,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAU,CAAC;KACrD;IAED,MAAM,IAAI,GAAG,IAAA,mBAAQ,EAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE;QACxC,GAAG,IAAI;QACP,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE,GAAG,CAAC;KACjD,CAAC,CAAC;IAEH,OAAO,IAAI,IAAI,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;AACrD,CAAC;AAlCD,4CAkCC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { parseDef } from "../parseDef.mjs";
|
|
2
|
+
import { primitiveMappings } from "./union.mjs";
|
|
3
|
+
export function parseNullableDef(def, refs) {
|
|
4
|
+
if (['ZodString', 'ZodNumber', 'ZodBigInt', 'ZodBoolean', 'ZodNull'].includes(def.innerType._def.typeName) &&
|
|
5
|
+
(!def.innerType._def.checks || !def.innerType._def.checks.length)) {
|
|
6
|
+
if (refs.target === 'openApi3') {
|
|
7
|
+
return {
|
|
8
|
+
type: primitiveMappings[def.innerType._def.typeName],
|
|
9
|
+
nullable: true,
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
return {
|
|
13
|
+
type: [primitiveMappings[def.innerType._def.typeName], 'null'],
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
if (refs.target === 'openApi3') {
|
|
17
|
+
const base = parseDef(def.innerType._def, {
|
|
18
|
+
...refs,
|
|
19
|
+
currentPath: [...refs.currentPath],
|
|
20
|
+
});
|
|
21
|
+
if (base && '$ref' in base)
|
|
22
|
+
return { allOf: [base], nullable: true };
|
|
23
|
+
return base && { ...base, nullable: true };
|
|
24
|
+
}
|
|
25
|
+
const base = parseDef(def.innerType._def, {
|
|
26
|
+
...refs,
|
|
27
|
+
currentPath: [...refs.currentPath, 'anyOf', '0'],
|
|
28
|
+
});
|
|
29
|
+
return base && { anyOf: [base, { type: 'null' }] };
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=nullable.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nullable.mjs","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/nullable.ts"],"names":[],"mappings":"OACO,EAAmB,QAAQ,EAAE;OAG7B,EAAE,iBAAiB,EAAE;AAU5B,MAAM,UAAU,gBAAgB,CAAC,GAAmB,EAAE,IAAU;IAC9D,IACE,CAAC,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC;QACtG,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EACjE;QACA,IAAI,IAAI,CAAC,MAAM,KAAK,UAAU,EAAE;YAC9B,OAAO;gBACL,IAAI,EAAE,iBAAiB,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,QAA0C,CAAC;gBACtF,QAAQ,EAAE,IAAI;aACR,CAAC;SACV;QAED,OAAO;YACL,IAAI,EAAE,CAAC,iBAAiB,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,QAA0C,CAAC,EAAE,MAAM,CAAC;SACjG,CAAC;KACH;IAED,IAAI,IAAI,CAAC,MAAM,KAAK,UAAU,EAAE;QAC9B,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE;YACxC,GAAG,IAAI;YACP,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC;SACnC,CAAC,CAAC;QAEH,IAAI,IAAI,IAAI,MAAM,IAAI,IAAI;YAAE,OAAO,EAAE,KAAK,EAAE,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAS,CAAC;QAE5E,OAAO,IAAI,IAAK,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAU,CAAC;KACrD;IAED,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE;QACxC,GAAG,IAAI;QACP,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE,GAAG,CAAC;KACjD,CAAC,CAAC;IAEH,OAAO,IAAI,IAAI,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;AACrD,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ZodNumberDef } from 'zod';
|
|
2
|
+
import { ErrorMessages } from "../errorMessages.js";
|
|
3
|
+
import { Refs } from "../Refs.js";
|
|
4
|
+
export type JsonSchema7NumberType = {
|
|
5
|
+
type: 'number' | 'integer';
|
|
6
|
+
minimum?: number;
|
|
7
|
+
exclusiveMinimum?: number;
|
|
8
|
+
maximum?: number;
|
|
9
|
+
exclusiveMaximum?: number;
|
|
10
|
+
multipleOf?: number;
|
|
11
|
+
errorMessage?: ErrorMessages<JsonSchema7NumberType>;
|
|
12
|
+
};
|
|
13
|
+
export declare function parseNumberDef(def: ZodNumberDef, refs: Refs): JsonSchema7NumberType;
|
|
14
|
+
//# sourceMappingURL=number.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/number.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AACnC,OAAO,EAAmB,aAAa,EAA6B,MAAM,kBAAkB,CAAC;AAC7F,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;CACrD,CAAC;AAEF,wBAAgB,cAAc,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,GAAG,qBAAqB,CA+CnF"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseNumberDef = void 0;
|
|
4
|
+
const errorMessages_1 = require("../errorMessages.js");
|
|
5
|
+
function parseNumberDef(def, refs) {
|
|
6
|
+
const res = {
|
|
7
|
+
type: 'number',
|
|
8
|
+
};
|
|
9
|
+
if (!def.checks)
|
|
10
|
+
return res;
|
|
11
|
+
for (const check of def.checks) {
|
|
12
|
+
switch (check.kind) {
|
|
13
|
+
case 'int':
|
|
14
|
+
res.type = 'integer';
|
|
15
|
+
(0, errorMessages_1.addErrorMessage)(res, 'type', check.message, refs);
|
|
16
|
+
break;
|
|
17
|
+
case 'min':
|
|
18
|
+
if (refs.target === 'jsonSchema7') {
|
|
19
|
+
if (check.inclusive) {
|
|
20
|
+
(0, errorMessages_1.setResponseValueAndErrors)(res, 'minimum', check.value, check.message, refs);
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
(0, errorMessages_1.setResponseValueAndErrors)(res, 'exclusiveMinimum', check.value, check.message, refs);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
if (!check.inclusive) {
|
|
28
|
+
res.exclusiveMinimum = true;
|
|
29
|
+
}
|
|
30
|
+
(0, errorMessages_1.setResponseValueAndErrors)(res, 'minimum', check.value, check.message, refs);
|
|
31
|
+
}
|
|
32
|
+
break;
|
|
33
|
+
case 'max':
|
|
34
|
+
if (refs.target === 'jsonSchema7') {
|
|
35
|
+
if (check.inclusive) {
|
|
36
|
+
(0, errorMessages_1.setResponseValueAndErrors)(res, 'maximum', check.value, check.message, refs);
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
(0, errorMessages_1.setResponseValueAndErrors)(res, 'exclusiveMaximum', check.value, check.message, refs);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
if (!check.inclusive) {
|
|
44
|
+
res.exclusiveMaximum = true;
|
|
45
|
+
}
|
|
46
|
+
(0, errorMessages_1.setResponseValueAndErrors)(res, 'maximum', check.value, check.message, refs);
|
|
47
|
+
}
|
|
48
|
+
break;
|
|
49
|
+
case 'multipleOf':
|
|
50
|
+
(0, errorMessages_1.setResponseValueAndErrors)(res, 'multipleOf', check.value, check.message, refs);
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return res;
|
|
55
|
+
}
|
|
56
|
+
exports.parseNumberDef = parseNumberDef;
|
|
57
|
+
//# sourceMappingURL=number.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"number.js","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/number.ts"],"names":[],"mappings":";;;AACA,uDAA6F;AAa7F,SAAgB,cAAc,CAAC,GAAiB,EAAE,IAAU;IAC1D,MAAM,GAAG,GAA0B;QACjC,IAAI,EAAE,QAAQ;KACf,CAAC;IAEF,IAAI,CAAC,GAAG,CAAC,MAAM;QAAE,OAAO,GAAG,CAAC;IAE5B,KAAK,MAAM,KAAK,IAAI,GAAG,CAAC,MAAM,EAAE;QAC9B,QAAQ,KAAK,CAAC,IAAI,EAAE;YAClB,KAAK,KAAK;gBACR,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;gBACrB,IAAA,+BAAe,EAAC,GAAG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,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;iBAC7E;gBACD,MAAM;YACR,KAAK,YAAY;gBACf,IAAA,yCAAyB,EAAC,GAAG,EAAE,YAAY,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;gBAC/E,MAAM;SACT;KACF;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AA/CD,wCA+CC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { addErrorMessage, setResponseValueAndErrors } from "../errorMessages.mjs";
|
|
2
|
+
export function parseNumberDef(def, refs) {
|
|
3
|
+
const res = {
|
|
4
|
+
type: 'number',
|
|
5
|
+
};
|
|
6
|
+
if (!def.checks)
|
|
7
|
+
return res;
|
|
8
|
+
for (const check of def.checks) {
|
|
9
|
+
switch (check.kind) {
|
|
10
|
+
case 'int':
|
|
11
|
+
res.type = 'integer';
|
|
12
|
+
addErrorMessage(res, 'type', check.message, refs);
|
|
13
|
+
break;
|
|
14
|
+
case 'min':
|
|
15
|
+
if (refs.target === 'jsonSchema7') {
|
|
16
|
+
if (check.inclusive) {
|
|
17
|
+
setResponseValueAndErrors(res, 'minimum', check.value, check.message, refs);
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
setResponseValueAndErrors(res, 'exclusiveMinimum', check.value, check.message, refs);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
if (!check.inclusive) {
|
|
25
|
+
res.exclusiveMinimum = true;
|
|
26
|
+
}
|
|
27
|
+
setResponseValueAndErrors(res, 'minimum', check.value, check.message, refs);
|
|
28
|
+
}
|
|
29
|
+
break;
|
|
30
|
+
case 'max':
|
|
31
|
+
if (refs.target === 'jsonSchema7') {
|
|
32
|
+
if (check.inclusive) {
|
|
33
|
+
setResponseValueAndErrors(res, 'maximum', check.value, check.message, refs);
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
setResponseValueAndErrors(res, 'exclusiveMaximum', check.value, check.message, refs);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
if (!check.inclusive) {
|
|
41
|
+
res.exclusiveMaximum = true;
|
|
42
|
+
}
|
|
43
|
+
setResponseValueAndErrors(res, 'maximum', check.value, check.message, refs);
|
|
44
|
+
}
|
|
45
|
+
break;
|
|
46
|
+
case 'multipleOf':
|
|
47
|
+
setResponseValueAndErrors(res, 'multipleOf', check.value, check.message, refs);
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return res;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=number.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"number.mjs","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/number.ts"],"names":[],"mappings":"OACO,EAAE,eAAe,EAAiB,yBAAyB,EAAE;AAapE,MAAM,UAAU,cAAc,CAAC,GAAiB,EAAE,IAAU;IAC1D,MAAM,GAAG,GAA0B;QACjC,IAAI,EAAE,QAAQ;KACf,CAAC;IAEF,IAAI,CAAC,GAAG,CAAC,MAAM;QAAE,OAAO,GAAG,CAAC;IAE5B,KAAK,MAAM,KAAK,IAAI,GAAG,CAAC,MAAM,EAAE;QAC9B,QAAQ,KAAK,CAAC,IAAI,EAAE;YAClB,KAAK,KAAK;gBACR,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;gBACrB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;gBAClD,MAAM;YACR,KAAK,KAAK;gBACR,IAAI,IAAI,CAAC,MAAM,KAAK,aAAa,EAAE;oBACjC,IAAI,KAAK,CAAC,SAAS,EAAE;wBACnB,yBAAyB,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;qBAC7E;yBAAM;wBACL,yBAAyB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
+
import { Refs } from "../Refs.js";
|
|
4
|
+
export type JsonSchema7ObjectType = {
|
|
5
|
+
type: 'object';
|
|
6
|
+
properties: Record<string, JsonSchema7Type>;
|
|
7
|
+
additionalProperties: boolean | JsonSchema7Type;
|
|
8
|
+
required?: string[];
|
|
9
|
+
};
|
|
10
|
+
export declare function parseObjectDef(def: ZodObjectDef, refs: Refs): JsonSchema7ObjectType;
|
|
11
|
+
//# sourceMappingURL=object.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AACnC,OAAO,EAAE,eAAe,EAAY,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAoB/B,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAC5C,oBAAoB,EAAE,OAAO,GAAG,eAAe,CAAC;IAChD,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAEF,wBAAgB,cAAc,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,yBAiC3D"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseObjectDef = void 0;
|
|
4
|
+
const parseDef_1 = require("../parseDef.js");
|
|
5
|
+
function decideAdditionalProperties(def, refs) {
|
|
6
|
+
if (refs.removeAdditionalStrategy === 'strict') {
|
|
7
|
+
return def.catchall._def.typeName === 'ZodNever' ?
|
|
8
|
+
def.unknownKeys !== 'strict'
|
|
9
|
+
: (0, parseDef_1.parseDef)(def.catchall._def, {
|
|
10
|
+
...refs,
|
|
11
|
+
currentPath: [...refs.currentPath, 'additionalProperties'],
|
|
12
|
+
}) ?? true;
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
return def.catchall._def.typeName === 'ZodNever' ?
|
|
16
|
+
def.unknownKeys === 'passthrough'
|
|
17
|
+
: (0, parseDef_1.parseDef)(def.catchall._def, {
|
|
18
|
+
...refs,
|
|
19
|
+
currentPath: [...refs.currentPath, 'additionalProperties'],
|
|
20
|
+
}) ?? true;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function parseObjectDef(def, refs) {
|
|
24
|
+
const result = {
|
|
25
|
+
type: 'object',
|
|
26
|
+
...Object.entries(def.shape()).reduce((acc, [propName, propDef]) => {
|
|
27
|
+
if (propDef === undefined || propDef._def === undefined)
|
|
28
|
+
return acc;
|
|
29
|
+
const parsedDef = (0, parseDef_1.parseDef)(propDef._def, {
|
|
30
|
+
...refs,
|
|
31
|
+
currentPath: [...refs.currentPath, 'properties', propName],
|
|
32
|
+
propertyPath: [...refs.currentPath, 'properties', propName],
|
|
33
|
+
});
|
|
34
|
+
if (parsedDef === undefined)
|
|
35
|
+
return acc;
|
|
36
|
+
return {
|
|
37
|
+
properties: {
|
|
38
|
+
...acc.properties,
|
|
39
|
+
[propName]: parsedDef,
|
|
40
|
+
},
|
|
41
|
+
required: propDef.isOptional() && !refs.openaiStrictMode ? acc.required : [...acc.required, propName],
|
|
42
|
+
};
|
|
43
|
+
}, { properties: {}, required: [] }),
|
|
44
|
+
additionalProperties: decideAdditionalProperties(def, refs),
|
|
45
|
+
};
|
|
46
|
+
if (!result.required.length)
|
|
47
|
+
delete result.required;
|
|
48
|
+
return result;
|
|
49
|
+
}
|
|
50
|
+
exports.parseObjectDef = parseObjectDef;
|
|
51
|
+
//# sourceMappingURL=object.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object.js","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/object.ts"],"names":[],"mappings":";;;AACA,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AAE,YAAY,EAAE,QAAQ,CAAC;gBAC1D,YAAY,EAAE,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,YAAY,EAAE,QAAQ,CAAC;aAC5D,CAAC,CAAC;YACH,IAAI,SAAS,KAAK,SAAS;gBAAE,OAAO,GAAG,CAAC;YACxC,OAAO;gBACL,UAAU,EAAE;oBACV,GAAG,GAAG,CAAC,UAAU;oBACjB,CAAC,QAAQ,CAAC,EAAE,SAAS;iBACtB;gBACD,QAAQ,EACN,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC;aAC9F,CAAC;QACJ,CAAC,EACD,EAAE,UAAU,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CACjC;QACD,oBAAoB,EAAE,0BAA0B,CAAC,GAAG,EAAE,IAAI,CAAC;KAC5D,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,QAAS,CAAC,MAAM;QAAE,OAAO,MAAM,CAAC,QAAQ,CAAC;IACrD,OAAO,MAAM,CAAC;AAChB,CAAC;AAjCD,wCAiCC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { parseDef } from "../parseDef.mjs";
|
|
2
|
+
function decideAdditionalProperties(def, refs) {
|
|
3
|
+
if (refs.removeAdditionalStrategy === 'strict') {
|
|
4
|
+
return def.catchall._def.typeName === 'ZodNever' ?
|
|
5
|
+
def.unknownKeys !== 'strict'
|
|
6
|
+
: parseDef(def.catchall._def, {
|
|
7
|
+
...refs,
|
|
8
|
+
currentPath: [...refs.currentPath, 'additionalProperties'],
|
|
9
|
+
}) ?? true;
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
return def.catchall._def.typeName === 'ZodNever' ?
|
|
13
|
+
def.unknownKeys === 'passthrough'
|
|
14
|
+
: parseDef(def.catchall._def, {
|
|
15
|
+
...refs,
|
|
16
|
+
currentPath: [...refs.currentPath, 'additionalProperties'],
|
|
17
|
+
}) ?? true;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export function parseObjectDef(def, refs) {
|
|
21
|
+
const result = {
|
|
22
|
+
type: 'object',
|
|
23
|
+
...Object.entries(def.shape()).reduce((acc, [propName, propDef]) => {
|
|
24
|
+
if (propDef === undefined || propDef._def === undefined)
|
|
25
|
+
return acc;
|
|
26
|
+
const parsedDef = parseDef(propDef._def, {
|
|
27
|
+
...refs,
|
|
28
|
+
currentPath: [...refs.currentPath, 'properties', propName],
|
|
29
|
+
propertyPath: [...refs.currentPath, 'properties', propName],
|
|
30
|
+
});
|
|
31
|
+
if (parsedDef === undefined)
|
|
32
|
+
return acc;
|
|
33
|
+
return {
|
|
34
|
+
properties: {
|
|
35
|
+
...acc.properties,
|
|
36
|
+
[propName]: parsedDef,
|
|
37
|
+
},
|
|
38
|
+
required: propDef.isOptional() && !refs.openaiStrictMode ? acc.required : [...acc.required, propName],
|
|
39
|
+
};
|
|
40
|
+
}, { properties: {}, required: [] }),
|
|
41
|
+
additionalProperties: decideAdditionalProperties(def, refs),
|
|
42
|
+
};
|
|
43
|
+
if (!result.required.length)
|
|
44
|
+
delete result.required;
|
|
45
|
+
return result;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=object.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object.mjs","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/object.ts"],"names":[],"mappings":"OACO,EAAmB,QAAQ,EAAE;AAGpC,SAAS,0BAA0B,CAAC,GAAiB,EAAE,IAAU;IAC/D,IAAI,IAAI,CAAC,wBAAwB,KAAK,QAAQ,EAAE;QAC9C,OAAO,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,KAAK,UAAU,CAAC,CAAC;YAC9C,GAAG,CAAC,WAAW,KAAK,QAAQ;YAC9B,CA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AC,QAAQ,CAAC,EAAE,SAAS;iBACtB;gBACD,QAAQ,EACN,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC;aAC9F,CAAC;QACJ,CAAC,EACD,EAAE,UAAU,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CACjC;QACD,oBAAoB,EAAE,0BAA0B,CAAC,GAAG,EAAE,IAAI,CAAC;KAC5D,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,QAAS,CAAC,MAAM;QAAE,OAAO,MAAM,CAAC,QAAQ,CAAC;IACrD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ZodOptionalDef } from 'zod';
|
|
2
|
+
import { JsonSchema7Type } from "../parseDef.js";
|
|
3
|
+
import { Refs } from "../Refs.js";
|
|
4
|
+
export declare const parseOptionalDef: (def: ZodOptionalDef, refs: Refs) => JsonSchema7Type | undefined;
|
|
5
|
+
//# sourceMappingURL=optional.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"optional.d.ts","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/optional.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,eAAe,EAAY,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,eAAO,MAAM,gBAAgB,QAAS,cAAc,QAAQ,IAAI,KAAG,eAAe,GAAG,SAoBpF,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseOptionalDef = void 0;
|
|
4
|
+
const parseDef_1 = require("../parseDef.js");
|
|
5
|
+
const parseOptionalDef = (def, refs) => {
|
|
6
|
+
if (refs.currentPath.toString() === refs.propertyPath?.toString()) {
|
|
7
|
+
return (0, parseDef_1.parseDef)(def.innerType._def, refs);
|
|
8
|
+
}
|
|
9
|
+
const innerSchema = (0, parseDef_1.parseDef)(def.innerType._def, {
|
|
10
|
+
...refs,
|
|
11
|
+
currentPath: [...refs.currentPath, 'anyOf', '1'],
|
|
12
|
+
});
|
|
13
|
+
return innerSchema ?
|
|
14
|
+
{
|
|
15
|
+
anyOf: [
|
|
16
|
+
{
|
|
17
|
+
not: {},
|
|
18
|
+
},
|
|
19
|
+
innerSchema,
|
|
20
|
+
],
|
|
21
|
+
}
|
|
22
|
+
: {};
|
|
23
|
+
};
|
|
24
|
+
exports.parseOptionalDef = parseOptionalDef;
|
|
25
|
+
//# sourceMappingURL=optional.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"optional.js","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/optional.ts"],"names":[],"mappings":";;;AACA,6CAAwD;AAGjD,MAAM,gBAAgB,GAAG,CAAC,GAAmB,EAAE,IAAU,EAA+B,EAAE;IAC/F,IAAI,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,IAAI,CAAC,YAAY,EAAE,QAAQ,EAAE,EAAE;QACjE,OAAO,IAAA,mBAAQ,EAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;KAC3C;IAED,MAAM,WAAW,GAAG,IAAA,mBAAQ,EAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE;QAC/C,GAAG,IAAI;QACP,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE,GAAG,CAAC;KACjD,CAAC,CAAC;IAEH,OAAO,WAAW,CAAC,CAAC;QAChB;YACE,KAAK,EAAE;gBACL;oBACE,GAAG,EAAE,EAAE;iBACR;gBACD,WAAW;aACZ;SACF;QACH,CAAC,CAAC,EAAE,CAAC;AACT,CAAC,CAAC;AApBW,QAAA,gBAAgB,oBAoB3B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { parseDef } from "../parseDef.mjs";
|
|
2
|
+
export const parseOptionalDef = (def, refs) => {
|
|
3
|
+
if (refs.currentPath.toString() === refs.propertyPath?.toString()) {
|
|
4
|
+
return parseDef(def.innerType._def, refs);
|
|
5
|
+
}
|
|
6
|
+
const innerSchema = parseDef(def.innerType._def, {
|
|
7
|
+
...refs,
|
|
8
|
+
currentPath: [...refs.currentPath, 'anyOf', '1'],
|
|
9
|
+
});
|
|
10
|
+
return innerSchema ?
|
|
11
|
+
{
|
|
12
|
+
anyOf: [
|
|
13
|
+
{
|
|
14
|
+
not: {},
|
|
15
|
+
},
|
|
16
|
+
innerSchema,
|
|
17
|
+
],
|
|
18
|
+
}
|
|
19
|
+
: {};
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=optional.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"optional.mjs","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/optional.ts"],"names":[],"mappings":"OACO,EAAmB,QAAQ,EAAE;AAGpC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,GAAmB,EAAE,IAAU,EAA+B,EAAE;IAC/F,IAAI,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,IAAI,CAAC,YAAY,EAAE,QAAQ,EAAE,EAAE;QACjE,OAAO,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;KAC3C;IAED,MAAM,WAAW,GAAG,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE;QAC/C,GAAG,IAAI;QACP,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE,GAAG,CAAC;KACjD,CAAC,CAAC;IAEH,OAAO,WAAW,CAAC,CAAC;QAChB;YACE,KAAK,EAAE;gBACL;oBACE,GAAG,EAAE,EAAE;iBACR;gBACD,WAAW;aACZ;SACF;QACH,CAAC,CAAC,EAAE,CAAC;AACT,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ZodPipelineDef } from 'zod';
|
|
2
|
+
import { JsonSchema7Type } from "../parseDef.js";
|
|
3
|
+
import { Refs } from "../Refs.js";
|
|
4
|
+
import { JsonSchema7AllOfType } from "./intersection.js";
|
|
5
|
+
export declare const parsePipelineDef: (def: ZodPipelineDef<any, any>, refs: Refs) => JsonSchema7AllOfType | JsonSchema7Type | undefined;
|
|
6
|
+
//# sourceMappingURL=pipeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/pipeline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,eAAe,EAAY,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD,eAAO,MAAM,gBAAgB,QACtB,eAAe,GAAG,EAAE,GAAG,CAAC,QACvB,IAAI,KACT,oBAAoB,GAAG,eAAe,GAAG,SAmB3C,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parsePipelineDef = void 0;
|
|
4
|
+
const parseDef_1 = require("../parseDef.js");
|
|
5
|
+
const parsePipelineDef = (def, refs) => {
|
|
6
|
+
if (refs.pipeStrategy === 'input') {
|
|
7
|
+
return (0, parseDef_1.parseDef)(def.in._def, refs);
|
|
8
|
+
}
|
|
9
|
+
else if (refs.pipeStrategy === 'output') {
|
|
10
|
+
return (0, parseDef_1.parseDef)(def.out._def, refs);
|
|
11
|
+
}
|
|
12
|
+
const a = (0, parseDef_1.parseDef)(def.in._def, {
|
|
13
|
+
...refs,
|
|
14
|
+
currentPath: [...refs.currentPath, 'allOf', '0'],
|
|
15
|
+
});
|
|
16
|
+
const b = (0, parseDef_1.parseDef)(def.out._def, {
|
|
17
|
+
...refs,
|
|
18
|
+
currentPath: [...refs.currentPath, 'allOf', a ? '1' : '0'],
|
|
19
|
+
});
|
|
20
|
+
return {
|
|
21
|
+
allOf: [a, b].filter((x) => x !== undefined),
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
exports.parsePipelineDef = parsePipelineDef;
|
|
25
|
+
//# sourceMappingURL=pipeline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline.js","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/pipeline.ts"],"names":[],"mappings":";;;AACA,6CAAwD;AAIjD,MAAM,gBAAgB,GAAG,CAC9B,GAA6B,EAC7B,IAAU,EAC0C,EAAE;IACtD,IAAI,IAAI,CAAC,YAAY,KAAK,OAAO,EAAE;QACjC,OAAO,IAAA,mBAAQ,EAAC,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;KACpC;SAAM,IAAI,IAAI,CAAC,YAAY,KAAK,QAAQ,EAAE;QACzC,OAAO,IAAA,mBAAQ,EAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;KACrC;IAED,MAAM,CAAC,GAAG,IAAA,mBAAQ,EAAC,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE;QAC9B,GAAG,IAAI;QACP,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE,GAAG,CAAC;KACjD,CAAC,CAAC;IACH,MAAM,CAAC,GAAG,IAAA,mBAAQ,EAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE;QAC/B,GAAG,IAAI;QACP,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;KAC3D,CAAC,CAAC;IAEH,OAAO;QACL,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAwB,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC;KACnE,CAAC;AACJ,CAAC,CAAC;AAtBW,QAAA,gBAAgB,oBAsB3B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { parseDef } from "../parseDef.mjs";
|
|
2
|
+
export const parsePipelineDef = (def, refs) => {
|
|
3
|
+
if (refs.pipeStrategy === 'input') {
|
|
4
|
+
return parseDef(def.in._def, refs);
|
|
5
|
+
}
|
|
6
|
+
else if (refs.pipeStrategy === 'output') {
|
|
7
|
+
return parseDef(def.out._def, refs);
|
|
8
|
+
}
|
|
9
|
+
const a = parseDef(def.in._def, {
|
|
10
|
+
...refs,
|
|
11
|
+
currentPath: [...refs.currentPath, 'allOf', '0'],
|
|
12
|
+
});
|
|
13
|
+
const b = parseDef(def.out._def, {
|
|
14
|
+
...refs,
|
|
15
|
+
currentPath: [...refs.currentPath, 'allOf', a ? '1' : '0'],
|
|
16
|
+
});
|
|
17
|
+
return {
|
|
18
|
+
allOf: [a, b].filter((x) => x !== undefined),
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=pipeline.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline.mjs","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/pipeline.ts"],"names":[],"mappings":"OACO,EAAmB,QAAQ,EAAE;AAIpC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,GAA6B,EAC7B,IAAU,EAC0C,EAAE;IACtD,IAAI,IAAI,CAAC,YAA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
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parsePromiseDef = void 0;
|
|
4
|
+
const parseDef_1 = require("../parseDef.js");
|
|
5
|
+
function parsePromiseDef(def, refs) {
|
|
6
|
+
return (0, parseDef_1.parseDef)(def.type._def, refs);
|
|
7
|
+
}
|
|
8
|
+
exports.parsePromiseDef = parsePromiseDef;
|
|
9
|
+
//# sourceMappingURL=promise.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promise.js","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/promise.ts"],"names":[],"mappings":";;;AACA,6CAAwD;AAGxD,SAAgB,eAAe,CAAC,GAAkB,EAAE,IAAU;IAC5D,OAAO,IAAA,mBAAQ,EAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACvC,CAAC;AAFD,0CAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promise.mjs","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/promise.ts"],"names":[],"mappings":"OACO,EAAmB,QAAQ,EAAE;AAGpC,MAAM,UAAU,eAAe,CAAC,GAAkB,EAAE,IAAU;IAC5D,OAAO,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACvC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readonly.d.ts","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/readonly.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAErC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,eAAO,MAAM,gBAAgB,QAAS,eAAe,GAAG,CAAC,QAAQ,IAAI,sDAEpE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseReadonlyDef = void 0;
|
|
4
|
+
const parseDef_1 = require("../parseDef.js");
|
|
5
|
+
const parseReadonlyDef = (def, refs) => {
|
|
6
|
+
return (0, parseDef_1.parseDef)(def.innerType._def, refs);
|
|
7
|
+
};
|
|
8
|
+
exports.parseReadonlyDef = parseReadonlyDef;
|
|
9
|
+
//# sourceMappingURL=readonly.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readonly.js","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/readonly.ts"],"names":[],"mappings":";;;AACA,6CAAuC;AAGhC,MAAM,gBAAgB,GAAG,CAAC,GAAwB,EAAE,IAAU,EAAE,EAAE;IACvE,OAAO,IAAA,mBAAQ,EAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAC5C,CAAC,CAAC;AAFW,QAAA,gBAAgB,oBAE3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readonly.mjs","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/readonly.ts"],"names":[],"mappings":"OACO,EAAE,QAAQ,EAAE;AAGnB,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,GAAwB,EAAE,IAAU,EAAE,EAAE;IACvE,OAAO,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAC5C,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ZodMapDef, ZodRecordDef, ZodTypeAny } from 'zod';
|
|
2
|
+
import { JsonSchema7Type } from "../parseDef.js";
|
|
3
|
+
import { Refs } from "../Refs.js";
|
|
4
|
+
import { JsonSchema7EnumType } from "./enum.js";
|
|
5
|
+
import { JsonSchema7StringType } from "./string.js";
|
|
6
|
+
type JsonSchema7RecordPropertyNamesType = Omit<JsonSchema7StringType, 'type'> | Omit<JsonSchema7EnumType, 'type'>;
|
|
7
|
+
export type JsonSchema7RecordType = {
|
|
8
|
+
type: 'object';
|
|
9
|
+
additionalProperties: JsonSchema7Type;
|
|
10
|
+
propertyNames?: JsonSchema7RecordPropertyNamesType;
|
|
11
|
+
};
|
|
12
|
+
export declare function parseRecordDef(def: ZodRecordDef<ZodTypeAny, ZodTypeAny> | ZodMapDef, refs: Refs): JsonSchema7RecordType;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=record.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/record.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjF,OAAO,EAAE,eAAe,EAAY,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAE7C,OAAO,EAAE,qBAAqB,EAAkB,MAAM,UAAU,CAAC;AAEjE,KAAK,kCAAkC,GACnC,IAAI,CAAC,qBAAqB,EAAE,MAAM,CAAC,GACnC,IAAI,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC;AAEtC,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,QAAQ,CAAC;IACf,oBAAoB,EAAE,eAAe,CAAC;IACtC,aAAa,CAAC,EAAE,kCAAkC,CAAC;CACpD,CAAC;AAEF,wBAAgB,cAAc,CAC5B,GAAG,EAAE,YAAY,CAAC,UAAU,EAAE,UAAU,CAAC,GAAG,SAAS,EACrD,IAAI,EAAE,IAAI,GACT,qBAAqB,CAoDvB"}
|