typia 6.0.0-dev.20240122 → 6.0.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/README.md +2 -1
- package/lib/CamelCase.d.ts +2 -2
- package/lib/IRandomGenerator.d.ts +19 -5
- package/lib/PascalCase.d.ts +2 -2
- package/lib/Resolved.d.ts +1 -1
- package/lib/SnakeCase.d.ts +1 -1
- package/lib/TypeGuardError.js +4 -1
- package/lib/TypeGuardError.js.map +1 -1
- package/lib/executable/TypiaGenerateWizard.js +24 -23
- package/lib/executable/TypiaGenerateWizard.js.map +1 -1
- package/lib/executable/TypiaPatchWizard.js +9 -9
- package/lib/executable/TypiaPatchWizard.js.map +1 -1
- package/lib/executable/TypiaSetupWizard.js +31 -22
- package/lib/executable/TypiaSetupWizard.js.map +1 -1
- package/lib/executable/setup/ArgumentParser.js +5 -5
- package/lib/executable/setup/ArgumentParser.js.map +1 -1
- package/lib/executable/setup/PackageManager.js +8 -8
- package/lib/executable/setup/PackageManager.js.map +1 -1
- package/lib/executable/setup/PluginConfigurator.js +5 -4
- package/lib/executable/setup/PluginConfigurator.js.map +1 -1
- package/lib/executable/typia.js +21 -21
- package/lib/executable/typia.js.map +1 -1
- package/lib/factories/CommentFactory.js +2 -0
- package/lib/factories/CommentFactory.js.map +1 -1
- package/lib/factories/IdentifierFactory.d.ts +1 -1
- package/lib/factories/IdentifierFactory.js +2 -0
- package/lib/factories/IdentifierFactory.js.map +1 -1
- package/lib/factories/LiteralFactory.js +1 -0
- package/lib/factories/LiteralFactory.js.map +1 -1
- package/lib/factories/MetadataCollection.js +19 -1
- package/lib/factories/MetadataCollection.js.map +1 -1
- package/lib/factories/MetadataCommentTagFactory.js +79 -39
- package/lib/factories/MetadataCommentTagFactory.js.map +1 -1
- package/lib/factories/MetadataFactory.js +9 -1
- package/lib/factories/MetadataFactory.js.map +1 -1
- package/lib/factories/MetadataTypeTagFactory.js +61 -17
- package/lib/factories/MetadataTypeTagFactory.js.map +1 -1
- package/lib/factories/MetadataTypeTagSchemaFactory.d.ts +4 -0
- package/lib/factories/MetadataTypeTagSchemaFactory.js +84 -0
- package/lib/factories/MetadataTypeTagSchemaFactory.js.map +1 -0
- package/lib/factories/ProtobufFactory.js +46 -1
- package/lib/factories/ProtobufFactory.js.map +1 -1
- package/lib/factories/TypeFactory.js +9 -0
- package/lib/factories/TypeFactory.js.map +1 -1
- package/lib/factories/internal/metadata/MetadataHelper.js +7 -1
- package/lib/factories/internal/metadata/MetadataHelper.js.map +1 -1
- package/lib/factories/internal/metadata/emend_metadata_atomics.js +15 -5
- package/lib/factories/internal/metadata/emend_metadata_atomics.js.map +1 -1
- package/lib/factories/internal/metadata/emplace_metadata_alias.js +2 -0
- package/lib/factories/internal/metadata/emplace_metadata_alias.js.map +1 -1
- package/lib/factories/internal/metadata/emplace_metadata_array_type.js +2 -0
- package/lib/factories/internal/metadata/emplace_metadata_array_type.js.map +1 -1
- package/lib/factories/internal/metadata/emplace_metadata_object.js +18 -2
- package/lib/factories/internal/metadata/emplace_metadata_object.js.map +1 -1
- package/lib/factories/internal/metadata/emplace_metadata_tuple.js +4 -0
- package/lib/factories/internal/metadata/emplace_metadata_tuple.js.map +1 -1
- package/lib/factories/internal/metadata/explore_metadata.js +2 -0
- package/lib/factories/internal/metadata/explore_metadata.js.map +1 -1
- package/lib/factories/internal/metadata/iterate_metadata.js +4 -2
- package/lib/factories/internal/metadata/iterate_metadata.js.map +1 -1
- package/lib/factories/internal/metadata/iterate_metadata_alias.js +1 -0
- package/lib/factories/internal/metadata/iterate_metadata_alias.js.map +1 -1
- package/lib/factories/internal/metadata/iterate_metadata_array.js +54 -1
- package/lib/factories/internal/metadata/iterate_metadata_array.js.map +1 -1
- package/lib/factories/internal/metadata/iterate_metadata_atomic.js +2 -0
- package/lib/factories/internal/metadata/iterate_metadata_atomic.js.map +1 -1
- package/lib/factories/internal/metadata/iterate_metadata_constant.js +9 -2
- package/lib/factories/internal/metadata/iterate_metadata_constant.js.map +1 -1
- package/lib/factories/internal/metadata/{iterate_metadata_resolve.d.ts → iterate_metadata_escape.d.ts} +1 -1
- package/lib/factories/internal/metadata/{iterate_metadata_resolve.js → iterate_metadata_escape.js} +4 -4
- package/lib/factories/internal/metadata/iterate_metadata_escape.js.map +1 -0
- package/lib/factories/internal/metadata/iterate_metadata_intersection.js +49 -138
- package/lib/factories/internal/metadata/iterate_metadata_intersection.js.map +1 -1
- package/lib/factories/internal/metadata/iterate_metadata_native.js +20 -21
- package/lib/factories/internal/metadata/iterate_metadata_native.js.map +1 -1
- package/lib/factories/internal/metadata/iterate_metadata_object.js.map +1 -1
- package/lib/factories/internal/metadata/iterate_metadata_sort.js +49 -23
- package/lib/factories/internal/metadata/iterate_metadata_sort.js.map +1 -1
- package/lib/factories/internal/metadata/iterate_metadata_template.js +2 -0
- package/lib/factories/internal/metadata/iterate_metadata_template.js.map +1 -1
- package/lib/functional/$FormDataReader/$FormDataReader.d.ts +7 -0
- package/lib/functional/$FormDataReader/$FormDataReader.js +86 -0
- package/lib/functional/$FormDataReader/$FormDataReader.js.map +1 -0
- package/lib/functional/$FormDataReader/index.d.ts +1 -0
- package/lib/functional/$FormDataReader/index.js +28 -0
- package/lib/functional/$FormDataReader/index.js.map +1 -0
- package/lib/functional/$HeadersReader/$HeadersReader.d.ts +4 -0
- package/lib/functional/$HeadersReader/$HeadersReader.js +36 -0
- package/lib/functional/$HeadersReader/$HeadersReader.js.map +1 -0
- package/lib/functional/$HeadersReader/index.d.ts +1 -0
- package/lib/functional/$HeadersReader/index.js +28 -0
- package/lib/functional/$HeadersReader/index.js.map +1 -0
- package/lib/functional/$ParameterReader/$ParameterReader.d.ts +4 -0
- package/lib/functional/$ParameterReader/$ParameterReader.js +36 -0
- package/lib/functional/$ParameterReader/$ParameterReader.js.map +1 -0
- package/lib/functional/$ParameterReader/index.d.ts +1 -0
- package/lib/functional/$ParameterReader/index.js +28 -0
- package/lib/functional/$ParameterReader/index.js.map +1 -0
- package/lib/functional/$ProtobufReader.d.ts +35 -1
- package/lib/functional/$ProtobufReader.js +13 -11
- package/lib/functional/$ProtobufReader.js.map +1 -1
- package/lib/functional/$ProtobufSizer.d.ts +36 -1
- package/lib/functional/$ProtobufSizer.js +28 -13
- package/lib/functional/$ProtobufSizer.js.map +1 -1
- package/lib/functional/$ProtobufWriter.d.ts +45 -1
- package/lib/functional/$ProtobufWriter.js +11 -9
- package/lib/functional/$ProtobufWriter.js.map +1 -1
- package/lib/functional/$QueryReader/$QueryReader.d.ts +6 -0
- package/lib/functional/$QueryReader/$QueryReader.js +55 -0
- package/lib/functional/$QueryReader/$QueryReader.js.map +1 -0
- package/lib/functional/$QueryReader/index.d.ts +1 -0
- package/lib/functional/$QueryReader/index.js +28 -0
- package/lib/functional/$QueryReader/index.js.map +1 -0
- package/lib/functional/$any.d.ts +1 -0
- package/lib/functional/$any.js +9 -0
- package/lib/functional/$any.js.map +1 -0
- package/lib/functional/$clone.d.ts +2 -1
- package/lib/functional/$clone.js +1 -1
- package/lib/functional/$clone.js.map +1 -1
- package/lib/functional/$convention.d.ts +1 -1
- package/lib/functional/$convention.js.map +1 -1
- package/lib/functional/$dictionary.d.ts +2 -0
- package/lib/functional/$dictionary.js +18 -0
- package/lib/functional/$dictionary.js.map +1 -0
- package/lib/functional/$every.d.ts +2 -0
- package/lib/functional/$every.js +12 -0
- package/lib/functional/$every.js.map +1 -0
- package/lib/functional/$guard.js +5 -2
- package/lib/functional/$guard.js.map +1 -1
- package/lib/functional/$is_between.d.ts +1 -1
- package/lib/functional/$is_between.js.map +1 -1
- package/lib/functional/$join.d.ts +1 -1
- package/lib/functional/$join.js.map +1 -1
- package/lib/functional/$number.d.ts +1 -1
- package/lib/functional/$number.js.map +1 -1
- package/lib/functional/$report.d.ts +2 -1
- package/lib/functional/$report.js.map +1 -1
- package/lib/functional/$rest.d.ts +1 -1
- package/lib/functional/$rest.js.map +1 -1
- package/lib/functional/$stoll.d.ts +1 -1
- package/lib/functional/$stoll.js.map +1 -1
- package/lib/functional/$string.js +20 -9
- package/lib/functional/$string.js.map +1 -1
- package/lib/functional/$strlen.d.ts +1 -1
- package/lib/functional/$strlen.js.map +1 -1
- package/lib/functional/$tail.js +3 -0
- package/lib/functional/$tail.js.map +1 -1
- package/lib/functional/$throws.d.ts +2 -1
- package/lib/functional/$throws.js.map +1 -1
- package/lib/functional/$varint.d.ts +6 -0
- package/lib/functional/$varint.js +100 -0
- package/lib/functional/$varint.js.map +1 -0
- package/lib/functional/$zigzag.d.ts +4 -0
- package/lib/functional/$zigzag.js +36 -0
- package/lib/functional/$zigzag.js.map +1 -0
- package/lib/functional/IProtobufWriter.d.ts +15 -1
- package/lib/functional/Namespace/functional.d.ts +4 -0
- package/lib/functional/Namespace/functional.js +9 -0
- package/lib/functional/Namespace/functional.js.map +1 -0
- package/lib/functional/Namespace/http.d.ts +8 -0
- package/lib/functional/Namespace/http.js +16 -0
- package/lib/functional/Namespace/http.js.map +1 -0
- package/lib/functional/Namespace/index.d.ts +30 -0
- package/lib/functional/Namespace/index.js +85 -0
- package/lib/functional/Namespace/index.js.map +1 -0
- package/lib/functional/Namespace/json.d.ts +9 -0
- package/lib/functional/Namespace/json.js +23 -0
- package/lib/functional/Namespace/json.js.map +1 -0
- package/lib/functional/Namespace/misc.d.ts +11 -0
- package/lib/functional/Namespace/misc.js +22 -0
- package/lib/functional/Namespace/misc.js.map +1 -0
- package/lib/functional/Namespace/notations.d.ts +18 -0
- package/lib/functional/Namespace/notations.js +26 -0
- package/lib/functional/Namespace/notations.js.map +1 -0
- package/lib/functional/Namespace/protobuf.d.ts +17 -0
- package/lib/functional/Namespace/protobuf.js +25 -0
- package/lib/functional/Namespace/protobuf.js.map +1 -0
- package/lib/functional/is.js +14 -0
- package/lib/functional/is.js.map +1 -0
- package/lib/functional.d.ts +526 -0
- package/lib/functional.js +195 -0
- package/lib/functional.js.map +1 -0
- package/lib/http.d.ts +265 -369
- package/lib/http.js +226 -19
- package/lib/http.js.map +1 -1
- package/lib/json.d.ts +81 -58
- package/lib/json.js +109 -14
- package/lib/json.js.map +1 -1
- package/lib/misc.d.ts +81 -38
- package/lib/misc.js +133 -16
- package/lib/misc.js.map +1 -1
- package/lib/module.d.ts +91 -38
- package/lib/module.js +102 -21
- package/lib/module.js.map +1 -1
- package/lib/notations.d.ts +106 -45
- package/lib/notations.js +188 -24
- package/lib/notations.js.map +1 -1
- package/lib/programmers/AssertProgrammer.d.ts +6 -1
- package/lib/programmers/AssertProgrammer.js +48 -5
- package/lib/programmers/AssertProgrammer.js.map +1 -1
- package/lib/programmers/CheckerProgrammer.js +57 -2
- package/lib/programmers/CheckerProgrammer.js.map +1 -1
- package/lib/programmers/FeatureProgrammer.js +11 -0
- package/lib/programmers/FeatureProgrammer.js.map +1 -1
- package/lib/programmers/IsProgrammer.js +10 -1
- package/lib/programmers/IsProgrammer.js.map +1 -1
- package/lib/programmers/RandomProgrammer.js +49 -4
- package/lib/programmers/RandomProgrammer.js.map +1 -1
- package/lib/programmers/TypiaProgrammer.js +41 -44
- package/lib/programmers/TypiaProgrammer.js.map +1 -1
- package/lib/programmers/ValidateProgrammer.js +5 -5
- package/lib/programmers/ValidateProgrammer.js.map +1 -1
- package/lib/programmers/functional/FunctionalAssertFunctionProgrammer.d.ts +14 -0
- package/lib/programmers/functional/FunctionalAssertFunctionProgrammer.js +81 -0
- package/lib/programmers/functional/FunctionalAssertFunctionProgrammer.js.map +1 -0
- package/lib/programmers/functional/FunctionalAssertParametersProgrammer.d.ts +7 -0
- package/lib/programmers/functional/FunctionalAssertParametersProgrammer.js +75 -0
- package/lib/programmers/functional/FunctionalAssertParametersProgrammer.js.map +1 -0
- package/lib/programmers/functional/FunctionalAssertReturnProgrammer.d.ts +10 -0
- package/lib/programmers/functional/FunctionalAssertReturnProgrammer.js +46 -0
- package/lib/programmers/functional/FunctionalAssertReturnProgrammer.js.map +1 -0
- package/lib/programmers/functional/FunctionalIsFunctionProgrammer.d.ts +7 -0
- package/lib/programmers/functional/FunctionalIsFunctionProgrammer.js +68 -0
- package/lib/programmers/functional/FunctionalIsFunctionProgrammer.js.map +1 -0
- package/lib/programmers/functional/FunctionalIsParametersProgrammer.d.ts +7 -0
- package/lib/programmers/functional/FunctionalIsParametersProgrammer.js +72 -0
- package/lib/programmers/functional/FunctionalIsParametersProgrammer.js.map +1 -0
- package/lib/programmers/functional/FunctionalIsReturnProgrammer.d.ts +10 -0
- package/lib/programmers/functional/FunctionalIsReturnProgrammer.js +46 -0
- package/lib/programmers/functional/FunctionalIsReturnProgrammer.js.map +1 -0
- package/lib/programmers/functional/FunctionalValidateFunctionProgrammer.d.ts +11 -0
- package/lib/programmers/functional/FunctionalValidateFunctionProgrammer.js +74 -0
- package/lib/programmers/functional/FunctionalValidateFunctionProgrammer.js.map +1 -0
- package/lib/programmers/functional/FunctionalValidateParametersProgrammer.d.ts +7 -0
- package/lib/programmers/functional/FunctionalValidateParametersProgrammer.js +98 -0
- package/lib/programmers/functional/FunctionalValidateParametersProgrammer.js.map +1 -0
- package/lib/programmers/functional/FunctionalValidateReturnProgrammer.d.ts +10 -0
- package/lib/programmers/functional/FunctionalValidateReturnProgrammer.js +53 -0
- package/lib/programmers/functional/FunctionalValidateReturnProgrammer.js.map +1 -0
- package/lib/programmers/functional/internal/FunctionalGeneralProgrammer.d.ts +9 -0
- package/lib/programmers/functional/internal/FunctionalGeneralProgrammer.js +25 -0
- package/lib/programmers/functional/internal/FunctionalGeneralProgrammer.js.map +1 -0
- package/lib/programmers/helpers/AtomicPredicator.js +2 -3
- package/lib/programmers/helpers/AtomicPredicator.js.map +1 -1
- package/lib/programmers/helpers/FunctionImporeter.d.ts +1 -0
- package/lib/programmers/helpers/FunctionImporeter.js +18 -0
- package/lib/programmers/helpers/FunctionImporeter.js.map +1 -0
- package/lib/programmers/helpers/FunctionImporter.d.ts +2 -2
- package/lib/programmers/helpers/FunctionImporter.js +8 -24
- package/lib/programmers/helpers/FunctionImporter.js.map +1 -1
- package/lib/programmers/helpers/ProtobufUtil.js +2 -2
- package/lib/programmers/helpers/ProtobufUtil.js.map +1 -1
- package/lib/programmers/helpers/PruneJoiner.js +9 -5
- package/lib/programmers/helpers/PruneJoiner.js.map +1 -1
- package/lib/programmers/helpers/RandomJoiner.js +2 -0
- package/lib/programmers/helpers/RandomJoiner.js.map +1 -1
- package/lib/programmers/helpers/RandomRanger.js +8 -0
- package/lib/programmers/helpers/RandomRanger.js.map +1 -1
- package/lib/programmers/helpers/StringifyJoinder.js +5 -1
- package/lib/programmers/helpers/StringifyJoinder.js.map +1 -1
- package/lib/programmers/helpers/UnionExplorer.js +10 -0
- package/lib/programmers/helpers/UnionExplorer.js.map +1 -1
- package/lib/programmers/helpers/UnionPredicator.js +5 -0
- package/lib/programmers/helpers/UnionPredicator.js.map +1 -1
- package/lib/programmers/helpers/disable_function_importer_declare.js +2 -4
- package/lib/programmers/helpers/disable_function_importer_declare.js.map +1 -1
- package/lib/programmers/http/HttpAssertFormDataProgrammer.d.ts +6 -0
- package/lib/programmers/http/HttpAssertFormDataProgrammer.js +47 -0
- package/lib/programmers/http/HttpAssertFormDataProgrammer.js.map +1 -0
- package/lib/programmers/http/HttpAssertHeadersProgrammer.d.ts +1 -1
- package/lib/programmers/http/HttpAssertHeadersProgrammer.js +9 -3
- package/lib/programmers/http/HttpAssertHeadersProgrammer.js.map +1 -1
- package/lib/programmers/http/HttpAssertQueryProgrammer.d.ts +1 -1
- package/lib/programmers/http/HttpAssertQueryProgrammer.js +9 -3
- package/lib/programmers/http/HttpAssertQueryProgrammer.js.map +1 -1
- package/lib/programmers/http/HttpFormDataProgrammer.d.ts +9 -0
- package/lib/programmers/http/HttpFormDataProgrammer.js +193 -0
- package/lib/programmers/http/HttpFormDataProgrammer.js.map +1 -0
- package/lib/programmers/http/HttpHeadersProgrammer.js +27 -9
- package/lib/programmers/http/HttpHeadersProgrammer.js.map +1 -1
- package/lib/programmers/http/HttpIsFormDataProgrammer.d.ts +6 -0
- package/lib/programmers/http/HttpIsFormDataProgrammer.js +47 -0
- package/lib/programmers/http/HttpIsFormDataProgrammer.js.map +1 -0
- package/lib/programmers/http/HttpIsHeadersProgrammer.js +5 -3
- package/lib/programmers/http/HttpIsHeadersProgrammer.js.map +1 -1
- package/lib/programmers/http/HttpIsQueryProgrammer.js +5 -3
- package/lib/programmers/http/HttpIsQueryProgrammer.js.map +1 -1
- package/lib/programmers/http/HttpParameterProgrammer.js +4 -2
- package/lib/programmers/http/HttpParameterProgrammer.js.map +1 -1
- package/lib/programmers/http/HttpQueryProgrammer.js +20 -5
- package/lib/programmers/http/HttpQueryProgrammer.js.map +1 -1
- package/lib/programmers/http/HttpValidateFormDataProgrammer.d.ts +6 -0
- package/lib/programmers/http/HttpValidateFormDataProgrammer.js +41 -0
- package/lib/programmers/http/HttpValidateFormDataProgrammer.js.map +1 -0
- package/lib/programmers/http/HttpValidateHeadersProgrammer.js +2 -2
- package/lib/programmers/http/HttpValidateHeadersProgrammer.js.map +1 -1
- package/lib/programmers/http/HttpValidateQueryProgrammer.js +2 -2
- package/lib/programmers/http/HttpValidateQueryProgrammer.js.map +1 -1
- package/lib/programmers/internal/application_array.js +10 -99
- package/lib/programmers/internal/application_array.js.map +1 -1
- package/lib/programmers/internal/application_boolean.js +8 -32
- package/lib/programmers/internal/application_boolean.js.map +1 -1
- package/lib/programmers/internal/application_escaped.d.ts +1 -4
- package/lib/programmers/internal/application_escaped.js +29 -22
- package/lib/programmers/internal/application_escaped.js.map +1 -1
- package/lib/programmers/internal/application_number.js +8 -137
- package/lib/programmers/internal/application_number.js.map +1 -1
- package/lib/programmers/internal/application_plugin.js +55 -0
- package/lib/programmers/internal/application_plugin.js.map +1 -0
- package/lib/programmers/internal/application_string.js +8 -107
- package/lib/programmers/internal/application_string.js.map +1 -1
- package/lib/programmers/internal/application_templates.js +7 -8
- package/lib/programmers/internal/application_templates.js.map +1 -1
- package/lib/programmers/internal/application_v30_alias.js +44 -0
- package/lib/programmers/internal/application_v30_alias.js.map +1 -0
- package/lib/programmers/internal/application_v30_constant.js +13 -0
- package/lib/programmers/internal/application_v30_constant.js.map +1 -0
- package/lib/programmers/internal/application_v30_native.js +34 -0
- package/lib/programmers/internal/application_v30_native.js.map +1 -0
- package/lib/programmers/internal/application_v30_object.js +154 -0
- package/lib/programmers/internal/application_v30_object.js.map +1 -0
- package/lib/programmers/internal/application_v30_schema.js +228 -0
- package/lib/programmers/internal/application_v30_schema.js.map +1 -0
- package/lib/programmers/internal/application_v30_tuple.js +33 -0
- package/lib/programmers/internal/application_v30_tuple.js.map +1 -0
- package/lib/programmers/internal/application_v31_alias.js +38 -0
- package/lib/programmers/internal/application_v31_alias.js.map +1 -0
- package/lib/programmers/internal/application_v31_constant.js +19 -0
- package/lib/programmers/internal/application_v31_constant.js.map +1 -0
- package/lib/programmers/internal/application_v31_native.js +29 -0
- package/lib/programmers/internal/application_v31_native.js.map +1 -0
- package/lib/programmers/internal/application_v31_object.js +146 -0
- package/lib/programmers/internal/application_v31_object.js.map +1 -0
- package/lib/programmers/internal/application_v31_schema.js +224 -0
- package/lib/programmers/internal/application_v31_schema.js.map +1 -0
- package/lib/programmers/internal/application_v31_tuple.js +22 -0
- package/lib/programmers/internal/application_v31_tuple.js.map +1 -0
- package/lib/programmers/internal/check_array_length.js +3 -0
- package/lib/programmers/internal/check_array_length.js.map +1 -1
- package/lib/programmers/internal/check_bigint.js +6 -0
- package/lib/programmers/internal/check_bigint.js.map +1 -1
- package/lib/programmers/internal/check_dynamic_key.js +7 -1
- package/lib/programmers/internal/check_dynamic_key.js.map +1 -1
- package/lib/programmers/internal/check_dynamic_properties.js +29 -4
- package/lib/programmers/internal/check_dynamic_properties.js.map +1 -1
- package/lib/programmers/internal/check_everything.js +3 -0
- package/lib/programmers/internal/check_everything.js.map +1 -1
- package/lib/programmers/internal/check_native.js +3 -0
- package/lib/programmers/internal/check_native.js.map +1 -1
- package/lib/programmers/internal/check_number.js +8 -1
- package/lib/programmers/internal/check_number.js.map +1 -1
- package/lib/programmers/internal/check_object.js +9 -0
- package/lib/programmers/internal/check_object.js.map +1 -1
- package/lib/programmers/internal/check_string.js +6 -0
- package/lib/programmers/internal/check_string.js.map +1 -1
- package/lib/programmers/internal/check_template.js +7 -1
- package/lib/programmers/internal/check_template.js.map +1 -1
- package/lib/programmers/internal/check_union_array_like.js +4 -0
- package/lib/programmers/internal/check_union_array_like.js.map +1 -1
- package/lib/programmers/internal/decode_union_object.js +52 -10
- package/lib/programmers/internal/decode_union_object.js.map +1 -1
- package/lib/programmers/internal/feature_object_entries.js +3 -0
- package/lib/programmers/internal/feature_object_entries.js.map +1 -1
- package/lib/programmers/internal/metadata_to_pattern.js +10 -4
- package/lib/programmers/internal/metadata_to_pattern.js.map +1 -1
- package/lib/programmers/internal/prune_object_properties.js +3 -0
- package/lib/programmers/internal/prune_object_properties.js.map +1 -1
- package/lib/programmers/internal/random_custom.js +3 -0
- package/lib/programmers/internal/random_custom.js.map +1 -1
- package/lib/programmers/internal/stringify_dynamic_properties.js +11 -0
- package/lib/programmers/internal/stringify_dynamic_properties.js.map +1 -1
- package/lib/programmers/internal/stringify_native.js +3 -0
- package/lib/programmers/internal/stringify_native.js.map +1 -1
- package/lib/programmers/internal/stringify_regular_properties.js +7 -0
- package/lib/programmers/internal/stringify_regular_properties.js.map +1 -1
- package/lib/programmers/internal/template_to_pattern.js +3 -0
- package/lib/programmers/internal/template_to_pattern.js.map +1 -1
- package/lib/programmers/json/JsonApplicationProgrammer.d.ts +2 -5
- package/lib/programmers/json/JsonApplicationProgrammer.js +85 -34
- package/lib/programmers/json/JsonApplicationProgrammer.js.map +1 -1
- package/lib/programmers/json/JsonAssertParseProgrammer.d.ts +1 -1
- package/lib/programmers/json/JsonAssertParseProgrammer.js +11 -3
- package/lib/programmers/json/JsonAssertParseProgrammer.js.map +1 -1
- package/lib/programmers/json/JsonAssertStringifyProgrammer.d.ts +1 -1
- package/lib/programmers/json/JsonAssertStringifyProgrammer.js +9 -3
- package/lib/programmers/json/JsonAssertStringifyProgrammer.js.map +1 -1
- package/lib/programmers/json/JsonIsParseProgrammer.js +3 -1
- package/lib/programmers/json/JsonIsParseProgrammer.js.map +1 -1
- package/lib/programmers/json/JsonStringifyProgrammer.js +43 -4
- package/lib/programmers/json/JsonStringifyProgrammer.js.map +1 -1
- package/lib/programmers/misc/MiscAssertCloneProgrammer.d.ts +1 -1
- package/lib/programmers/misc/MiscAssertCloneProgrammer.js +11 -3
- package/lib/programmers/misc/MiscAssertCloneProgrammer.js.map +1 -1
- package/lib/programmers/misc/MiscAssertPruneProgrammer.d.ts +1 -1
- package/lib/programmers/misc/MiscAssertPruneProgrammer.js +9 -3
- package/lib/programmers/misc/MiscAssertPruneProgrammer.js.map +1 -1
- package/lib/programmers/misc/MiscCloneProgrammer.js +30 -4
- package/lib/programmers/misc/MiscCloneProgrammer.js.map +1 -1
- package/lib/programmers/misc/MiscIsCloneProgrammer.js +3 -1
- package/lib/programmers/misc/MiscIsCloneProgrammer.js.map +1 -1
- package/lib/programmers/misc/MiscLiteralsProgrammer.js +1 -2
- package/lib/programmers/misc/MiscLiteralsProgrammer.js.map +1 -1
- package/lib/programmers/misc/MiscPruneProgrammer.js +21 -1
- package/lib/programmers/misc/MiscPruneProgrammer.js.map +1 -1
- package/lib/programmers/notations/NotationAssertGeneralProgrammer.d.ts +1 -1
- package/lib/programmers/notations/NotationAssertGeneralProgrammer.js +9 -3
- package/lib/programmers/notations/NotationAssertGeneralProgrammer.js.map +1 -1
- package/lib/programmers/notations/NotationGeneralProgrammer.js +189 -175
- package/lib/programmers/notations/NotationGeneralProgrammer.js.map +1 -1
- package/lib/programmers/protobuf/ProtobufAssertDecodeProgrammer.d.ts +1 -1
- package/lib/programmers/protobuf/ProtobufAssertDecodeProgrammer.js +9 -3
- package/lib/programmers/protobuf/ProtobufAssertDecodeProgrammer.js.map +1 -1
- package/lib/programmers/protobuf/ProtobufAssertEncodeProgrammer.d.ts +1 -1
- package/lib/programmers/protobuf/ProtobufAssertEncodeProgrammer.js +9 -3
- package/lib/programmers/protobuf/ProtobufAssertEncodeProgrammer.js.map +1 -1
- package/lib/programmers/protobuf/ProtobufDecodeProgrammer.js +16 -4
- package/lib/programmers/protobuf/ProtobufDecodeProgrammer.js.map +1 -1
- package/lib/programmers/protobuf/ProtobufEncodeProgrammer.js +39 -19
- package/lib/programmers/protobuf/ProtobufEncodeProgrammer.js.map +1 -1
- package/lib/programmers/protobuf/ProtobufIsDecodeProgrammer.js +3 -1
- package/lib/programmers/protobuf/ProtobufIsDecodeProgrammer.js.map +1 -1
- package/lib/programmers/protobuf/ProtobufMessageProgrammer.js +7 -1
- package/lib/programmers/protobuf/ProtobufMessageProgrammer.js.map +1 -1
- package/lib/protobuf.d.ts +72 -31
- package/lib/protobuf.js +136 -16
- package/lib/protobuf.js.map +1 -1
- package/lib/reflect.d.ts +4 -2
- package/lib/reflect.js +8 -1
- package/lib/reflect.js.map +1 -1
- package/lib/schemas/json/IJsonApplication.d.ts +13 -7
- package/lib/schemas/metadata/IMetadataConstant.d.ts +2 -1
- package/lib/schemas/metadata/IMetadataConstantValue.d.ts +6 -0
- package/lib/schemas/metadata/IMetadataConstantValue.js +3 -0
- package/lib/schemas/metadata/IMetadataConstantValue.js.map +1 -0
- package/lib/schemas/metadata/IMetadataTypeTag.d.ts +1 -0
- package/lib/schemas/metadata/Metadata.d.ts +1 -1
- package/lib/schemas/metadata/Metadata.js +84 -8
- package/lib/schemas/metadata/Metadata.js.map +1 -1
- package/lib/schemas/metadata/MetadataAlias.js +13 -1
- package/lib/schemas/metadata/MetadataAlias.js.map +1 -1
- package/lib/schemas/metadata/MetadataApplication.js +7 -1
- package/lib/schemas/metadata/MetadataApplication.js.map +1 -1
- package/lib/schemas/metadata/MetadataArray.js +4 -1
- package/lib/schemas/metadata/MetadataArray.js.map +1 -1
- package/lib/schemas/metadata/MetadataArrayType.js +10 -1
- package/lib/schemas/metadata/MetadataArrayType.js.map +1 -1
- package/lib/schemas/metadata/MetadataAtomic.js +20 -17
- package/lib/schemas/metadata/MetadataAtomic.js.map +1 -1
- package/lib/schemas/metadata/MetadataComponents.js +4 -1
- package/lib/schemas/metadata/MetadataComponents.js.map +1 -1
- package/lib/schemas/metadata/MetadataConstant.d.ts +2 -1
- package/lib/schemas/metadata/MetadataConstant.js +5 -9
- package/lib/schemas/metadata/MetadataConstant.js.map +1 -1
- package/lib/schemas/metadata/MetadataConstantValue.d.ts +13 -0
- package/lib/schemas/metadata/MetadataConstantValue.js +44 -0
- package/lib/schemas/metadata/MetadataConstantValue.js.map +1 -0
- package/lib/schemas/metadata/MetadataEscaped.js +10 -1
- package/lib/schemas/metadata/MetadataEscaped.js.map +1 -1
- package/lib/schemas/metadata/MetadataObject.js +28 -1
- package/lib/schemas/metadata/MetadataObject.js.map +1 -1
- package/lib/schemas/metadata/MetadataProperty.js +13 -1
- package/lib/schemas/metadata/MetadataProperty.js.map +1 -1
- package/lib/schemas/metadata/MetadataTuple.js +7 -1
- package/lib/schemas/metadata/MetadataTuple.js.map +1 -1
- package/lib/schemas/metadata/MetadataTupleType.js +7 -1
- package/lib/schemas/metadata/MetadataTupleType.js.map +1 -1
- package/lib/tags/Constant.d.ts +10 -0
- package/lib/{schemas/json/IJsonSchema.js → tags/Constant.js} +1 -1
- package/lib/tags/Constant.js.map +1 -0
- package/lib/tags/ContentMediaType.d.ts +9 -0
- package/lib/{schemas/json/IJsonComponents.js → tags/ContentMediaType.js} +1 -1
- package/lib/tags/ContentMediaType.js.map +1 -0
- package/lib/tags/Default.d.ts +3 -0
- package/lib/tags/ExclusiveMaximum.d.ts +4 -0
- package/lib/tags/ExclusiveMinimum.d.ts +4 -0
- package/lib/tags/Format.d.ts +10 -3
- package/lib/tags/JsonSchemaPlugin.d.ts +7 -0
- package/lib/tags/JsonSchemaPlugin.js +3 -0
- package/lib/tags/JsonSchemaPlugin.js.map +1 -0
- package/lib/tags/MaxItems.d.ts +3 -0
- package/lib/tags/MaxLength.d.ts +3 -0
- package/lib/tags/Maximum.d.ts +3 -0
- package/lib/tags/MinItems.d.ts +3 -0
- package/lib/tags/MinLength.d.ts +3 -0
- package/lib/tags/Minimum.d.ts +3 -0
- package/lib/tags/MultipleOf.d.ts +3 -0
- package/lib/tags/Pattern.d.ts +3 -0
- package/lib/tags/TagBase.d.ts +6 -2
- package/lib/tags/Type.d.ts +3 -0
- package/lib/tags/index.d.ts +3 -0
- package/lib/tags/index.js +3 -0
- package/lib/tags/index.js.map +1 -1
- package/lib/tags/internal/FormatCheatSheet.d.ts +27 -0
- package/lib/tags/internal/FormatCheatSheet.js +38 -0
- package/lib/tags/internal/FormatCheatSheet.js.map +1 -0
- package/lib/transformers/CallExpressionTransformer.js +195 -1
- package/lib/transformers/CallExpressionTransformer.js.map +1 -1
- package/lib/transformers/FileTransformer.js +2 -0
- package/lib/transformers/FileTransformer.js.map +1 -1
- package/lib/transformers/TransformerError.js +2 -1
- package/lib/transformers/TransformerError.js.map +1 -1
- package/lib/transformers/features/AssertTransformer.js.map +1 -1
- package/lib/transformers/features/CreateAssertTransformer.js.map +1 -1
- package/lib/transformers/features/CreateRandomTransformer.js +3 -0
- package/lib/transformers/features/CreateRandomTransformer.js.map +1 -1
- package/lib/transformers/features/RandomTransformer.js +3 -0
- package/lib/transformers/features/RandomTransformer.js.map +1 -1
- package/lib/transformers/features/functional/FunctionalGenericTransformer.d.ts +10 -0
- package/lib/transformers/features/functional/FunctionalGenericTransformer.js +39 -0
- package/lib/transformers/features/functional/FunctionalGenericTransformer.js.map +1 -0
- package/lib/transformers/features/http/CreateHttpAssertFormDataTransformer.d.ts +4 -0
- package/lib/transformers/features/http/CreateHttpAssertFormDataTransformer.js +12 -0
- package/lib/transformers/features/http/CreateHttpAssertFormDataTransformer.js.map +1 -0
- package/lib/transformers/features/http/CreateHttpFormDataTransformer.d.ts +4 -0
- package/lib/transformers/features/http/CreateHttpFormDataTransformer.js +10 -0
- package/lib/transformers/features/http/CreateHttpFormDataTransformer.js.map +1 -0
- package/lib/transformers/features/http/CreateHttpIsFormDataTransformer.d.ts +4 -0
- package/lib/transformers/features/http/CreateHttpIsFormDataTransformer.js +10 -0
- package/lib/transformers/features/http/CreateHttpIsFormDataTransformer.js.map +1 -0
- package/lib/transformers/features/http/CreateHttpValidateFormDataTransformer.d.ts +4 -0
- package/lib/transformers/features/http/CreateHttpValidateFormDataTransformer.js +12 -0
- package/lib/transformers/features/http/CreateHttpValidateFormDataTransformer.js.map +1 -0
- package/lib/transformers/features/http/HttpAssertFormDataTransformer.d.ts +4 -0
- package/lib/transformers/features/http/HttpAssertFormDataTransformer.js +12 -0
- package/lib/transformers/features/http/HttpAssertFormDataTransformer.js.map +1 -0
- package/lib/transformers/features/http/HttpFormDataTransformer.d.ts +4 -0
- package/lib/transformers/features/http/HttpFormDataTransformer.js +10 -0
- package/lib/transformers/features/http/HttpFormDataTransformer.js.map +1 -0
- package/lib/transformers/features/http/HttpIsFormDataTransformer.d.ts +4 -0
- package/lib/transformers/features/http/HttpIsFormDataTransformer.js +10 -0
- package/lib/transformers/features/http/HttpIsFormDataTransformer.js.map +1 -0
- package/lib/transformers/features/http/HttpValidateFormDataTransformer.d.ts +4 -0
- package/lib/transformers/features/http/HttpValidateFormDataTransformer.js +12 -0
- package/lib/transformers/features/http/HttpValidateFormDataTransformer.js.map +1 -0
- package/lib/transformers/features/json/JsonApplicationTransformer.js +20 -17
- package/lib/transformers/features/json/JsonApplicationTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscLiteralsTransformer.js +3 -0
- package/lib/transformers/features/misc/MiscLiteralsTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/ProtobufMessageTransformer.js +3 -0
- package/lib/transformers/features/protobuf/ProtobufMessageTransformer.js.map +1 -1
- package/lib/transformers/features/reflect/ReflectMetadataTransformer.js +4 -0
- package/lib/transformers/features/reflect/ReflectMetadataTransformer.js.map +1 -1
- package/lib/transformers/internal/GenericTransformer.d.ts +1 -1
- package/lib/transformers/internal/GenericTransformer.js +9 -3
- package/lib/transformers/internal/GenericTransformer.js.map +1 -1
- package/lib/utils/ArrayUtil.d.ts +0 -1
- package/lib/utils/ArrayUtil.js +0 -29
- package/lib/utils/ArrayUtil.js.map +1 -1
- package/lib/utils/NamingConvention/NamingConvention.d.ts +3 -0
- package/lib/utils/{NamingConvention.js → NamingConvention/NamingConvention.js} +55 -51
- package/lib/utils/NamingConvention/NamingConvention.js.map +1 -0
- package/lib/utils/NamingConvention/index.d.ts +1 -0
- package/lib/utils/NamingConvention/index.js +28 -0
- package/lib/utils/NamingConvention/index.js.map +1 -0
- package/lib/utils/PatternUtil.js +3 -3
- package/lib/utils/PatternUtil.js.map +1 -1
- package/lib/utils/RandomGenerator/RandomGenerator.d.ts +31 -0
- package/lib/utils/RandomGenerator/RandomGenerator.js +167 -0
- package/lib/utils/RandomGenerator/RandomGenerator.js.map +1 -0
- package/lib/utils/RandomGenerator/index.d.ts +1 -0
- package/lib/utils/RandomGenerator/index.js +28 -0
- package/lib/utils/RandomGenerator/index.js.map +1 -0
- package/lib/utils/Singleton.js +1 -1
- package/lib/utils/StringUtil/StringUtil.d.ts +2 -0
- package/lib/utils/StringUtil/StringUtil.js +14 -0
- package/lib/utils/StringUtil/StringUtil.js.map +1 -0
- package/lib/utils/StringUtil/index.d.ts +1 -0
- package/lib/utils/StringUtil/index.js +28 -0
- package/lib/utils/StringUtil/index.js.map +1 -0
- package/package.json +14 -10
- package/src/CamelCase.ts +68 -61
- package/src/IRandomGenerator.ts +30 -5
- package/src/PascalCase.ts +68 -61
- package/src/Primitive.ts +48 -47
- package/src/Resolved.ts +61 -58
- package/src/SnakeCase.ts +67 -62
- package/src/executable/TypiaSetupWizard.ts +5 -5
- package/src/factories/IdentifierFactory.ts +1 -1
- package/src/factories/MetadataCommentTagFactory.ts +72 -157
- package/src/factories/MetadataFactory.ts +6 -1
- package/src/factories/MetadataTypeTagFactory.ts +38 -15
- package/src/factories/MetadataTypeTagSchemaFactory.ts +59 -0
- package/src/factories/ProtobufFactory.ts +9 -1
- package/src/factories/TypeFactory.ts +14 -14
- package/src/factories/internal/metadata/MetadataHelper.ts +7 -1
- package/src/factories/internal/metadata/emend_metadata_atomics.ts +15 -7
- package/src/factories/internal/metadata/emplace_metadata_object.ts +2 -1
- package/src/factories/internal/metadata/iterate_metadata.ts +2 -2
- package/src/factories/internal/metadata/iterate_metadata_array.ts +34 -1
- package/src/factories/internal/metadata/iterate_metadata_constant.ts +17 -2
- package/src/factories/internal/metadata/{iterate_metadata_resolve.ts → iterate_metadata_escape.ts} +1 -1
- package/src/factories/internal/metadata/iterate_metadata_intersection.ts +51 -97
- package/src/factories/internal/metadata/iterate_metadata_native.ts +21 -20
- package/src/factories/internal/metadata/iterate_metadata_object.ts +0 -10
- package/src/factories/internal/metadata/iterate_metadata_sort.ts +15 -2
- package/src/functional/$FormDataReader/$FormDataReader.ts +83 -0
- package/src/functional/$FormDataReader/index.ts +1 -0
- package/src/functional/$HeadersReader/$HeadersReader.ts +26 -0
- package/src/functional/$HeadersReader/index.ts +1 -0
- package/src/functional/$ParameterReader/$ParameterReader.ts +29 -0
- package/src/functional/$ParameterReader/index.ts +1 -0
- package/src/functional/$ProtobufReader.ts +5 -19
- package/src/functional/$ProtobufSizer.ts +11 -21
- package/src/functional/$ProtobufWriter.ts +8 -33
- package/src/functional/$QueryReader/$QueryReader.ts +46 -0
- package/src/functional/$QueryReader/index.ts +1 -0
- package/src/functional/$any.ts +4 -0
- package/src/functional/$clone.ts +1 -4
- package/src/functional/$convention.ts +0 -3
- package/src/functional/$dictionary.ts +22 -0
- package/src/functional/$every.ts +11 -0
- package/src/functional/$guard.ts +6 -20
- package/src/functional/$is_between.ts +0 -3
- package/src/functional/$join.ts +0 -12
- package/src/functional/$number.ts +0 -3
- package/src/functional/$report.ts +0 -3
- package/src/functional/$rest.ts +0 -3
- package/src/functional/$stoll.ts +0 -3
- package/src/functional/$string.ts +3 -10
- package/src/functional/$strlen.ts +0 -3
- package/src/functional/$throws.ts +0 -3
- package/src/functional/$varint.ts +130 -0
- package/src/functional/$zigzag.ts +39 -0
- package/src/functional/IProtobufWriter.ts +0 -3
- package/src/functional/Namespace/functional.ts +5 -0
- package/src/functional/Namespace/http.ts +9 -0
- package/src/functional/Namespace/index.ts +76 -0
- package/src/functional/Namespace/json.ts +15 -0
- package/src/functional/Namespace/misc.ts +14 -0
- package/src/functional/Namespace/notations.ts +23 -0
- package/src/functional/Namespace/protobuf.ts +20 -0
- package/src/functional/is.ts +10 -0
- package/src/functional.ts +872 -0
- package/src/http.ts +566 -412
- package/src/json.ts +181 -80
- package/src/misc.ts +190 -60
- package/src/module.ts +205 -60
- package/src/notations.ts +312 -76
- package/src/programmers/AssertProgrammer.ts +90 -46
- package/src/programmers/CheckerProgrammer.ts +57 -3
- package/src/programmers/FeatureProgrammer.ts +27 -27
- package/src/programmers/IsProgrammer.ts +1 -1
- package/src/programmers/RandomProgrammer.ts +85 -22
- package/src/programmers/TypiaProgrammer.ts +10 -18
- package/src/programmers/ValidateProgrammer.ts +47 -48
- package/src/programmers/functional/FunctionalAssertFunctionProgrammer.ts +130 -0
- package/src/programmers/functional/FunctionalAssertParametersProgrammer.ts +81 -0
- package/src/programmers/functional/FunctionalAssertReturnProgrammer.ts +77 -0
- package/src/programmers/functional/FunctionalIsFunctionProgrammer.ts +61 -0
- package/src/programmers/functional/FunctionalIsParametersProgrammer.ts +73 -0
- package/src/programmers/functional/FunctionalIsReturnProgrammer.ts +84 -0
- package/src/programmers/functional/FunctionalValidateFunctionProgrammer.ts +113 -0
- package/src/programmers/functional/FunctionalValidateParametersProgrammer.ts +203 -0
- package/src/programmers/functional/FunctionalValidateReturnProgrammer.ts +107 -0
- package/src/programmers/functional/internal/FunctionalGeneralProgrammer.ts +32 -0
- package/src/programmers/helpers/AtomicPredicator.ts +1 -2
- package/src/programmers/helpers/FunctionImporeter.ts +1 -0
- package/src/programmers/helpers/FunctionImporter.ts +17 -58
- package/src/programmers/helpers/ProtobufUtil.ts +2 -2
- package/src/programmers/helpers/PruneJoiner.ts +8 -10
- package/src/programmers/helpers/StringifyJoinder.ts +3 -2
- package/src/programmers/helpers/disable_function_importer_declare.ts +4 -5
- package/src/programmers/http/HttpAssertFormDataProgrammer.ts +87 -0
- package/src/programmers/http/HttpAssertHeadersProgrammer.ts +18 -6
- package/src/programmers/http/HttpAssertQueryProgrammer.ts +18 -6
- package/src/programmers/http/HttpFormDataProgrammer.ts +256 -0
- package/src/programmers/http/HttpHeadersProgrammer.ts +36 -25
- package/src/programmers/http/HttpIsFormDataProgrammer.ts +90 -0
- package/src/programmers/http/HttpIsHeadersProgrammer.ts +14 -6
- package/src/programmers/http/HttpIsQueryProgrammer.ts +14 -6
- package/src/programmers/http/HttpParameterProgrammer.ts +4 -6
- package/src/programmers/http/HttpQueryProgrammer.ts +38 -30
- package/src/programmers/http/HttpValidateFormDataProgrammer.ts +75 -0
- package/src/programmers/http/HttpValidateHeadersProgrammer.ts +2 -2
- package/src/programmers/http/HttpValidateQueryProgrammer.ts +2 -2
- package/src/programmers/internal/application_array.ts +27 -50
- package/src/programmers/internal/application_boolean.ts +18 -28
- package/src/programmers/internal/application_escaped.ts +40 -18
- package/src/programmers/internal/application_number.ts +17 -89
- package/src/programmers/internal/application_plugin.ts +19 -0
- package/src/programmers/internal/application_string.ts +17 -53
- package/src/programmers/internal/application_templates.ts +17 -16
- package/src/programmers/internal/application_v30_alias.ts +51 -0
- package/src/programmers/internal/application_v30_constant.ts +18 -0
- package/src/programmers/internal/application_v30_native.ts +28 -0
- package/src/programmers/internal/application_v30_object.ts +148 -0
- package/src/programmers/internal/application_v30_schema.ts +155 -0
- package/src/programmers/internal/application_v30_tuple.ts +33 -0
- package/src/programmers/internal/application_v31_alias.ts +43 -0
- package/src/programmers/internal/application_v31_constant.ts +22 -0
- package/src/programmers/internal/application_v31_native.ts +24 -0
- package/src/programmers/internal/application_v31_object.ts +141 -0
- package/src/programmers/internal/application_v31_schema.ts +150 -0
- package/src/programmers/internal/application_v31_tuple.ts +22 -0
- package/src/programmers/internal/check_dynamic_key.ts +5 -6
- package/src/programmers/internal/check_dynamic_properties.ts +20 -7
- package/src/programmers/internal/check_number.ts +35 -34
- package/src/programmers/internal/check_object.ts +5 -4
- package/src/programmers/internal/check_template.ts +1 -1
- package/src/programmers/internal/decode_union_object.ts +37 -16
- package/src/programmers/internal/feature_object_entries.ts +8 -8
- package/src/programmers/internal/metadata_to_pattern.ts +7 -6
- package/src/programmers/json/JsonApplicationProgrammer.ts +70 -37
- package/src/programmers/json/JsonAssertParseProgrammer.ts +21 -7
- package/src/programmers/json/JsonAssertStringifyProgrammer.ts +9 -3
- package/src/programmers/json/JsonIsParseProgrammer.ts +12 -4
- package/src/programmers/json/JsonStringifyProgrammer.ts +33 -26
- package/src/programmers/misc/MiscAssertCloneProgrammer.ts +21 -7
- package/src/programmers/misc/MiscAssertPruneProgrammer.ts +9 -3
- package/src/programmers/misc/MiscCloneProgrammer.ts +25 -19
- package/src/programmers/misc/MiscIsCloneProgrammer.ts +12 -4
- package/src/programmers/misc/MiscLiteralsProgrammer.ts +9 -11
- package/src/programmers/misc/MiscPruneProgrammer.ts +1 -1
- package/src/programmers/notations/NotationAssertGeneralProgrammer.ts +9 -3
- package/src/programmers/notations/NotationGeneralProgrammer.ts +12 -23
- package/src/programmers/protobuf/ProtobufAssertDecodeProgrammer.ts +18 -6
- package/src/programmers/protobuf/ProtobufAssertEncodeProgrammer.ts +9 -3
- package/src/programmers/protobuf/ProtobufDecodeProgrammer.ts +52 -41
- package/src/programmers/protobuf/ProtobufEncodeProgrammer.ts +55 -58
- package/src/programmers/protobuf/ProtobufIsDecodeProgrammer.ts +12 -4
- package/src/programmers/protobuf/ProtobufMessageProgrammer.ts +3 -3
- package/src/protobuf.ts +211 -51
- package/src/reflect.ts +9 -3
- package/src/schemas/json/IJsonApplication.ts +14 -7
- package/src/schemas/metadata/IMetadataConstant.ts +3 -1
- package/src/schemas/metadata/IMetadataConstantValue.ts +8 -0
- package/src/schemas/metadata/IMetadataTypeTag.ts +1 -0
- package/src/schemas/metadata/Metadata.ts +30 -13
- package/src/schemas/metadata/MetadataAtomic.ts +17 -15
- package/src/schemas/metadata/MetadataConstant.ts +5 -17
- package/src/schemas/metadata/MetadataConstantValue.ts +53 -0
- package/src/tags/Constant.ts +15 -0
- package/src/tags/ContentMediaType.ts +10 -0
- package/src/tags/Default.ts +7 -4
- package/src/tags/ExclusiveMaximum.ts +6 -0
- package/src/tags/ExclusiveMinimum.ts +6 -0
- package/src/tags/Format.ts +10 -24
- package/src/tags/JsonSchemaPlugin.ts +8 -0
- package/src/tags/MaxItems.ts +3 -0
- package/src/tags/MaxLength.ts +3 -0
- package/src/tags/Maximum.ts +5 -0
- package/src/tags/MinItems.ts +3 -0
- package/src/tags/MinLength.ts +3 -0
- package/src/tags/Minimum.ts +5 -0
- package/src/tags/MultipleOf.ts +5 -0
- package/src/tags/Pattern.ts +3 -0
- package/src/tags/TagBase.ts +9 -1
- package/src/tags/Type.ts +19 -14
- package/src/tags/index.ts +3 -0
- package/src/tags/internal/FormatCheatSheet.ts +71 -0
- package/src/transformers/CallExpressionTransformer.ts +146 -1
- package/src/transformers/features/AssertTransformer.ts +2 -2
- package/src/transformers/features/CreateAssertTransformer.ts +2 -2
- package/src/transformers/features/functional/FunctionalGenericTransformer.ts +57 -0
- package/src/transformers/features/http/CreateHttpAssertFormDataTransformer.ts +12 -0
- package/src/transformers/features/http/CreateHttpFormDataTransformer.ts +9 -0
- package/src/transformers/features/http/CreateHttpIsFormDataTransformer.ts +9 -0
- package/src/transformers/features/http/CreateHttpValidateFormDataTransformer.ts +12 -0
- package/src/transformers/features/http/HttpAssertFormDataTransformer.ts +10 -0
- package/src/transformers/features/http/HttpFormDataTransformer.ts +9 -0
- package/src/transformers/features/http/HttpIsFormDataTransformer.ts +9 -0
- package/src/transformers/features/http/HttpValidateFormDataTransformer.ts +10 -0
- package/src/transformers/features/json/JsonApplicationTransformer.ts +8 -18
- package/src/transformers/internal/GenericTransformer.ts +12 -4
- package/src/utils/ArrayUtil.ts +0 -2
- package/src/utils/NamingConvention/NamingConvention.ts +86 -0
- package/src/utils/NamingConvention/index.ts +1 -0
- package/src/utils/RandomGenerator/RandomGenerator.ts +105 -0
- package/src/utils/RandomGenerator/index.ts +1 -0
- package/src/utils/StringUtil/StringUtil.ts +7 -0
- package/src/utils/StringUtil/index.ts +1 -0
- package/lib/factories/internal/metadata/iterate_metadata_resolve.js.map +0 -1
- package/lib/functional/$HeadersReader.js +0 -35
- package/lib/functional/$HeadersReader.js.map +0 -1
- package/lib/functional/$ParameterReader.js +0 -35
- package/lib/functional/$ParameterReader.js.map +0 -1
- package/lib/functional/$QueryReader.js +0 -60
- package/lib/functional/$QueryReader.js.map +0 -1
- package/lib/functional/$camel.js +0 -7
- package/lib/functional/$camel.js.map +0 -1
- package/lib/functional/$generator.js +0 -6
- package/lib/functional/$generator.js.map +0 -1
- package/lib/functional/$pascal.js +0 -7
- package/lib/functional/$pascal.js.map +0 -1
- package/lib/functional/$snake.js +0 -7
- package/lib/functional/$snake.js.map +0 -1
- package/lib/programmers/internal/JSON_SCHEMA_PREFIX.d.ts +0 -1
- package/lib/programmers/internal/JSON_SCHEMA_PREFIX.js +0 -5
- package/lib/programmers/internal/JSON_SCHEMA_PREFIX.js.map +0 -1
- package/lib/programmers/internal/application_alias.d.ts +0 -5
- package/lib/programmers/internal/application_alias.js +0 -67
- package/lib/programmers/internal/application_alias.js.map +0 -1
- package/lib/programmers/internal/application_constant.js +0 -21
- package/lib/programmers/internal/application_constant.js.map +0 -1
- package/lib/programmers/internal/application_default.js +0 -40
- package/lib/programmers/internal/application_default.js.map +0 -1
- package/lib/programmers/internal/application_default_string.js +0 -63
- package/lib/programmers/internal/application_default_string.js.map +0 -1
- package/lib/programmers/internal/application_native.js +0 -33
- package/lib/programmers/internal/application_native.js.map +0 -1
- package/lib/programmers/internal/application_object.js +0 -202
- package/lib/programmers/internal/application_object.js.map +0 -1
- package/lib/programmers/internal/application_schema.js +0 -236
- package/lib/programmers/internal/application_schema.js.map +0 -1
- package/lib/programmers/internal/application_tuple.js +0 -46
- package/lib/programmers/internal/application_tuple.js.map +0 -1
- package/lib/schemas/json/IJsonComponents.d.ts +0 -18
- package/lib/schemas/json/IJsonComponents.js.map +0 -1
- package/lib/schemas/json/IJsonSchema.d.ts +0 -88
- package/lib/schemas/json/IJsonSchema.js.map +0 -1
- package/lib/utils/NamingConvention.d.ts +0 -5
- package/lib/utils/NamingConvention.js.map +0 -1
- package/lib/utils/RandomGenerator.d.ts +0 -1
- package/lib/utils/RandomGenerator.js +0 -66
- package/lib/utils/RandomGenerator.js.map +0 -1
- package/lib/utils/StringUtil.d.ts +0 -3
- package/lib/utils/StringUtil.js +0 -10
- package/lib/utils/StringUtil.js.map +0 -1
- package/src/functional/$HeadersReader.ts +0 -37
- package/src/functional/$ParameterReader.ts +0 -40
- package/src/functional/$QueryReader.ts +0 -65
- package/src/functional/$camel.ts +0 -8
- package/src/functional/$generator.ts +0 -6
- package/src/functional/$pascal.ts +0 -8
- package/src/functional/$snake.ts +0 -8
- package/src/programmers/internal/JSON_SCHEMA_PREFIX.ts +0 -1
- package/src/programmers/internal/application_alias.ts +0 -74
- package/src/programmers/internal/application_constant.ts +0 -25
- package/src/programmers/internal/application_default.ts +0 -17
- package/src/programmers/internal/application_default_string.ts +0 -33
- package/src/programmers/internal/application_native.ts +0 -34
- package/src/programmers/internal/application_object.ts +0 -183
- package/src/programmers/internal/application_schema.ts +0 -165
- package/src/programmers/internal/application_tuple.ts +0 -54
- package/src/schemas/json/IJsonComponents.ts +0 -19
- package/src/schemas/json/IJsonSchema.ts +0 -122
- package/src/utils/NamingConvention.ts +0 -87
- package/src/utils/RandomGenerator.ts +0 -83
- package/src/utils/StringUtil.ts +0 -4
- /package/lib/functional/{$HeadersReader.d.ts → is.d.ts} +0 -0
- /package/lib/{functional/$ParameterReader.d.ts → programmers/internal/application_plugin.d.ts} +0 -0
- /package/lib/{functional/$QueryReader.d.ts → programmers/internal/application_v30_alias.d.ts} +0 -0
- /package/lib/{functional/$camel.d.ts → programmers/internal/application_v30_constant.d.ts} +0 -0
- /package/lib/{functional/$generator.d.ts → programmers/internal/application_v30_native.d.ts} +0 -0
- /package/lib/{functional/$pascal.d.ts → programmers/internal/application_v30_object.d.ts} +0 -0
- /package/lib/{functional/$snake.d.ts → programmers/internal/application_v30_schema.d.ts} +0 -0
- /package/lib/programmers/internal/{application_constant.d.ts → application_v30_tuple.d.ts} +0 -0
- /package/lib/programmers/internal/{application_default.d.ts → application_v31_alias.d.ts} +0 -0
- /package/lib/programmers/internal/{application_default_string.d.ts → application_v31_constant.d.ts} +0 -0
- /package/lib/programmers/internal/{application_native.d.ts → application_v31_native.d.ts} +0 -0
- /package/lib/programmers/internal/{application_object.d.ts → application_v31_object.d.ts} +0 -0
- /package/lib/programmers/internal/{application_schema.d.ts → application_v31_schema.d.ts} +0 -0
- /package/lib/programmers/internal/{application_tuple.d.ts → application_v31_tuple.d.ts} +0 -0
package/lib/http.d.ts
CHANGED
|
@@ -1,40 +1,131 @@
|
|
|
1
1
|
import { Atomic } from "./typings/Atomic";
|
|
2
2
|
import { IValidation } from "./IValidation";
|
|
3
3
|
import { Resolved } from "./Resolved";
|
|
4
|
+
import { TypeGuardError } from "./TypeGuardError";
|
|
4
5
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* URL query decoder.
|
|
6
|
+
* Form data decoder.
|
|
8
7
|
*
|
|
9
|
-
* `typia.http.
|
|
10
|
-
*
|
|
11
|
-
*
|
|
8
|
+
* `typia.http.formData()` is a function decoding `FormData` instance, with
|
|
9
|
+
* automatic type casting to the expected type. When roperty type be defined
|
|
10
|
+
* as `boolean` or `Blob` type, `typia.http.formData()` will cast the value to
|
|
12
11
|
* the expected type when decoding.
|
|
13
12
|
*
|
|
14
|
-
* By the way, as
|
|
15
|
-
* `typia.http.
|
|
16
|
-
* following those restrictions, compilation errors would be occured.
|
|
13
|
+
* By the way, as `FormData` is not enough to express complex data structures,
|
|
14
|
+
* `typia.http.formData()` function has some limitations. If target type `T` is
|
|
15
|
+
* not following those restrictions, compilation errors would be occured.
|
|
17
16
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
17
|
+
* 1. Type `T` must be an object type
|
|
18
|
+
* 2. Do not allow dynamic property
|
|
19
|
+
* 3. Only `boolean`, `bigint`, `number`, `string`, `Blob`, `File` or their array types are allowed
|
|
20
|
+
* 4. By the way, union type never be not allowed
|
|
22
21
|
*
|
|
23
|
-
* Also, `typia.http.
|
|
24
|
-
* value. Therefore, if you can't sure that input data is following the
|
|
25
|
-
* it would better to call one of below functions intead.
|
|
22
|
+
* Also, `typia.http.formData()` function does not perform validation about the
|
|
23
|
+
* decoded value. Therefore, if you can't sure that input data is following the
|
|
24
|
+
* `T` type, it would better to call one of below functions intead.
|
|
26
25
|
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
26
|
+
* @template T Expected type of decoded value
|
|
27
|
+
* @param input FormData instance
|
|
28
|
+
* @returns Decoded form FormData
|
|
29
|
+
*
|
|
30
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
31
|
+
*/
|
|
32
|
+
declare function formData<T extends object>(input: FormData): Resolved<T>;
|
|
33
|
+
declare const formDataPure: typeof formData;
|
|
34
|
+
export { formDataPure as formData };
|
|
35
|
+
/**
|
|
36
|
+
* Form data decoder with type assertion.
|
|
37
|
+
*
|
|
38
|
+
* `typia.http.assertFormData()` is a function decoding `FormData` instance, with
|
|
39
|
+
* automatic type casting to the expected type. When roperty type be defined
|
|
40
|
+
* as `boolean` or `Blob` type, `typia.http.assertFormData()` will cast the value
|
|
41
|
+
* to the expected type when decoding.
|
|
42
|
+
*
|
|
43
|
+
* Also, after decoding, `typia.http.assertFormData()` performs type assertion to
|
|
44
|
+
* the decoded value by combining with {@link assert} function. Therefore, when
|
|
45
|
+
* the decoded value is not following the `T` type, {@link TypeGuardError} or
|
|
46
|
+
* custom error generated by *errorFactory* would be thrown.
|
|
47
|
+
*
|
|
48
|
+
* By the way, as `FormData` is not enough to express complex data structures,
|
|
49
|
+
* `typia.http.assertFormData()` function has some limitations. If target type `T`
|
|
50
|
+
* is not following those restrictions, compilation errors would be occured.
|
|
51
|
+
*
|
|
52
|
+
* 1. Type `T` must be an object type
|
|
53
|
+
* 2. Do not allow dynamic property
|
|
54
|
+
* 3. Only `boolean`, `bigint`, `number`, `string`, `Blob`, `File` or their array types are allowed
|
|
55
|
+
* 4. By the way, union type never be not allowed
|
|
30
56
|
*
|
|
31
57
|
* @template T Expected type of decoded value
|
|
32
|
-
* @param input
|
|
33
|
-
* @
|
|
58
|
+
* @param input FormData instance
|
|
59
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
60
|
+
* @returns Decoded form FormData
|
|
61
|
+
*
|
|
62
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
63
|
+
*/
|
|
64
|
+
declare function assertFormData<T extends object>(input: FormData, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): Resolved<T>;
|
|
65
|
+
declare const assertFormDataPure: typeof assertFormData;
|
|
66
|
+
export { assertFormDataPure as assertFormData };
|
|
67
|
+
/**
|
|
68
|
+
* Form data decoder with type checking.
|
|
69
|
+
*
|
|
70
|
+
* `typia.http.isFormData()` is a function decoding `FormData` instance, with
|
|
71
|
+
* automatic type casting to the expected type. When roperty type be defined
|
|
72
|
+
* as `boolean` or `Blob` type, `typia.http.isFormData()` will cast the value
|
|
73
|
+
* to the expected type when decoding.
|
|
74
|
+
*
|
|
75
|
+
* Also, after decoding, `typia.http.isFormData()` performs type checking to the
|
|
76
|
+
* decoded value by combining with {@link is} function. Therefore, when the
|
|
77
|
+
* decoded value is not following the `T` type, `null` value would be returned.
|
|
78
|
+
*
|
|
79
|
+
* By the way, as `FormData` is not enough to express complex data structures,
|
|
80
|
+
* `typia.http.isFormData()` function has some limitations. If target type `T` is
|
|
81
|
+
* not following those restrictions, compilation errors would be occured.
|
|
82
|
+
*
|
|
83
|
+
* 1. Type `T` must be an object type
|
|
84
|
+
* 2. Do not allow dynamic property
|
|
85
|
+
* 3. Only `boolean`, `bigint`, `number`, `string`, `Blob`, `File` or their array types are allowed
|
|
86
|
+
* 4. By the way, union type never be not allowed
|
|
87
|
+
*
|
|
88
|
+
* @template T Expected type of decoded value
|
|
89
|
+
* @param input FormData instance
|
|
90
|
+
* @returns Decoded form FormData or `null` value
|
|
91
|
+
*
|
|
92
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
93
|
+
*/
|
|
94
|
+
declare function isFormData<T extends object>(input: FormData): Resolved<T> | null;
|
|
95
|
+
declare const isFormDataPure: typeof isFormData;
|
|
96
|
+
export { isFormDataPure as isFormData };
|
|
97
|
+
/**
|
|
98
|
+
* Form data decoder with type validation.
|
|
99
|
+
*
|
|
100
|
+
* `typia.http.validateFormData()` is a function decoding `FormData` instance,
|
|
101
|
+
* with automatic type casting to the expected type. When roperty type be defined
|
|
102
|
+
* as `boolean` or `Blob` type, `typia.http.validateFormData()` will cast the
|
|
103
|
+
* value to the expected type when decoding.
|
|
104
|
+
*
|
|
105
|
+
* Also, after decoding, `typia.http.validateFormData()` performs type validation
|
|
106
|
+
* to the decoded value by combining with {@link validate} function. Therefore,
|
|
107
|
+
* when the decoded value is not following the `T` type,
|
|
108
|
+
* {@link IValidation.IFailure} would be returned. Otherwise,
|
|
109
|
+
* x@xxxx IValidation.ISuccess} would be returned.
|
|
110
|
+
*
|
|
111
|
+
* By the way, as `FormData` is not enough to express complex data structures,
|
|
112
|
+
* `typia.http.validateFormData()` function has some limitations. If target type
|
|
113
|
+
* `T` is not following those restrictions, compilation errors would be occured.
|
|
114
|
+
*
|
|
115
|
+
* 1. Type `T` must be an object type
|
|
116
|
+
* 2. Do not allow dynamic property
|
|
117
|
+
* 3. Only `boolean`, `bigint`, `number`, `string`, `Blob`, `File` or their array types are allowed
|
|
118
|
+
* 4. By the way, union type never be not allowed
|
|
119
|
+
*
|
|
120
|
+
* @template T Expected type of decoded value
|
|
121
|
+
* @param input FormData instance
|
|
122
|
+
* @returns Validation result with decoded form FormData
|
|
34
123
|
*
|
|
35
124
|
* @author Jeongho Nam - https://github.com/samchon
|
|
36
125
|
*/
|
|
37
|
-
|
|
126
|
+
declare function validateFormData<T extends object>(input: FormData): IValidation<Resolved<T>>;
|
|
127
|
+
declare const validateFormDataPure: typeof validateFormData;
|
|
128
|
+
export { validateFormDataPure as validateFormData };
|
|
38
129
|
/**
|
|
39
130
|
* URL query decoder.
|
|
40
131
|
*
|
|
@@ -66,38 +157,9 @@ export declare function query(): never;
|
|
|
66
157
|
*
|
|
67
158
|
* @author Jeongho Nam - https://github.com/samchon
|
|
68
159
|
*/
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
*
|
|
73
|
-
* URL query decoder with type assertion.
|
|
74
|
-
*
|
|
75
|
-
* `typia.http.assertQuery()` is a function decoding a query string or an
|
|
76
|
-
* `URLSearchParams` instance, with automatic type casting to the expected type.
|
|
77
|
-
* When property type be defined as `boolean` or `number` type,
|
|
78
|
-
* `typia.http.assertQuery()` will cast the value to the expected type when decoding.
|
|
79
|
-
*
|
|
80
|
-
* Also, after decoding, `typia.http.assertQuery()` performs type assertion to the
|
|
81
|
-
* decoded value by combining with {@link assert} function. Therefore, when the
|
|
82
|
-
* decoded value is not following the `T` type, {@link TypeGuardError} would be
|
|
83
|
-
* thrown.
|
|
84
|
-
*
|
|
85
|
-
* By the way, as URL query is not enough to express complex data structures,
|
|
86
|
-
* `typia.http.assertQuery()` function has some limitations. If target type `T` is
|
|
87
|
-
* notfollowing those restrictions, compilation errors would be occured.
|
|
88
|
-
*
|
|
89
|
-
* 1. Type `T` must be an object type
|
|
90
|
-
* 2. Do not allow dynamic property
|
|
91
|
-
* 3. Only `boolean`, `bigint`, `number`, `string` or their array types are allowed
|
|
92
|
-
* 4. By the way, union type never be not allowed
|
|
93
|
-
*
|
|
94
|
-
* @template T Expected type of decoded value
|
|
95
|
-
* @param input Query string or URLSearchParams instance
|
|
96
|
-
* @returns Decoded query object
|
|
97
|
-
*
|
|
98
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
99
|
-
*/
|
|
100
|
-
export declare function assertQuery(): never;
|
|
160
|
+
declare function query<T extends object>(input: string | URLSearchParams): Resolved<T>;
|
|
161
|
+
declare const queryPure: typeof query;
|
|
162
|
+
export { queryPure as query };
|
|
101
163
|
/**
|
|
102
164
|
* URL query decoder with type assertion.
|
|
103
165
|
*
|
|
@@ -108,8 +170,8 @@ export declare function assertQuery(): never;
|
|
|
108
170
|
*
|
|
109
171
|
* Also, after decoding, `typia.http.assertQuery()` performs type assertion to the
|
|
110
172
|
* decoded value by combining with {@link assert} function. Therefore, when the
|
|
111
|
-
* decoded value is not following the `T` type, {@link TypeGuardError}
|
|
112
|
-
* thrown.
|
|
173
|
+
* decoded value is not following the `T` type, {@link TypeGuardError} or custom
|
|
174
|
+
* error generated by *errorFactory* would be thrown.
|
|
113
175
|
*
|
|
114
176
|
* By the way, as URL query is not enough to express complex data structures,
|
|
115
177
|
* `typia.http.assertQuery()` function has some limitations. If target type `T` is
|
|
@@ -122,14 +184,15 @@ export declare function assertQuery(): never;
|
|
|
122
184
|
*
|
|
123
185
|
* @template T Expected type of decoded value
|
|
124
186
|
* @param input Query string or URLSearchParams instance
|
|
187
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
125
188
|
* @returns Decoded query object
|
|
126
189
|
*
|
|
127
190
|
* @author Jeongho Nam - https://github.com/samchon
|
|
128
191
|
*/
|
|
129
|
-
|
|
192
|
+
declare function assertQuery<T extends object>(input: string | URLSearchParams, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): Resolved<T>;
|
|
193
|
+
declare const assertQueryPure: typeof assertQuery;
|
|
194
|
+
export { assertQueryPure as assertQuery };
|
|
130
195
|
/**
|
|
131
|
-
* > You must configure the generic argument `T`.
|
|
132
|
-
*
|
|
133
196
|
* URL query decoder with type checking.
|
|
134
197
|
*
|
|
135
198
|
* `typia.http.isQuery()` is a function decoding a query string or an
|
|
@@ -156,66 +219,9 @@ export declare function assertQuery<T extends object>(input: string | URLSearchP
|
|
|
156
219
|
*
|
|
157
220
|
* @author Jeongho Nam - https://github.com/samchon
|
|
158
221
|
*/
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
*
|
|
163
|
-
* `typia.http.isQuery()` is a function decoding a query string or an
|
|
164
|
-
* `URLSearchParams` instance, with automatic type casting to the expected type.
|
|
165
|
-
* When property type be defined as `boolean` or `number` type,
|
|
166
|
-
* `typia.http.isQuery()` will cast the value to the expected type when decoding.
|
|
167
|
-
*
|
|
168
|
-
* Also, after decoding, `typia.http.isQuery()` performs type checking to the
|
|
169
|
-
* decoded value by combining with {@link is} function. Therefore, when the
|
|
170
|
-
* decoded value is not following the `T` type, `null` value would be returned.
|
|
171
|
-
*
|
|
172
|
-
* By the way, as URL query is not enough to express complex data structures,
|
|
173
|
-
* `typia.http.isQuery()` function has some limitations. If target type `T` is
|
|
174
|
-
* notfollowing those restrictions, compilation errors would be occured.
|
|
175
|
-
*
|
|
176
|
-
* 1. Type `T` must be an object type
|
|
177
|
-
* 2. Do not allow dynamic property
|
|
178
|
-
* 3. Only `boolean`, `bigint`, `number`, `string` or their array types are allowed
|
|
179
|
-
* 4. By the way, union type never be not allowed
|
|
180
|
-
*
|
|
181
|
-
* @template T Expected type of decoded value
|
|
182
|
-
* @param input Query string or URLSearchParams instance
|
|
183
|
-
* @returns Decoded query object or `null` value
|
|
184
|
-
*
|
|
185
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
186
|
-
*/
|
|
187
|
-
export declare function isQuery<T extends object>(input: string | URLSearchParams): Resolved<T> | null;
|
|
188
|
-
/**
|
|
189
|
-
* > You must configure the generic argument `T`.
|
|
190
|
-
*
|
|
191
|
-
* URL query decoder with type validation.
|
|
192
|
-
*
|
|
193
|
-
* `typia.http.validateQuery()` is a function decoding a query string or an
|
|
194
|
-
* `URLSearchParams` instance, with automatic type casting to the expected type.
|
|
195
|
-
* When property type be defined as `boolean` or `number` type,
|
|
196
|
-
* `typia.http.validateQuery()` will cast the value to the expected type when decoding.
|
|
197
|
-
*
|
|
198
|
-
* Also, after decoding, `typia.http.validateQuery()` performs type validation to the
|
|
199
|
-
* decoded value by combining with {@link validate} function. Therefore, when the
|
|
200
|
-
* decoded value is not following the `T` type, {@link IValidation.IFailure} would
|
|
201
|
-
* be returned. Otherwise, {@link IValidation.ISuccess} would be returned.
|
|
202
|
-
*
|
|
203
|
-
* By the way, as URL query is not enough to express complex data structures,
|
|
204
|
-
* `typia.http.validateQuery()` function has some limitations. If target type `T` is
|
|
205
|
-
* notfollowing those restrictions, compilation errors would be occured.
|
|
206
|
-
*
|
|
207
|
-
* 1. Type `T` must be an object type
|
|
208
|
-
* 2. Do not allow dynamic property
|
|
209
|
-
* 3. Only `boolean`, `bigint`, `number`, `string` or their array types are allowed
|
|
210
|
-
* 4. By the way, union type never be not allowed
|
|
211
|
-
*
|
|
212
|
-
* @template T Expected type of decoded value
|
|
213
|
-
* @param input Query string or URLSearchParams instance
|
|
214
|
-
* @returns Validation result with decoded query object
|
|
215
|
-
*
|
|
216
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
217
|
-
*/
|
|
218
|
-
export declare function validateQuery(): never;
|
|
222
|
+
declare function isQuery<T extends object>(input: string | URLSearchParams): Resolved<T> | null;
|
|
223
|
+
declare const isQueryPure: typeof isQuery;
|
|
224
|
+
export { isQueryPure as isQuery };
|
|
219
225
|
/**
|
|
220
226
|
* URL query decoder with type validation.
|
|
221
227
|
*
|
|
@@ -244,10 +250,10 @@ export declare function validateQuery(): never;
|
|
|
244
250
|
*
|
|
245
251
|
* @author Jeongho Nam - https://github.com/samchon
|
|
246
252
|
*/
|
|
247
|
-
|
|
253
|
+
declare function validateQuery<T extends object>(input: string | URLSearchParams): IValidation<Resolved<T>>;
|
|
254
|
+
declare const validateQueryPure: typeof validateQuery;
|
|
255
|
+
export { validateQueryPure as validateQuery };
|
|
248
256
|
/**
|
|
249
|
-
* > You must configure the generic argument `T`.
|
|
250
|
-
*
|
|
251
257
|
* Headers decoder (for express and fastify).
|
|
252
258
|
*
|
|
253
259
|
* `typia.http.headers()` is a function decoding an header instance, with automatic
|
|
@@ -299,63 +305,10 @@ export declare function validateQuery<T extends object>(input: string | URLSearc
|
|
|
299
305
|
*
|
|
300
306
|
* @author Jeongho Nam - https://github.com/samchon
|
|
301
307
|
*/
|
|
302
|
-
|
|
308
|
+
declare function headers<T extends object>(input: Record<string, string | string[] | undefined>): Resolved<T>;
|
|
309
|
+
declare const headersPure: typeof headers;
|
|
310
|
+
export { headersPure as headers };
|
|
303
311
|
/**
|
|
304
|
-
* Headers decoder (for express and fastify).
|
|
305
|
-
*
|
|
306
|
-
* `typia.http.headers()` is a function decoding an header instance, with automatic
|
|
307
|
-
* type casting to the expected type. When property type be defined as `boolean` or
|
|
308
|
-
* `number` type, `typia.http.headers()` will cast the value to the expected type.
|
|
309
|
-
*
|
|
310
|
-
* By the way, as HTTP headers are not enough to express complex data structures,
|
|
311
|
-
* `typia.http.headers()` function has some limitations. If target type `T` is not
|
|
312
|
-
* following those restrictions, compilation errors would be occured.
|
|
313
|
-
*
|
|
314
|
-
* 1. Type `T` must be an object type
|
|
315
|
-
* 2. Do not allow dynamic property
|
|
316
|
-
* 3. Property key must be lower case
|
|
317
|
-
* 4. Property value cannot be `null`, but `undefined` is possible
|
|
318
|
-
* 5. Only `boolean`, `bigint`, `number`, `string` or their array types are allowed
|
|
319
|
-
* 6. By the way, union type never be not allowed
|
|
320
|
-
* 7. Property `set-cookie` must be array type
|
|
321
|
-
* 8. Those properties cannot be array type
|
|
322
|
-
* - age
|
|
323
|
-
* - authorization
|
|
324
|
-
* - content-length
|
|
325
|
-
* - content-type
|
|
326
|
-
* - etag
|
|
327
|
-
* - expires
|
|
328
|
-
* - from
|
|
329
|
-
* - host
|
|
330
|
-
* - if-modified-since
|
|
331
|
-
* - if-unmodified-since
|
|
332
|
-
* - last-modified
|
|
333
|
-
* - location
|
|
334
|
-
* - max-forwards
|
|
335
|
-
* - proxy-authorization
|
|
336
|
-
* - referer
|
|
337
|
-
* - retry-after
|
|
338
|
-
* - server
|
|
339
|
-
* - user-agent
|
|
340
|
-
*
|
|
341
|
-
* Also, `typia.http.headers()` function does not perform validation about the decoded
|
|
342
|
-
* value. Therefore, if you can't sure that input data is following the `T` type,
|
|
343
|
-
* it would better to call one of below functions intead.
|
|
344
|
-
*
|
|
345
|
-
* - {@link assertHeaders}
|
|
346
|
-
* - {@link isHeaders}
|
|
347
|
-
* - {@link validateHeaders}
|
|
348
|
-
*
|
|
349
|
-
* @template T Expected type of decoded value
|
|
350
|
-
* @param input Query string or URLSearchParams instance
|
|
351
|
-
* @returns Decoded headers object
|
|
352
|
-
*
|
|
353
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
354
|
-
*/
|
|
355
|
-
export declare function headers<T extends object>(input: Record<string, string | string[] | undefined>): Resolved<T>;
|
|
356
|
-
/**
|
|
357
|
-
* > You must configure the generic argument `T`.
|
|
358
|
-
*
|
|
359
312
|
* Headers decoder with type assertion (for express and fastify).
|
|
360
313
|
*
|
|
361
314
|
* `typia.http.assertHeaders()` is a function decoding an header instance, with
|
|
@@ -365,8 +318,8 @@ export declare function headers<T extends object>(input: Record<string, string |
|
|
|
365
318
|
*
|
|
366
319
|
* Also, after decoding, `typia.http.assertHeaders()` performs type assertion to the
|
|
367
320
|
* decoded value by combining with {@link assert} function. Therefore, when the
|
|
368
|
-
* decoded value is not following the `T` type, {@link TypeGuardError}
|
|
369
|
-
* thrown.
|
|
321
|
+
* decoded value is not following the `T` type, {@link TypeGuardError} or custom
|
|
322
|
+
* error generated by *errorFactory* would be thrown.
|
|
370
323
|
*
|
|
371
324
|
* By the way, as HTTP headers are not enough to express complex data structures,
|
|
372
325
|
* `typia.http.headers()` function has some limitations. If target type `T` is not
|
|
@@ -401,62 +354,14 @@ export declare function headers<T extends object>(input: Record<string, string |
|
|
|
401
354
|
*
|
|
402
355
|
* @template T Expected type of decoded value
|
|
403
356
|
* @param input Query string or URLSearchParams instance
|
|
357
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
404
358
|
* @returns Decoded headers object
|
|
405
359
|
*
|
|
406
360
|
* @author Jeongho Nam - https://github.com/samchon
|
|
407
361
|
*/
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
*
|
|
412
|
-
* `typia.http.assertHeaders()` is a function decoding an header instance, with
|
|
413
|
-
* automatic type casting to the expected type. When property type be defined as
|
|
414
|
-
* `boolean` or `number` type, `typia.http.headers()` will cast the value to the
|
|
415
|
-
* expected type.
|
|
416
|
-
*
|
|
417
|
-
* Also, after decoding, `typia.http.assertHeaders()` performs type assertion to the
|
|
418
|
-
* decoded value by combining with {@link assert} function. Therefore, when the
|
|
419
|
-
* decoded value is not following the `T` type, {@link TypeGuardError} would be
|
|
420
|
-
* thrown.
|
|
421
|
-
*
|
|
422
|
-
* By the way, as HTTP headers are not enough to express complex data structures,
|
|
423
|
-
* `typia.http.headers()` function has some limitations. If target type `T` is not
|
|
424
|
-
* following those restrictions, compilation errors would be occured.
|
|
425
|
-
*
|
|
426
|
-
* 1. Type `T` must be an object type
|
|
427
|
-
* 2. Do not allow dynamic property
|
|
428
|
-
* 3. Property key must be lower case
|
|
429
|
-
* 4. Property value cannot be `null`, but `undefined` is possible
|
|
430
|
-
* 5. Only `boolean`, `bigint`, `number`, `string` or their array types are allowed
|
|
431
|
-
* 6. By the way, union type never be not allowed
|
|
432
|
-
* 7. Property `set-cookie` must be array type
|
|
433
|
-
* 8. Those properties cannot be array type
|
|
434
|
-
* - age
|
|
435
|
-
* - authorization
|
|
436
|
-
* - content-length
|
|
437
|
-
* - content-type
|
|
438
|
-
* - etag
|
|
439
|
-
* - expires
|
|
440
|
-
* - from
|
|
441
|
-
* - host
|
|
442
|
-
* - if-modified-since
|
|
443
|
-
* - if-unmodified-since
|
|
444
|
-
* - last-modified
|
|
445
|
-
* - location
|
|
446
|
-
* - max-forwards
|
|
447
|
-
* - proxy-authorization
|
|
448
|
-
* - referer
|
|
449
|
-
* - retry-after
|
|
450
|
-
* - server
|
|
451
|
-
* - user-agent
|
|
452
|
-
*
|
|
453
|
-
* @template T Expected type of decoded value
|
|
454
|
-
* @param input Query string or URLSearchParams instance
|
|
455
|
-
* @returns Decoded headers object
|
|
456
|
-
*
|
|
457
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
458
|
-
*/
|
|
459
|
-
export declare function assertHeaders<T extends object>(input: Record<string, string | string[] | undefined>): Resolved<T>;
|
|
362
|
+
declare function assertHeaders<T extends object>(input: Record<string, string | string[] | undefined>, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): Resolved<T>;
|
|
363
|
+
declare const assertHeadersPure: typeof assertHeaders;
|
|
364
|
+
export { assertHeadersPure as assertHeaders };
|
|
460
365
|
/**
|
|
461
366
|
* > You must configure the generic argument `T`.
|
|
462
367
|
*
|
|
@@ -508,20 +413,21 @@ export declare function assertHeaders<T extends object>(input: Record<string, st
|
|
|
508
413
|
*
|
|
509
414
|
* @author Jeongho Nam - https://github.com/samchon
|
|
510
415
|
*/
|
|
511
|
-
|
|
416
|
+
declare function isHeaders<T extends object>(input: Record<string, string | string[] | undefined>): Resolved<T> | null;
|
|
417
|
+
declare const isHeadersPure: typeof isHeaders;
|
|
418
|
+
export { isHeadersPure as isHeaders };
|
|
512
419
|
/**
|
|
513
|
-
*
|
|
514
|
-
*
|
|
515
|
-
* Headers decoder with type checking (for express and fastify).
|
|
420
|
+
* Headers decoder with type validation (for express and fastify).
|
|
516
421
|
*
|
|
517
|
-
* `typia.http.
|
|
422
|
+
* `typia.http.validateHeaders()` is a function decoding an header instance, with
|
|
518
423
|
* automatic type casting to the expected type. When property type be defined as
|
|
519
424
|
* `boolean` or `number` type, `typia.http.headers()` will cast the value to the
|
|
520
425
|
* expected type.
|
|
521
426
|
*
|
|
522
|
-
* Also, after decoding, `typia.http.
|
|
523
|
-
* decoded value by combining with {@link
|
|
524
|
-
* decoded value is not following the `T` type,
|
|
427
|
+
* Also, after decoding, `typia.http.validateHeaders()` performs type assertion to the
|
|
428
|
+
* decoded value by combining with {@link validate} function. Therefore, when the
|
|
429
|
+
* decoded value is not following the `T` type, {@link IValidation.IError} would be
|
|
430
|
+
* returned. Otherwise, {@link IValidation.ISuccess} be returned.
|
|
525
431
|
*
|
|
526
432
|
* By the way, as HTTP headers are not enough to express complex data structures,
|
|
527
433
|
* `typia.http.headers()` function has some limitations. If target type `T` is not
|
|
@@ -556,149 +462,117 @@ export declare function isHeaders(): never;
|
|
|
556
462
|
*
|
|
557
463
|
* @template T Expected type of decoded value
|
|
558
464
|
* @param input Query string or URLSearchParams instance
|
|
559
|
-
* @returns Decoded headers object
|
|
465
|
+
* @returns Decoded headers object
|
|
560
466
|
*
|
|
561
467
|
* @author Jeongho Nam - https://github.com/samchon
|
|
562
468
|
*/
|
|
563
|
-
|
|
469
|
+
declare function validateHeaders<T extends object>(input: Record<string, string | string[] | undefined>): IValidation<Resolved<T>>;
|
|
470
|
+
declare const validateHeadersPure: typeof validateHeaders;
|
|
471
|
+
export { validateHeadersPure as validateHeaders };
|
|
564
472
|
/**
|
|
565
|
-
*
|
|
473
|
+
* URL path parameter decoder.
|
|
566
474
|
*
|
|
567
|
-
*
|
|
475
|
+
* `typia.http.parameter()` is a function decoding a path parameter, with automatic
|
|
476
|
+
* type casting to the expected type. When type `T` has beeen defined as `boolean` or
|
|
477
|
+
* `number` type, `typia.http.parameter()` will cast the value to the expected type.
|
|
568
478
|
*
|
|
569
|
-
* `typia.http.
|
|
570
|
-
*
|
|
571
|
-
*
|
|
572
|
-
* expected type.
|
|
479
|
+
* Also, `typia.http.parameter()` performs type assertion to the decoded value by
|
|
480
|
+
* combining with {@link assert} function. Therefore, when the decoded value is not
|
|
481
|
+
* following the `T` type, {@link TypeGuardError} would be thrown.
|
|
573
482
|
*
|
|
574
|
-
*
|
|
575
|
-
*
|
|
576
|
-
*
|
|
577
|
-
|
|
483
|
+
* @template T Expected type of decoded value
|
|
484
|
+
* @param input Path parameter string
|
|
485
|
+
* @returns Decoded path parameter value
|
|
486
|
+
*/
|
|
487
|
+
declare function parameter<T extends Atomic.Type | null>(input: string): Resolved<T>;
|
|
488
|
+
declare const parameterPure: typeof parameter;
|
|
489
|
+
export { parameterPure as parameter };
|
|
490
|
+
/**
|
|
491
|
+
* Creates a reusable {@link formdata} function.
|
|
578
492
|
*
|
|
579
|
-
*
|
|
580
|
-
*
|
|
581
|
-
*
|
|
493
|
+
* @danger You must configure the generic argument `T`
|
|
494
|
+
* @template T The type of the formdata object
|
|
495
|
+
* @throws compile error
|
|
582
496
|
*
|
|
583
|
-
*
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
*
|
|
588
|
-
* 6. By the way, union type never be not allowed
|
|
589
|
-
* 7. Property `set-cookie` must be array type
|
|
590
|
-
* 8. Those properties cannot be array type
|
|
591
|
-
* - age
|
|
592
|
-
* - authorization
|
|
593
|
-
* - content-length
|
|
594
|
-
* - content-type
|
|
595
|
-
* - etag
|
|
596
|
-
* - expires
|
|
597
|
-
* - from
|
|
598
|
-
* - host
|
|
599
|
-
* - if-modified-since
|
|
600
|
-
* - if-unmodified-since
|
|
601
|
-
* - last-modified
|
|
602
|
-
* - location
|
|
603
|
-
* - max-forwards
|
|
604
|
-
* - proxy-authorization
|
|
605
|
-
* - referer
|
|
606
|
-
* - retry-after
|
|
607
|
-
* - server
|
|
608
|
-
* - user-agent
|
|
497
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
498
|
+
*/
|
|
499
|
+
declare function createFormData(): never;
|
|
500
|
+
/**
|
|
501
|
+
* Creates a reusable {@link formdata} function.
|
|
609
502
|
*
|
|
610
|
-
* @template T
|
|
611
|
-
* @
|
|
612
|
-
* @returns Decoded headers object
|
|
503
|
+
* @template T The type of the formdata object
|
|
504
|
+
* @returns A reusable `formdata` function
|
|
613
505
|
*
|
|
614
506
|
* @author Jeongho Nam - https://github.com/samchon
|
|
615
507
|
*/
|
|
616
|
-
|
|
508
|
+
declare function createFormData<T extends object>(): (input: FormData) => T;
|
|
509
|
+
declare const createFormDataPure: typeof createFormData;
|
|
510
|
+
export { createFormDataPure as createFormData };
|
|
617
511
|
/**
|
|
618
|
-
*
|
|
512
|
+
* Creates a reusable {@link assertFormData} function.
|
|
619
513
|
*
|
|
620
|
-
*
|
|
621
|
-
*
|
|
622
|
-
*
|
|
623
|
-
*
|
|
514
|
+
* @danger You must configure the generic argument `T`
|
|
515
|
+
* @template T The type of the formdata object
|
|
516
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
517
|
+
* @throws compile error
|
|
624
518
|
*
|
|
625
|
-
*
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
519
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
520
|
+
*/
|
|
521
|
+
declare function createAssertFormData(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): never;
|
|
522
|
+
/**
|
|
523
|
+
* Creates a reusable {@link assertFormData} function.
|
|
629
524
|
*
|
|
630
|
-
*
|
|
631
|
-
*
|
|
632
|
-
*
|
|
525
|
+
* @template T The type of the formdata object
|
|
526
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
527
|
+
* @returns A reusable `assertFormData` function
|
|
633
528
|
*
|
|
634
|
-
*
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
*
|
|
641
|
-
* 8. Those properties cannot be array type
|
|
642
|
-
* - age
|
|
643
|
-
* - authorization
|
|
644
|
-
* - content-length
|
|
645
|
-
* - content-type
|
|
646
|
-
* - etag
|
|
647
|
-
* - expires
|
|
648
|
-
* - from
|
|
649
|
-
* - host
|
|
650
|
-
* - if-modified-since
|
|
651
|
-
* - if-unmodified-since
|
|
652
|
-
* - last-modified
|
|
653
|
-
* - location
|
|
654
|
-
* - max-forwards
|
|
655
|
-
* - proxy-authorization
|
|
656
|
-
* - referer
|
|
657
|
-
* - retry-after
|
|
658
|
-
* - server
|
|
659
|
-
* - user-agent
|
|
529
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
530
|
+
*/
|
|
531
|
+
declare function createAssertFormData<T extends object>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: FormData) => T;
|
|
532
|
+
declare const createAssertFormDataPure: typeof createAssertFormData;
|
|
533
|
+
export { createAssertFormDataPure as createAssertFormData };
|
|
534
|
+
/**
|
|
535
|
+
* Creates a reusable {@link isFormData} function.
|
|
660
536
|
*
|
|
661
|
-
* @
|
|
662
|
-
* @
|
|
663
|
-
* @
|
|
537
|
+
* @danger You must configure the generic argument `T`
|
|
538
|
+
* @template T The type of the formdata object
|
|
539
|
+
* @throws compile error
|
|
664
540
|
*
|
|
665
541
|
* @author Jeongho Nam - https://github.com/samchon
|
|
666
542
|
*/
|
|
667
|
-
|
|
543
|
+
declare function createIsFormData(): never;
|
|
668
544
|
/**
|
|
669
|
-
*
|
|
545
|
+
* Creates a reusable {@link isFormData} function.
|
|
670
546
|
*
|
|
671
|
-
*
|
|
547
|
+
* @template T The type of the formdata object
|
|
548
|
+
* @returns A reusable `isFormData` function
|
|
672
549
|
*
|
|
673
|
-
*
|
|
674
|
-
|
|
675
|
-
|
|
550
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
551
|
+
*/
|
|
552
|
+
declare function createIsFormData<T extends object>(): (input: FormData) => T | null;
|
|
553
|
+
declare const createIsFormDataPure: typeof createIsFormData;
|
|
554
|
+
export { createIsFormDataPure as createIsFormData };
|
|
555
|
+
/**
|
|
556
|
+
* Creates a reusable {@link validateFormData} function.
|
|
676
557
|
*
|
|
677
|
-
*
|
|
678
|
-
*
|
|
679
|
-
*
|
|
558
|
+
* @danger You must configure the generic argument `T`
|
|
559
|
+
* @template T The type of the formdata object
|
|
560
|
+
* @throws compile error
|
|
680
561
|
*
|
|
681
|
-
* @
|
|
682
|
-
* @param input Path parameter string
|
|
683
|
-
* @returns Decoded path parameter value
|
|
562
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
684
563
|
*/
|
|
685
|
-
|
|
564
|
+
declare function createValidateFormData(): never;
|
|
686
565
|
/**
|
|
687
|
-
*
|
|
688
|
-
*
|
|
689
|
-
* `typia.http.parameter()` is a function decoding a path parameter, with automatic
|
|
690
|
-
* type casting to the expected type. When type `T` has beeen defined as `boolean` or
|
|
691
|
-
* `number` type, `typia.http.parameter()` will cast the value to the expected type.
|
|
566
|
+
* Creates a reusable {@link validateFormData} function.
|
|
692
567
|
*
|
|
693
|
-
*
|
|
694
|
-
*
|
|
695
|
-
* following the `T` type, {@link TypeGuardError} would be thrown.
|
|
568
|
+
* @template T The type of the formdata object
|
|
569
|
+
* @returns A reusable `validateFormData` function
|
|
696
570
|
*
|
|
697
|
-
* @
|
|
698
|
-
* @param input Path parameter string
|
|
699
|
-
* @returns Decoded path parameter value
|
|
571
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
700
572
|
*/
|
|
701
|
-
|
|
573
|
+
declare function createValidateFormData<T extends object>(): (input: FormData) => IValidation<Resolved<T>>;
|
|
574
|
+
declare const createValidateFormDataPure: typeof createValidateFormData;
|
|
575
|
+
export { createValidateFormDataPure as createValidateFormData };
|
|
702
576
|
/**
|
|
703
577
|
* Creates a reusable {@link query} function.
|
|
704
578
|
*
|
|
@@ -708,7 +582,7 @@ export declare function parameter<T extends Atomic.Type | null>(input: string):
|
|
|
708
582
|
*
|
|
709
583
|
* @author Jeongho Nam - https://github.com/samchon
|
|
710
584
|
*/
|
|
711
|
-
|
|
585
|
+
declare function createQuery(): never;
|
|
712
586
|
/**
|
|
713
587
|
* Creates a reusable {@link query} function.
|
|
714
588
|
*
|
|
@@ -717,26 +591,32 @@ export declare function createQuery(): never;
|
|
|
717
591
|
*
|
|
718
592
|
* @author Jeongho Nam - https://github.com/samchon
|
|
719
593
|
*/
|
|
720
|
-
|
|
594
|
+
declare function createQuery<T extends object>(): (input: string | URLSearchParams) => T;
|
|
595
|
+
declare const createQueryPure: typeof createQuery;
|
|
596
|
+
export { createQueryPure as createQuery };
|
|
721
597
|
/**
|
|
722
598
|
* Creates a reusable {@link assertQuery} function.
|
|
723
599
|
*
|
|
724
600
|
* @danger You must configure the generic argument `T`
|
|
725
601
|
* @template T The type of the query object
|
|
602
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
726
603
|
* @throws compile error
|
|
727
604
|
*
|
|
728
605
|
* @author Jeongho Nam - https://github.com/samchon
|
|
729
606
|
*/
|
|
730
|
-
|
|
607
|
+
declare function createAssertQuery(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): never;
|
|
731
608
|
/**
|
|
732
609
|
* Creates a reusable {@link assertQuery} function.
|
|
733
610
|
*
|
|
734
611
|
* @template T The type of the query object
|
|
612
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
735
613
|
* @returns A reusable `assertQuery` function
|
|
736
614
|
*
|
|
737
615
|
* @author Jeongho Nam - https://github.com/samchon
|
|
738
616
|
*/
|
|
739
|
-
|
|
617
|
+
declare function createAssertQuery<T extends object>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: string | URLSearchParams) => T;
|
|
618
|
+
declare const createAssertQueryPure: typeof createAssertQuery;
|
|
619
|
+
export { createAssertQueryPure as createAssertQuery };
|
|
740
620
|
/**
|
|
741
621
|
* Creates a reusable {@link isQuery} function.
|
|
742
622
|
*
|
|
@@ -746,7 +626,7 @@ export declare function createAssertQuery<T extends object>(): (input: string |
|
|
|
746
626
|
*
|
|
747
627
|
* @author Jeongho Nam - https://github.com/samchon
|
|
748
628
|
*/
|
|
749
|
-
|
|
629
|
+
declare function createIsQuery(): never;
|
|
750
630
|
/**
|
|
751
631
|
* Creates a reusable {@link isQuery} function.
|
|
752
632
|
*
|
|
@@ -755,7 +635,9 @@ export declare function createIsQuery(): never;
|
|
|
755
635
|
*
|
|
756
636
|
* @author Jeongho Nam - https://github.com/samchon
|
|
757
637
|
*/
|
|
758
|
-
|
|
638
|
+
declare function createIsQuery<T extends object>(): (input: string | URLSearchParams) => T | null;
|
|
639
|
+
declare const createIsQueryPure: typeof createIsQuery;
|
|
640
|
+
export { createIsQueryPure as createIsQuery };
|
|
759
641
|
/**
|
|
760
642
|
* Creates a reusable {@link validateQuery} function.
|
|
761
643
|
*
|
|
@@ -765,7 +647,7 @@ export declare function createIsQuery<T extends object>(): (input: string | URLS
|
|
|
765
647
|
*
|
|
766
648
|
* @author Jeongho Nam - https://github.com/samchon
|
|
767
649
|
*/
|
|
768
|
-
|
|
650
|
+
declare function createValidateQuery(): never;
|
|
769
651
|
/**
|
|
770
652
|
* Creates a reusable {@link validateQuery} function.
|
|
771
653
|
*
|
|
@@ -774,7 +656,9 @@ export declare function createValidateQuery(): never;
|
|
|
774
656
|
*
|
|
775
657
|
* @author Jeongho Nam - https://github.com/samchon
|
|
776
658
|
*/
|
|
777
|
-
|
|
659
|
+
declare function createValidateQuery<T extends object>(): (input: string | URLSearchParams) => IValidation<Resolved<T>>;
|
|
660
|
+
declare const createValidateQueryPure: typeof createValidateQuery;
|
|
661
|
+
export { createValidateQueryPure as createValidateQuery };
|
|
778
662
|
/**
|
|
779
663
|
* Creates a reusable {@link headers} function.
|
|
780
664
|
*
|
|
@@ -784,7 +668,7 @@ export declare function createValidateQuery<T extends object>(): (input: string
|
|
|
784
668
|
*
|
|
785
669
|
* @author Jeongho Nam - https://github.com/samchon
|
|
786
670
|
*/
|
|
787
|
-
|
|
671
|
+
declare function createHeaders(): never;
|
|
788
672
|
/**
|
|
789
673
|
* Creates a reusable {@link headers} function.
|
|
790
674
|
*
|
|
@@ -793,26 +677,32 @@ export declare function createHeaders(): never;
|
|
|
793
677
|
*
|
|
794
678
|
* @author Jeongho Nam - https://github.com/samchon
|
|
795
679
|
*/
|
|
796
|
-
|
|
680
|
+
declare function createHeaders<T extends object>(): (input: Record<string, string | string[] | undefined>) => T;
|
|
681
|
+
declare const createHeadersPure: typeof createHeaders;
|
|
682
|
+
export { createHeadersPure as createHeaders };
|
|
797
683
|
/**
|
|
798
684
|
* Creates a reusable {@link assertHeaders} function.
|
|
799
685
|
*
|
|
800
686
|
* @danger You must configure the generic argument `T`
|
|
801
687
|
* @template T The type of the headers object
|
|
688
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
802
689
|
* @throws compile error
|
|
803
690
|
*
|
|
804
691
|
* @author Jeongho Nam - https://github.com/samchon
|
|
805
692
|
*/
|
|
806
|
-
|
|
693
|
+
declare function createAssertHeaders(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): never;
|
|
807
694
|
/**
|
|
808
695
|
* Creates a reusable {@link assertHeaders} function.
|
|
809
696
|
*
|
|
810
697
|
* @template T The type of the headers object
|
|
698
|
+
* @param errorFactory Custom error factory. Default is `TypeGuardError`
|
|
811
699
|
* @returns A reusable `assertHeaders` function
|
|
812
700
|
*
|
|
813
701
|
* @author Jeongho Nam - https://github.com/samchon
|
|
814
702
|
*/
|
|
815
|
-
|
|
703
|
+
declare function createAssertHeaders<T extends object>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: Record<string, string | string[] | undefined>) => T;
|
|
704
|
+
declare const createAssertHeadersPure: typeof createAssertHeaders;
|
|
705
|
+
export { createAssertHeadersPure as createAssertHeaders };
|
|
816
706
|
/**
|
|
817
707
|
* Creates a reusable {@link isHeaders} function.
|
|
818
708
|
*
|
|
@@ -822,7 +712,7 @@ export declare function createAssertHeaders<T extends object>(): (input: Record<
|
|
|
822
712
|
*
|
|
823
713
|
* @author Jeongho Nam - https://github.com/samchon
|
|
824
714
|
*/
|
|
825
|
-
|
|
715
|
+
declare function createIsHeaders(): never;
|
|
826
716
|
/**
|
|
827
717
|
* Creates a reusable {@link isHeaders} function.
|
|
828
718
|
*
|
|
@@ -831,7 +721,9 @@ export declare function createIsHeaders(): never;
|
|
|
831
721
|
*
|
|
832
722
|
* @author Jeongho Nam - https://github.com/samchon
|
|
833
723
|
*/
|
|
834
|
-
|
|
724
|
+
declare function createIsHeaders<T extends object>(): (input: Record<string, string | string[] | undefined>) => T | null;
|
|
725
|
+
declare const createIsHeadersPure: typeof createIsHeaders;
|
|
726
|
+
export { createIsHeadersPure as createIsHeaders };
|
|
835
727
|
/**
|
|
836
728
|
* Creates a reusable {@link validateHeaders} function.
|
|
837
729
|
*
|
|
@@ -841,7 +733,7 @@ export declare function createIsHeaders<T extends object>(): (input: Record<stri
|
|
|
841
733
|
*
|
|
842
734
|
* @author Jeongho Nam - https://github.com/samchon
|
|
843
735
|
*/
|
|
844
|
-
|
|
736
|
+
declare function createValidateHeaders(): never;
|
|
845
737
|
/**
|
|
846
738
|
* Creates a reusable {@link validateHeaders} function.
|
|
847
739
|
*
|
|
@@ -850,7 +742,9 @@ export declare function createValidateHeaders(): never;
|
|
|
850
742
|
*
|
|
851
743
|
* @author Jeongho Nam - https://github.com/samchon
|
|
852
744
|
*/
|
|
853
|
-
|
|
745
|
+
declare function createValidateHeaders<T extends object>(): (input: Record<string, string | string[] | undefined>) => IValidation<Resolved<T>>;
|
|
746
|
+
declare const createValidateHeadersPure: typeof createValidateHeaders;
|
|
747
|
+
export { createValidateHeadersPure as createValidateHeaders };
|
|
854
748
|
/**
|
|
855
749
|
* Creates a reusable {@link parameter} function.
|
|
856
750
|
*
|
|
@@ -860,7 +754,7 @@ export declare function createValidateHeaders<T extends object>(): (input: Recor
|
|
|
860
754
|
*
|
|
861
755
|
* @author Jeongho Nam - https://github.com/samchon
|
|
862
756
|
*/
|
|
863
|
-
|
|
757
|
+
declare function createParameter(): never;
|
|
864
758
|
/**
|
|
865
759
|
* Creates a reusable {@link parameter} function.
|
|
866
760
|
*
|
|
@@ -869,4 +763,6 @@ export declare function createParameter(): never;
|
|
|
869
763
|
*
|
|
870
764
|
* @author Jeongho Nam - https://github.com/samchon
|
|
871
765
|
*/
|
|
872
|
-
|
|
766
|
+
declare function createParameter<T extends Atomic.Type | null>(): (input: string) => T;
|
|
767
|
+
declare const createParameterPure: typeof createParameter;
|
|
768
|
+
export { createParameterPure as createParameter };
|