structured-outputs 0.1.0-beta.2 → 0.1.0-beta.20
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +77 -6
- package/esm/ResponseFormat.js +33 -5
- package/esm/ResponseFormat.js.map +1 -1
- package/esm/Tool.js +17 -0
- package/esm/Tool.js.map +1 -0
- package/esm/_dnt.polyfills.js +16 -0
- package/esm/_dnt.polyfills.js.map +1 -0
- package/esm/_dnt.shims.js +58 -0
- package/esm/_dnt.shims.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/almost_equals.js +47 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/almost_equals.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/array_includes.js +47 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/array_includes.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/assert.js +23 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/assert.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/assertion_error.js +31 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/assertion_error.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/equal.js +184 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/equal.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/equals.js +46 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/equals.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/exists.js +28 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/exists.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/fail.js +21 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/fail.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/false.js +23 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/false.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/greater.js +30 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/greater.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.js +30 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/instance_of.js +53 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/instance_of.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/is_error.js +54 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/is_error.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/less.js +29 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/less.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/less_or_equal.js +30 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/less_or_equal.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/match.js +27 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/match.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/mod.js +46 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/mod.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_equals.js +33 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_equals.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_instance_of.js +30 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_instance_of.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_match.js +27 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_match.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.js +33 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/object_match.js +160 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/object_match.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/rejects.js +54 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/rejects.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/strict_equals.js +58 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/strict_equals.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/string_includes.js +27 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/string_includes.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/throws.js +45 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/throws.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/unimplemented.js +21 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/unimplemented.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/unreachable.js +21 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/unreachable.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/_utils.js +19 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/_utils.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/aggregate_groups.js +51 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/aggregate_groups.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/associate_by.js +45 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/associate_by.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/associate_with.js +41 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/associate_with.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/chunk.js +51 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/chunk.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/deep_merge.js +96 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/deep_merge.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/distinct.js +28 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/distinct.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/distinct_by.js +39 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/distinct_by.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/drop_last_while.js +33 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/drop_last_while.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/drop_while.js +34 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/drop_while.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/filter_entries.js +43 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/filter_entries.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/filter_keys.js +46 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/filter_keys.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/filter_values.js +46 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/filter_values.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/find_single.js +45 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/find_single.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/first_not_nullish_of.js +42 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/first_not_nullish_of.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/includes_value.js +39 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/includes_value.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/intersect.js +36 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/intersect.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/invert.js +29 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/invert.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/invert_by.js +46 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/invert_by.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/join_to_string.js +59 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/join_to_string.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/map_entries.js +47 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/map_entries.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/map_keys.js +42 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/map_keys.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/map_not_nullish.js +43 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/map_not_nullish.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/map_values.js +13 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/map_values.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/max_by.js +15 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/max_by.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/max_of.js +17 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/max_of.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/max_with.js +41 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/max_with.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/min_by.js +15 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/min_by.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/min_of.js +17 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/min_of.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/min_with.js +37 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/min_with.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/mod.js +75 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/mod.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/omit.js +29 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/omit.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/partition.js +16 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/partition.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/partition_entries.js +54 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/partition_entries.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/permutations.js +58 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/permutations.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/pick.js +33 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/pick.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/reduce_groups.js +40 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/reduce_groups.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/running_reduce.js +32 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/running_reduce.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/sample.js +35 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/sample.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/sliding_windows.js +57 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/sliding_windows.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/sort_by.js +30 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/sort_by.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/sum_of.js +37 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/sum_of.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/take_last_while.js +34 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/take_last_while.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/take_while.js +39 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/take_while.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/union.js +34 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/union.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/unzip.js +46 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/unzip.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/without_all.js +28 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/without_all.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/zip.js +43 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/zip.js.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.js +111 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.js.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff.js +277 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff.js.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.js +180 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.js.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/format.js +38 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/format.js.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/styles.js +208 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/styles.js.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/types.js +3 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/types.js.map +1 -0
- package/esm/mod.js +3 -10
- package/esm/mod.js.map +1 -1
- package/esm/types/Ref.js +11 -0
- package/esm/types/Ref.js.map +1 -0
- package/esm/types/RootTy.js +19 -0
- package/esm/types/RootTy.js.map +1 -0
- package/esm/types/Ty.js +17 -0
- package/esm/types/Ty.js.map +1 -0
- package/esm/types/array.js +9 -0
- package/esm/types/array.js.map +1 -0
- package/esm/types/constant.js +8 -0
- package/esm/types/constant.js.map +1 -0
- package/esm/types/constantUnion.js +25 -0
- package/esm/types/constantUnion.js.map +1 -0
- package/esm/types/leaves.js +18 -0
- package/esm/types/leaves.js.map +1 -0
- package/esm/types/mod.js +11 -0
- package/esm/types/mod.js.map +1 -0
- package/esm/{object.js → types/object.js} +4 -4
- package/esm/types/object.js.map +1 -0
- package/esm/types/std/Option.js +9 -0
- package/esm/types/std/Option.js.map +1 -0
- package/esm/types/std/Wrapper.js +5 -0
- package/esm/types/std/Wrapper.js.map +1 -0
- package/esm/types/std/mod.js +3 -0
- package/esm/types/std/mod.js.map +1 -0
- package/esm/types/taggedUnion.js +20 -0
- package/esm/types/taggedUnion.js.map +1 -0
- package/esm/util/phantoms.js +4 -0
- package/esm/util/phantoms.js.map +1 -0
- package/esm/util/recombineTaggedTemplateArgs.js +4 -0
- package/esm/util/recombineTaggedTemplateArgs.js.map +1 -0
- package/package.json +10 -7
- package/src/ResponseFormat.ts +76 -25
- package/src/Tool.ts +38 -0
- package/src/_dnt.polyfills.ts +27 -0
- package/src/_dnt.shims.ts +60 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/almost_equals.ts +55 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/array_includes.ts +57 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/assert.ts +23 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/assertion_error.ts +31 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/equal.ts +210 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/equals.ts +52 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/exists.ts +31 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/fail.ts +21 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/false.ts +26 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/greater.ts +30 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.ts +36 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/instance_of.ts +64 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/is_error.ts +65 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/less.ts +29 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/less_or_equal.ts +36 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/match.ts +30 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/mod.ts +47 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/not_equals.ts +36 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/not_instance_of.ts +33 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/not_match.ts +30 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.ts +42 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/object_match.ts +202 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/rejects.ts +123 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/strict_equals.ts +67 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/string_includes.ts +30 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/throws.ts +111 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/unimplemented.ts +21 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/unreachable.ts +21 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/_utils.ts +26 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/aggregate_groups.ts +62 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/associate_by.ts +50 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/associate_with.ts +46 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/chunk.ts +56 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/deep_merge.ts +578 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/distinct.ts +29 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/distinct_by.ts +42 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/drop_last_while.ts +36 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/drop_while.ts +39 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/filter_entries.ts +48 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/filter_keys.ts +51 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/filter_values.ts +51 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/find_single.ts +48 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/first_not_nullish_of.ts +47 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/includes_value.ts +45 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/intersect.ts +35 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/invert.ts +38 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/invert_by.ts +56 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/join_to_string.ts +109 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/map_entries.ts +53 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/map_keys.ts +47 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/map_not_nullish.ts +49 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/map_values.ts +96 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/max_by.ts +153 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/max_of.ts +90 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/max_with.ts +46 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/min_by.ts +151 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/min_of.ts +90 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/min_with.ts +42 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/mod.ts +76 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/omit.ts +34 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/partition.ts +85 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/partition_entries.ts +58 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/permutations.ts +66 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/pick.ts +34 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/reduce_groups.ts +45 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/running_reduce.ts +38 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/sample.ts +36 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/sliding_windows.ts +86 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/sort_by.ts +219 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/sum_of.ts +42 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/take_last_while.ts +37 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/take_while.ts +44 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/union.ts +36 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/unzip.ts +50 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/without_all.ts +28 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/zip.ts +49 -0
- package/src/deps/jsr.io/@std/internal/1.0.5/build_message.ts +134 -0
- package/src/deps/jsr.io/@std/internal/1.0.5/diff.ts +317 -0
- package/src/deps/jsr.io/@std/internal/1.0.5/diff_str.ts +204 -0
- package/src/deps/jsr.io/@std/internal/1.0.5/format.ts +39 -0
- package/src/deps/jsr.io/@std/internal/1.0.5/styles.ts +233 -0
- package/src/deps/jsr.io/@std/internal/1.0.5/types.ts +18 -0
- package/src/mod.ts +3 -18
- package/src/types/Ref.ts +16 -0
- package/src/types/RootTy.ts +40 -0
- package/src/types/Ty.ts +57 -0
- package/src/types/array.ts +9 -0
- package/src/types/constant.ts +8 -0
- package/src/types/constantUnion.ts +27 -0
- package/src/types/leaves.ts +21 -0
- package/src/types/mod.ts +10 -0
- package/src/types/object.ts +15 -0
- package/src/types/std/Option.ts +15 -0
- package/src/types/std/Wrapper.ts +8 -0
- package/src/types/std/mod.ts +2 -0
- package/src/types/taggedUnion.ts +28 -0
- package/src/util/phantoms.ts +3 -0
- package/src/util/recombineTaggedTemplateArgs.ts +6 -0
- package/types/ResponseFormat.d.ts +26 -0
- package/types/ResponseFormat.d.ts.map +1 -0
- package/types/Tool.d.ts +13 -0
- package/types/Tool.d.ts.map +1 -0
- package/types/_dnt.polyfills.d.ts +12 -0
- package/types/_dnt.polyfills.d.ts.map +1 -0
- package/types/_dnt.shims.d.ts +2 -0
- package/types/_dnt.shims.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/almost_equals.d.ts +29 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/almost_equals.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/array_includes.d.ts +24 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/array_includes.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/assert.d.ts +16 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/assert.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/assertion_error.d.ts +26 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/assertion_error.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/equal.d.ts +17 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/equal.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/equals.d.ts +22 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/equals.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/exists.d.ts +18 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/exists.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/fail.d.ts +15 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/fail.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/false.d.ts +18 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/false.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/greater.d.ts +20 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/greater.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.d.ts +20 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/instance_of.d.ts +23 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/instance_of.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/is_error.d.ts +25 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/is_error.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/less.d.ts +19 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/less.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/less_or_equal.d.ts +20 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/less_or_equal.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/match.d.ts +18 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/match.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/mod.d.ts +44 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/mod.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/not_equals.d.ts +21 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/not_equals.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/not_instance_of.d.ts +20 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/not_instance_of.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/not_match.d.ts +18 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/not_match.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.d.ts +23 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/object_match.d.ts +28 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/object_match.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/rejects.d.ts +42 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/rejects.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/strict_equals.d.ts +24 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/strict_equals.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/string_includes.d.ts +18 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/string_includes.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/throws.d.ts +45 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/throws.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/unimplemented.d.ts +15 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/unimplemented.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/unreachable.d.ts +15 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/unreachable.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/_utils.d.ts +6 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/_utils.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/aggregate_groups.d.ts +41 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/aggregate_groups.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/associate_by.d.ts +37 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/associate_by.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/associate_with.d.ts +33 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/associate_with.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/chunk.d.ts +38 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/chunk.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/deep_merge.d.ts +322 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/deep_merge.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/distinct.d.ts +23 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/distinct.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/distinct_by.d.ts +26 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/distinct_by.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/drop_last_while.d.ts +26 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/drop_last_while.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/drop_while.d.ts +25 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/drop_while.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/filter_entries.d.ts +32 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/filter_entries.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/filter_keys.d.ts +36 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/filter_keys.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/filter_values.d.ts +35 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/filter_values.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/find_single.d.ts +31 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/find_single.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/first_not_nullish_of.d.ts +32 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/first_not_nullish_of.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/includes_value.d.ts +29 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/includes_value.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/intersect.d.ts +25 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/intersect.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/invert.d.ts +29 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/invert.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/invert_by.d.ts +34 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/invert_by.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/join_to_string.d.ts +75 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/join_to_string.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/map_entries.d.ts +37 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/map_entries.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/map_keys.d.ts +33 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/map_keys.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/map_not_nullish.d.ts +32 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/map_not_nullish.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/map_values.d.ts +71 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/map_values.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/max_by.d.ts +117 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/max_by.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/max_of.d.ts +61 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/max_of.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/max_with.d.ts +29 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/max_with.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/min_by.d.ts +115 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/min_by.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/min_of.d.ts +61 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/min_of.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/min_with.d.ts +25 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/min_with.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/mod.d.ts +73 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/mod.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/omit.d.ts +24 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/omit.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/partition.d.ts +60 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/partition.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/partition_entries.d.ts +39 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/partition_entries.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/permutations.d.ts +27 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/permutations.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/pick.d.ts +25 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/pick.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/reduce_groups.d.ts +35 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/reduce_groups.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/running_reduce.d.ts +27 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/running_reduce.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/sample.d.ts +24 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/sample.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/sliding_windows.d.ts +66 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/sliding_windows.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/sort_by.d.ts +161 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/sort_by.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/sum_of.d.ts +29 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/sum_of.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/take_last_while.d.ts +27 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/take_last_while.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/take_while.d.ts +30 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/take_while.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/union.d.ts +24 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/union.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/unzip.d.ts +32 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/unzip.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/without_all.d.ts +23 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/without_all.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/zip.d.ts +34 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/zip.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts +82 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/diff.d.ts +140 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts +99 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/format.d.ts +2 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/styles.d.ts +159 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/types.d.ts +16 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +1 -0
- package/types/mod.d.ts +5 -0
- package/types/mod.d.ts.map +1 -0
- package/types/types/Ref.d.ts +4 -0
- package/types/types/Ref.d.ts.map +1 -0
- package/types/types/RootTy.d.ts +8 -0
- package/types/types/RootTy.d.ts.map +1 -0
- package/types/types/Ty.d.ts +27 -0
- package/types/types/Ty.d.ts.map +1 -0
- package/types/types/array.d.ts +3 -0
- package/types/types/array.d.ts.map +1 -0
- package/types/types/constant.d.ts +3 -0
- package/types/types/constant.d.ts.map +1 -0
- package/types/types/constantUnion.d.ts +3 -0
- package/types/types/constantUnion.d.ts.map +1 -0
- package/types/types/leaves.d.ts +6 -0
- package/types/types/leaves.d.ts.map +1 -0
- package/types/types/mod.d.ts +11 -0
- package/types/types/mod.d.ts.map +1 -0
- package/types/types/object.d.ts +6 -0
- package/types/types/object.d.ts.map +1 -0
- package/types/types/std/Option.d.ts +7 -0
- package/types/types/std/Option.d.ts.map +1 -0
- package/types/types/std/Wrapper.d.ts +7 -0
- package/types/types/std/Wrapper.d.ts.map +1 -0
- package/types/types/std/mod.d.ts +3 -0
- package/types/types/std/mod.d.ts.map +1 -0
- package/types/types/taggedUnion.d.ts +8 -0
- package/types/types/taggedUnion.d.ts.map +1 -0
- package/types/util/phantoms.d.ts +2 -0
- package/types/util/phantoms.d.ts.map +1 -0
- package/types/util/recombineTaggedTemplateArgs.d.ts +2 -0
- package/types/util/recombineTaggedTemplateArgs.d.ts.map +1 -0
- package/esm/F.d.ts +0 -13
- package/esm/F.d.ts.map +0 -1
- package/esm/F.js +0 -10
- package/esm/F.js.map +0 -1
- package/esm/ResponseFormat.d.ts +0 -14
- package/esm/ResponseFormat.d.ts.map +0 -1
- package/esm/_base.d.ts +0 -13
- package/esm/_base.d.ts.map +0 -1
- package/esm/_base.js +0 -40
- package/esm/_base.js.map +0 -1
- package/esm/array.d.ts +0 -4
- package/esm/array.d.ts.map +0 -1
- package/esm/array.js +0 -9
- package/esm/array.js.map +0 -1
- package/esm/common.d.ts +0 -6
- package/esm/common.d.ts.map +0 -1
- package/esm/common.js +0 -2
- package/esm/common.js.map +0 -1
- package/esm/literal.d.ts +0 -4
- package/esm/literal.d.ts.map +0 -1
- package/esm/literal.js +0 -8
- package/esm/literal.js.map +0 -1
- package/esm/mod.d.ts +0 -16
- package/esm/mod.d.ts.map +0 -1
- package/esm/number.d.ts +0 -4
- package/esm/number.d.ts.map +0 -1
- package/esm/number.js +0 -8
- package/esm/number.js.map +0 -1
- package/esm/object.d.ts +0 -7
- package/esm/object.d.ts.map +0 -1
- package/esm/object.js.map +0 -1
- package/esm/schema.d.ts +0 -4
- package/esm/schema.d.ts.map +0 -1
- package/esm/schema.js +0 -9
- package/esm/schema.js.map +0 -1
- package/esm/string.d.ts +0 -4
- package/esm/string.d.ts.map +0 -1
- package/esm/string.js +0 -8
- package/esm/string.js.map +0 -1
- package/esm/union.d.ts +0 -6
- package/esm/union.d.ts.map +0 -1
- package/esm/union.js +0 -8
- package/esm/union.js.map +0 -1
- package/src/F.ts +0 -27
- package/src/_base.ts +0 -25
- package/src/array.ts +0 -11
- package/src/common.ts +0 -6
- package/src/literal.ts +0 -10
- package/src/number.ts +0 -10
- package/src/object.ts +0 -17
- package/src/schema.ts +0 -10
- package/src/string.ts +0 -10
- package/src/union.ts +0 -12
@@ -0,0 +1,27 @@
|
|
1
|
+
import type { Ref } from "./Ref.js";
|
2
|
+
import type { RootTy } from "./RootTy.js";
|
3
|
+
export declare function Ty<T, P extends string = never>(toSchema: ToSchema, descriptions?: Array<Description>, applied?: Applied): Ty<T, P>;
|
4
|
+
export interface Ty<T = any, P extends string = string> {
|
5
|
+
<P2 extends Array<string>>(template: TemplateStringsArray, ...placeheld: P2): Ty<T, P | P2[number]>;
|
6
|
+
[Ty.T]: T;
|
7
|
+
[Ty.P]: P;
|
8
|
+
toSchema: ToSchema;
|
9
|
+
descriptions: Array<Description>;
|
10
|
+
applied: Applied;
|
11
|
+
apply: <A extends Partial<Record<P, number | string>>>(values: A) => Ty<T, Exclude<P, keyof A>>;
|
12
|
+
isRoot(): this is RootTy;
|
13
|
+
}
|
14
|
+
export declare namespace Ty {
|
15
|
+
type T = typeof T;
|
16
|
+
const T: unique symbol;
|
17
|
+
type P = typeof P;
|
18
|
+
const P: unique symbol;
|
19
|
+
}
|
20
|
+
export type ToSchema = (description: string | undefined, ref: Ref) => Schema;
|
21
|
+
export type Schema = Record<string, unknown>;
|
22
|
+
export interface Description {
|
23
|
+
template: TemplateStringsArray;
|
24
|
+
placeheld: Array<string>;
|
25
|
+
}
|
26
|
+
export type Applied = Record<string, number | string>;
|
27
|
+
//# sourceMappingURL=Ty.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Ty.d.ts","sourceRoot":"","sources":["../../src/types/Ty.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAEnC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEzC,wBAAgB,EAAE,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,KAAK,EAC5C,QAAQ,EAAE,QAAQ,EAClB,YAAY,GAAE,KAAK,CAAC,WAAW,CAAM,EACrC,OAAO,GAAE,OAAY,GACpB,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAiBV;AAED,MAAM,WAAW,EAAE,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM;IACpD,CAAC,EAAE,SAAS,KAAK,CAAC,MAAM,CAAC,EACvB,QAAQ,EAAE,oBAAoB,EAC9B,GAAG,SAAS,EAAE,EAAE,GACf,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;IACxB,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;IACT,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;IACT,QAAQ,EAAE,QAAQ,CAAA;IAClB,YAAY,EAAE,KAAK,CAAC,WAAW,CAAC,CAAA;IAChC,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,CAAC,CAAC,SAAS,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;IAC/F,MAAM,IAAI,IAAI,IAAI,MAAM,CAAA;CACzB;AAED,yBAAiB,EAAE,CAAC;IAClB,KAAY,CAAC,GAAG,OAAO,CAAC,CAAA;IACT,MAAM,CAAC,EAAE,OAAO,MAAM,CAAA;IACrC,KAAY,CAAC,GAAG,OAAO,CAAC,CAAA;IACT,MAAM,CAAC,EAAE,OAAO,MAAM,CAAA;CACtC;AAED,MAAM,MAAM,QAAQ,GAAG,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,EAAE,GAAG,KAAK,MAAM,CAAA;AAC5E,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAE5C,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,oBAAoB,CAAA;IAC9B,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;CACzB;AAED,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../src/types/array.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAE5B,wBAAgB,KAAK,CAAC,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAM3E"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constant.d.ts","sourceRoot":"","sources":["../../src/types/constant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAE5B,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,CAK1E"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constantUnion.d.ts","sourceRoot":"","sources":["../../src/types/constantUnion.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAE5B,wBAAgB,aAAa,CAAC,CAAC,SAAS,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,EAC5D,GAAG,OAAO,EAAE,CAAC,GACZ,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,CAqBtB"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"leaves.d.ts","sourceRoot":"","sources":["../../src/types/leaves.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAE5B,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,KAAK,CAG9B,CAAA;AAEH,eAAO,MAAM,OAAO,EAAE,EAAE,CAAC,OAAO,EAAE,KAAK,CAGpC,CAAA;AAEH,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,KAAK,CAGlC,CAAA;AAEH,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,KAAK,CAGlC,CAAA"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
export * from "./array.js";
|
2
|
+
export * from "./leaves.js";
|
3
|
+
export * from "./constant.js";
|
4
|
+
export * from "./constantUnion.js";
|
5
|
+
export * from "./std/mod.js";
|
6
|
+
export * from "./object.js";
|
7
|
+
export * from "./Ref.js";
|
8
|
+
export * from "./taggedUnion.js";
|
9
|
+
export * from "./Ty.js";
|
10
|
+
export * from "./RootTy.js";
|
11
|
+
//# sourceMappingURL=mod.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/types/mod.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA;AACxB,cAAc,kBAAkB,CAAA;AAChC,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../src/types/object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAEjC,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,MAAM,CACrE;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAAE,EAC9B,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CACjB,CAQA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Option.d.ts","sourceRoot":"","sources":["../../../src/types/std/Option.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAA;AAElC,wBAAgB,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,CAAC,GAAG,UAAU,CACvD,OAAO,WAAW,CAAC;IACjB,IAAI,EAAE,CAAC,CAAA;IACP,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;CACtB,CAAC,CACH,CAKA"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import type { Ty } from "../mod.js";
|
2
|
+
import { object } from "../object.js";
|
3
|
+
export type Wrapper<X extends Ty = Ty> = ReturnType<typeof Wrapper<X>>;
|
4
|
+
export declare function Wrapper<X extends Ty>(value: X): ReturnType<typeof object<{
|
5
|
+
value: X;
|
6
|
+
}>>;
|
7
|
+
//# sourceMappingURL=Wrapper.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Wrapper.d.ts","sourceRoot":"","sources":["../../../src/types/std/Wrapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAErC,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC,CAAA;AAEtE,wBAAgB,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,CAAC,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC;IAAE,KAAK,EAAE,CAAC,CAAA;CAAE,CAAC,CAAC,CAEvF"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../src/types/std/mod.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"taggedUnion.d.ts","sourceRoot":"","sources":["../../src/types/taggedUnion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAE5B,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,EAAE,CACvE;KACG,CAAC,IAAI,MAAM,CAAC,GAAG;QACd,IAAI,EAAE,CAAC,CAAA;QACP,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;KAClB;CACF,CAAC,MAAM,CAAC,CAAC,EACV,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CACjB,CAiBA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"phantoms.d.ts","sourceRoot":"","sources":["../../src/util/phantoms.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,CAAC,KAAK,CAAC,CAE/B"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"recombineTaggedTemplateArgs.d.ts","sourceRoot":"","sources":["../../src/util/recombineTaggedTemplateArgs.ts"],"names":[],"mappings":"AAAA,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,oBAAoB,EAC7B,MAAM,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,GAC7B,MAAM,CAER"}
|
package/esm/F.d.ts
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
import type { Ty } from "./_base.js";
|
2
|
-
import type { ValidRootKey } from "./common.js";
|
3
|
-
export type F = {
|
4
|
-
type: "function";
|
5
|
-
/** The name of the function. */
|
6
|
-
name: string;
|
7
|
-
/** The description of the function. */
|
8
|
-
description: string;
|
9
|
-
/** Parameters of the function in JSON Schema. */
|
10
|
-
parameters: unknown;
|
11
|
-
};
|
12
|
-
export declare function F<M extends Record<string, Ty>>(name: string, description: string, models: M, rootKey: ValidRootKey<M>): F;
|
13
|
-
//# sourceMappingURL=F.d.ts.map
|
package/esm/F.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"F.d.ts","sourceRoot":"","sources":["../src/F.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAG/C,MAAM,MAAM,CAAC,GAAG;IACd,IAAI,EAAE,UAAU,CAAA;IAChB,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,uCAAuC;IACvC,WAAW,EAAE,MAAM,CAAA;IACnB,iDAAiD;IACjD,UAAU,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,wBAAgB,CAAC,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,EAC5C,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,CAAC,EACT,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,GACvB,CAAC,CAOH"}
|
package/esm/F.js
DELETED
package/esm/F.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"F.js","sourceRoot":"","sources":["../src/F.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAYpC,MAAM,UAAU,CAAC,CACf,IAAY,EACZ,WAAmB,EACnB,MAAS,EACT,OAAwB;IAExB,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,IAAI;QACJ,WAAW;QACX,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;KACpC,CAAA;AACH,CAAC"}
|
package/esm/ResponseFormat.d.ts
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
import type { Ty } from "./_base.js";
|
2
|
-
import type { ValidRootKey } from "./common.js";
|
3
|
-
export type ResponseFormat = {
|
4
|
-
type: "json_schema";
|
5
|
-
/** The desired return type in JSON Schema. */
|
6
|
-
json_schema: {
|
7
|
-
name: string;
|
8
|
-
description: string;
|
9
|
-
schema: Record<string, unknown>;
|
10
|
-
strict: true;
|
11
|
-
};
|
12
|
-
};
|
13
|
-
export declare function ResponseFormat<M extends Record<string, Ty>>(name: string, description: string, models: M, rootKey: ValidRootKey<M>): ResponseFormat;
|
14
|
-
//# sourceMappingURL=ResponseFormat.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ResponseFormat.d.ts","sourceRoot":"","sources":["../src/ResponseFormat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAG/C,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,aAAa,CAAA;IACnB,8CAA8C;IAC9C,WAAW,EAAE;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,WAAW,EAAE,MAAM,CAAA;QACnB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;QAC/B,MAAM,EAAE,IAAI,CAAA;KACb,CAAA;CACF,CAAA;AAED,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,EACzD,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,CAAC,EACT,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,GACvB,cAAc,CAUhB"}
|
package/esm/_base.d.ts
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
export interface Ty<N = any> {
|
2
|
-
new (): N;
|
3
|
-
schema(ctx: Context): Record<string, unknown>;
|
4
|
-
}
|
5
|
-
export declare function make<Ty_ extends Ty>(schema: (ctx: Context) => unknown): Ty_;
|
6
|
-
export declare class Context {
|
7
|
-
readonly root: Ty;
|
8
|
-
readonly models?: Record<string, Ty> | undefined;
|
9
|
-
defs: Map<Ty, string>;
|
10
|
-
constructor(root: Ty, models?: Record<string, Ty> | undefined);
|
11
|
-
ref(value: Ty): Record<string, unknown>;
|
12
|
-
}
|
13
|
-
//# sourceMappingURL=_base.d.ts.map
|
package/esm/_base.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"_base.d.ts","sourceRoot":"","sources":["../src/_base.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,EAAE,CAAC,CAAC,GAAG,GAAG;IACzB,QAAO,CAAC,CAAA;IACR,MAAM,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC9C;AAED,wBAAgB,IAAI,CAAC,GAAG,SAAS,EAAE,EAAE,MAAM,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,GAG/D,GAAG,CACT;AAED,qBAAa,OAAO;IAGhB,QAAQ,CAAC,IAAI,EAAE,EAAE;IACjB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC;IAHtC,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAA;gBAEV,IAAI,EAAE,EAAE,EACR,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,YAAA;IAKtC,GAAG,CAAC,KAAK,EAAE,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAIxC"}
|
package/esm/_base.js
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
export function make(schema) {
|
2
|
-
var _a;
|
3
|
-
return _a = class Ty {
|
4
|
-
},
|
5
|
-
Object.defineProperty(_a, "schema", {
|
6
|
-
enumerable: true,
|
7
|
-
configurable: true,
|
8
|
-
writable: true,
|
9
|
-
value: schema
|
10
|
-
}),
|
11
|
-
_a;
|
12
|
-
}
|
13
|
-
export class Context {
|
14
|
-
constructor(root, models) {
|
15
|
-
Object.defineProperty(this, "root", {
|
16
|
-
enumerable: true,
|
17
|
-
configurable: true,
|
18
|
-
writable: true,
|
19
|
-
value: root
|
20
|
-
});
|
21
|
-
Object.defineProperty(this, "models", {
|
22
|
-
enumerable: true,
|
23
|
-
configurable: true,
|
24
|
-
writable: true,
|
25
|
-
value: models
|
26
|
-
});
|
27
|
-
Object.defineProperty(this, "defs", {
|
28
|
-
enumerable: true,
|
29
|
-
configurable: true,
|
30
|
-
writable: true,
|
31
|
-
value: void 0
|
32
|
-
});
|
33
|
-
this.defs = new Map(models ? Object.entries(models).map(([k, v]) => [v, k]) : []);
|
34
|
-
}
|
35
|
-
ref(value) {
|
36
|
-
const key = this.defs.get(value);
|
37
|
-
return key ? { $ref: `#/$defs/${key}` } : value.schema(this);
|
38
|
-
}
|
39
|
-
}
|
40
|
-
//# sourceMappingURL=_base.js.map
|
package/esm/_base.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"_base.js","sourceRoot":"","sources":["../src/_base.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,IAAI,CAAiB,MAAiC;;IACpE,OAAO,KAAA,MAAM,EAAE;SAEd;QADQ;;;;mBAAS,MAAM;UAAA;UAChB,CAAA;AACV,CAAC;AAED,MAAM,OAAO,OAAO;IAElB,YACW,IAAQ,EACR,MAA2B;QADpC;;;;mBAAS,IAAI;WAAI;QACjB;;;;mBAAS,MAAM;WAAqB;QAHtC;;;;;WAAqB;QAKnB,IAAI,CAAC,IAAI,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;IACnF,CAAC;IAED,GAAG,CAAC,KAAS;QACX,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;QAChC,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,WAAW,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IAC9D,CAAC;CACF"}
|
package/esm/array.d.ts
DELETED
package/esm/array.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../src/array.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,EAAE,EAAE,MAAM,YAAY,CAAA;AAE1C,wBAAgB,KAAK,CAAC,CAAC,SAAS,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAM3F;AAED,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,EAAE,GAAG,GAAG,IAAI,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA"}
|
package/esm/array.js
DELETED
package/esm/array.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"array.js","sourceRoot":"","sources":["../src/array.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAW,MAAM,YAAY,CAAA;AAE1C,MAAM,UAAU,KAAK,CAAe,WAA+B,EAAE,OAAU;IAC7E,OAAO,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,OAAO;QACb,WAAW;QACX,KAAK,EAAE,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC;KACxB,CAAC,CAAC,CAAA;AACL,CAAC"}
|
package/esm/common.d.ts
DELETED
package/esm/common.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA;AACpC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAE3C,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,MAAM;KAC5D,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,KAAK;CAClE,CAAA"}
|
package/esm/common.js
DELETED
package/esm/common.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":""}
|
package/esm/literal.d.ts
DELETED
package/esm/literal.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"literal.d.ts","sourceRoot":"","sources":["../src/literal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,EAAE,EAAE,MAAM,YAAY,CAAA;AAE1C,wBAAgB,OAAO,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAK1G;AAED,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA"}
|
package/esm/literal.js
DELETED
package/esm/literal.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"literal.js","sourceRoot":"","sources":["../src/literal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAW,MAAM,YAAY,CAAA;AAE1C,MAAM,UAAU,OAAO,CAA4B,WAA+B,EAAE,KAAQ;IAC1F,OAAO,IAAI,CAAe,GAAG,EAAE,CAAC,CAAC;QAC/B,KAAK,EAAE,KAAK;QACZ,WAAW;KACZ,CAAC,CAAC,CAAA;AACL,CAAC"}
|
package/esm/mod.d.ts
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
import type { ArrayTy } from "./array.js";
|
2
|
-
import type { NumberTy } from "./number.js";
|
3
|
-
import type { ObjectTy } from "./object.js";
|
4
|
-
import type { StringTy } from "./string.js";
|
5
|
-
export type RootTy = NumberTy | StringTy | ObjectTy | ArrayTy;
|
6
|
-
export * from "./array.js";
|
7
|
-
export * from "./common.js";
|
8
|
-
export * from "./F.js";
|
9
|
-
export * from "./literal.js";
|
10
|
-
export * from "./number.js";
|
11
|
-
export * from "./object.js";
|
12
|
-
export * from "./ResponseFormat.js";
|
13
|
-
export * from "./schema.js";
|
14
|
-
export * from "./string.js";
|
15
|
-
export * from "./union.js";
|
16
|
-
//# sourceMappingURL=mod.d.ts.map
|
package/esm/mod.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAE3C,MAAM,MAAM,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAA;AAI7D,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,QAAQ,CAAA;AACtB,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,qBAAqB,CAAA;AACnC,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA"}
|
package/esm/number.d.ts
DELETED
package/esm/number.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../src/number.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,EAAE,EAAE,MAAM,YAAY,CAAA;AAE1C,wBAAgB,MAAM,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,QAAQ,CAKrD;AAED,MAAM,MAAM,QAAQ,GAAG,EAAE,CAAC,MAAM,CAAC,CAAA"}
|
package/esm/number.js
DELETED
package/esm/number.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"number.js","sourceRoot":"","sources":["../src/number.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAW,MAAM,YAAY,CAAA;AAE1C,MAAM,UAAU,MAAM,CAAC,WAAoB;IACzC,OAAO,IAAI,CAAW,GAAG,EAAE,CAAC,CAAC;QAC3B,IAAI,EAAE,QAAQ;QACd,WAAW;KACZ,CAAC,CAAC,CAAA;AACL,CAAC"}
|
package/esm/object.d.ts
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
import { type Ty } from "./_base.js";
|
2
|
-
export declare function object<F extends ObjectTyFields>(description: string | undefined, fields: F): ObjectTy<F>;
|
3
|
-
export type ObjectTyFields = Record<string, Ty>;
|
4
|
-
export type ObjectTy<F extends ObjectTyFields = any> = Ty<{
|
5
|
-
[K in keyof F]: F[K] extends Ty ? InstanceType<F[K]> : F[K];
|
6
|
-
}>;
|
7
|
-
//# sourceMappingURL=object.d.ts.map
|
package/esm/object.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../src/object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,EAAE,EAAE,MAAM,YAAY,CAAA;AAE1C,wBAAgB,MAAM,CAAC,CAAC,SAAS,cAAc,EAAE,WAAW,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAQxG;AAED,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;AAE/C,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,cAAc,GAAG,GAAG,IAAI,EAAE,CACvD;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,CAChE,CAAA"}
|
package/esm/object.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"object.js","sourceRoot":"","sources":["../src/object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAW,MAAM,YAAY,CAAA;AAE1C,MAAM,UAAU,MAAM,CAA2B,WAA+B,EAAE,MAAS;IACzF,OAAO,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,QAAQ;QACd,WAAW;QACX,UAAU,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACvF,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;KAC9B,CAAC,CAAC,CAAA;AACL,CAAC"}
|
package/esm/schema.d.ts
DELETED
package/esm/schema.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,EAAE,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/C,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAMjH"}
|
package/esm/schema.js
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
import { Context } from "./_base.js";
|
2
|
-
export function schema(models, rootKey) {
|
3
|
-
const root = models[rootKey];
|
4
|
-
const ctx = new Context(root, models);
|
5
|
-
return Object.assign(root.schema(ctx), {
|
6
|
-
$defs: Object.fromEntries(Object.entries(models).map(([k, v]) => [k, v.schema(ctx)])),
|
7
|
-
});
|
8
|
-
}
|
9
|
-
//# sourceMappingURL=schema.js.map
|
package/esm/schema.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAW,MAAM,YAAY,CAAA;AAG7C,MAAM,UAAU,MAAM,CAA+B,MAAS,EAAE,OAAwB;IACtF,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAE,CAAA;IAC7B,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;IACrC,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;QACrC,KAAK,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;KACtF,CAAC,CAAA;AACJ,CAAC"}
|
package/esm/string.d.ts
DELETED
package/esm/string.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../src/string.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,EAAE,EAAE,MAAM,YAAY,CAAA;AAE1C,wBAAgB,MAAM,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,QAAQ,CAKrD;AAED,MAAM,MAAM,QAAQ,GAAG,EAAE,CAAC,MAAM,CAAC,CAAA"}
|
package/esm/string.js
DELETED
package/esm/string.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"string.js","sourceRoot":"","sources":["../src/string.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAW,MAAM,YAAY,CAAA;AAE1C,MAAM,UAAU,MAAM,CAAC,WAAoB;IACzC,OAAO,IAAI,CAAW,GAAG,EAAE,CAAC,CAAC;QAC3B,IAAI,EAAE,QAAQ;QACd,WAAW;KACZ,CAAC,CAAC,CAAA;AACL,CAAC"}
|
package/esm/union.d.ts
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
import { type Ty } from "./_base.js";
|
2
|
-
export declare function union<M extends Ty[]>(description: string | undefined, members: [...M]): UnionTy<M>;
|
3
|
-
export type UnionTy<M extends Ty[]> = Ty<{
|
4
|
-
[K in keyof M]: M[K] extends Ty ? InstanceType<M[K]> : M[K];
|
5
|
-
}[number]>;
|
6
|
-
//# sourceMappingURL=union.d.ts.map
|
package/esm/union.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"union.d.ts","sourceRoot":"","sources":["../src/union.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,EAAE,EAAE,MAAM,YAAY,CAAA;AAE1C,wBAAgB,KAAK,CAAC,CAAC,SAAS,EAAE,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAKlG;AAED,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,CACtC;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC,MAAM,CAAC,CACxE,CAAA"}
|
package/esm/union.js
DELETED
package/esm/union.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"union.js","sourceRoot":"","sources":["../src/union.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAW,MAAM,YAAY,CAAA;AAE1C,MAAM,UAAU,KAAK,CAAiB,WAA+B,EAAE,OAAe;IACpF,OAAO,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QACpB,WAAW;QACX,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;KAChD,CAAC,CAAC,CAAA;AACL,CAAC"}
|
package/src/F.ts
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
import type { Ty } from "./_base.js"
|
2
|
-
import type { ValidRootKey } from "./common.js"
|
3
|
-
import { schema } from "./schema.js"
|
4
|
-
|
5
|
-
export type F = {
|
6
|
-
type: "function"
|
7
|
-
/** The name of the function. */
|
8
|
-
name: string
|
9
|
-
/** The description of the function. */
|
10
|
-
description: string
|
11
|
-
/** Parameters of the function in JSON Schema. */
|
12
|
-
parameters: unknown
|
13
|
-
}
|
14
|
-
|
15
|
-
export function F<M extends Record<string, Ty>>(
|
16
|
-
name: string,
|
17
|
-
description: string,
|
18
|
-
models: M,
|
19
|
-
rootKey: ValidRootKey<M>,
|
20
|
-
): F {
|
21
|
-
return {
|
22
|
-
type: "function",
|
23
|
-
name,
|
24
|
-
description,
|
25
|
-
parameters: schema(models, rootKey),
|
26
|
-
}
|
27
|
-
}
|
package/src/_base.ts
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
export interface Ty<N = any> {
|
2
|
-
new(): N
|
3
|
-
schema(ctx: Context): Record<string, unknown>
|
4
|
-
}
|
5
|
-
|
6
|
-
export function make<Ty_ extends Ty>(schema: (ctx: Context) => unknown) {
|
7
|
-
return class Ty {
|
8
|
-
static schema = schema
|
9
|
-
} as Ty_
|
10
|
-
}
|
11
|
-
|
12
|
-
export class Context {
|
13
|
-
defs: Map<Ty, string>
|
14
|
-
constructor(
|
15
|
-
readonly root: Ty,
|
16
|
-
readonly models?: Record<string, Ty>,
|
17
|
-
) {
|
18
|
-
this.defs = new Map(models ? Object.entries(models).map(([k, v]) => [v, k]) : [])
|
19
|
-
}
|
20
|
-
|
21
|
-
ref(value: Ty): Record<string, unknown> {
|
22
|
-
const key = this.defs.get(value)
|
23
|
-
return key ? { $ref: `#/$defs/${key}` } : value.schema(this)
|
24
|
-
}
|
25
|
-
}
|
package/src/array.ts
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
import { make, type Ty } from "./_base.js"
|
2
|
-
|
3
|
-
export function array<E extends Ty>(description: string | undefined, element: E): ArrayTy<E> {
|
4
|
-
return make((ctx) => ({
|
5
|
-
type: "array",
|
6
|
-
description,
|
7
|
-
items: ctx.ref(element),
|
8
|
-
}))
|
9
|
-
}
|
10
|
-
|
11
|
-
export type ArrayTy<E extends Ty = any> = Ty<Array<InstanceType<E>>>
|
package/src/common.ts
DELETED
package/src/literal.ts
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
import { make, type Ty } from "./_base.js"
|
2
|
-
|
3
|
-
export function literal<V extends number | string>(description: string | undefined, value: V): LiteralTy<V> {
|
4
|
-
return make<LiteralTy<V>>(() => ({
|
5
|
-
const: value,
|
6
|
-
description,
|
7
|
-
}))
|
8
|
-
}
|
9
|
-
|
10
|
-
export type LiteralTy<V extends number | string = any> = Ty<V>
|
package/src/number.ts
DELETED
package/src/object.ts
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
import { make, type Ty } from "./_base.js"
|
2
|
-
|
3
|
-
export function object<F extends ObjectTyFields>(description: string | undefined, fields: F): ObjectTy<F> {
|
4
|
-
return make((ctx) => ({
|
5
|
-
type: "object",
|
6
|
-
description,
|
7
|
-
properties: Object.fromEntries(Object.entries(fields).map(([k, v]) => [k, ctx.ref(v)])),
|
8
|
-
additionalProperties: false,
|
9
|
-
required: Object.keys(fields),
|
10
|
-
}))
|
11
|
-
}
|
12
|
-
|
13
|
-
export type ObjectTyFields = Record<string, Ty>
|
14
|
-
|
15
|
-
export type ObjectTy<F extends ObjectTyFields = any> = Ty<
|
16
|
-
{ [K in keyof F]: F[K] extends Ty ? InstanceType<F[K]> : F[K] }
|
17
|
-
>
|