@fern-api/dynamic-ir-sdk 0.0.3603
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/dist/cjs/BaseClient.d.ts +32 -0
- package/dist/cjs/BaseClient.js +50 -0
- package/dist/cjs/api/index.d.ts +1 -0
- package/dist/cjs/api/index.js +17 -0
- package/dist/cjs/api/resources/commons/index.d.ts +1 -0
- package/dist/cjs/api/resources/commons/index.js +17 -0
- package/dist/cjs/api/resources/commons/types/Name.d.ts +8 -0
- package/dist/cjs/api/resources/commons/types/Name.js +3 -0
- package/dist/cjs/api/resources/commons/types/SafeAndUnsafeString.d.ts +6 -0
- package/dist/cjs/api/resources/commons/types/SafeAndUnsafeString.js +3 -0
- package/dist/cjs/api/resources/commons/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/commons/types/index.js +18 -0
- package/dist/cjs/api/resources/dynamic/index.d.ts +1 -0
- package/dist/cjs/api/resources/dynamic/index.js +17 -0
- package/dist/cjs/api/resources/dynamic/resources/auth/index.d.ts +1 -0
- package/dist/cjs/api/resources/dynamic/resources/auth/index.js +17 -0
- package/dist/cjs/api/resources/dynamic/resources/auth/types/Auth.d.ts +19 -0
- package/dist/cjs/api/resources/dynamic/resources/auth/types/Auth.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/auth/types/AuthValues.d.ts +19 -0
- package/dist/cjs/api/resources/dynamic/resources/auth/types/AuthValues.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/auth/types/BasicAuth.d.ts +5 -0
- package/dist/cjs/api/resources/dynamic/resources/auth/types/BasicAuth.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/auth/types/BasicAuthValues.d.ts +4 -0
- package/dist/cjs/api/resources/dynamic/resources/auth/types/BasicAuthValues.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/auth/types/BearerAuth.d.ts +4 -0
- package/dist/cjs/api/resources/dynamic/resources/auth/types/BearerAuth.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/auth/types/BearerAuthValues.d.ts +3 -0
- package/dist/cjs/api/resources/dynamic/resources/auth/types/BearerAuthValues.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/auth/types/HeaderAuth.d.ts +4 -0
- package/dist/cjs/api/resources/dynamic/resources/auth/types/HeaderAuth.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/auth/types/HeaderAuthValues.d.ts +3 -0
- package/dist/cjs/api/resources/dynamic/resources/auth/types/HeaderAuthValues.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/auth/types/InferredAuth.d.ts +9 -0
- package/dist/cjs/api/resources/dynamic/resources/auth/types/InferredAuth.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/auth/types/InferredAuthValues.d.ts +8 -0
- package/dist/cjs/api/resources/dynamic/resources/auth/types/InferredAuthValues.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/auth/types/OAuth.d.ts +5 -0
- package/dist/cjs/api/resources/dynamic/resources/auth/types/OAuth.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/auth/types/OAuthValues.d.ts +4 -0
- package/dist/cjs/api/resources/dynamic/resources/auth/types/OAuthValues.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/auth/types/index.d.ts +12 -0
- package/dist/cjs/api/resources/dynamic/resources/auth/types/index.js +28 -0
- package/dist/cjs/api/resources/dynamic/resources/commons/index.d.ts +1 -0
- package/dist/cjs/api/resources/dynamic/resources/commons/index.js +17 -0
- package/dist/cjs/api/resources/dynamic/resources/commons/types/EndpointId.d.ts +1 -0
- package/dist/cjs/api/resources/dynamic/resources/commons/types/EndpointId.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/commons/types/FernFilepath.d.ts +6 -0
- package/dist/cjs/api/resources/dynamic/resources/commons/types/FernFilepath.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/commons/types/Name.d.ts +8 -0
- package/dist/cjs/api/resources/dynamic/resources/commons/types/Name.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/commons/types/NameAndWireValue.d.ts +5 -0
- package/dist/cjs/api/resources/dynamic/resources/commons/types/NameAndWireValue.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/commons/types/SafeAndUnsafeString.d.ts +6 -0
- package/dist/cjs/api/resources/dynamic/resources/commons/types/SafeAndUnsafeString.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/commons/types/TypeId.d.ts +1 -0
- package/dist/cjs/api/resources/dynamic/resources/commons/types/TypeId.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/commons/types/WithDocs.d.ts +3 -0
- package/dist/cjs/api/resources/dynamic/resources/commons/types/WithDocs.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/commons/types/index.d.ts +7 -0
- package/dist/cjs/api/resources/dynamic/resources/commons/types/index.js +23 -0
- package/dist/cjs/api/resources/dynamic/resources/declaration/index.d.ts +1 -0
- package/dist/cjs/api/resources/dynamic/resources/declaration/index.js +17 -0
- package/dist/cjs/api/resources/dynamic/resources/declaration/types/Declaration.d.ts +5 -0
- package/dist/cjs/api/resources/dynamic/resources/declaration/types/Declaration.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/declaration/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/dynamic/resources/declaration/types/index.js +17 -0
- package/dist/cjs/api/resources/dynamic/resources/endpoints/index.d.ts +1 -0
- package/dist/cjs/api/resources/dynamic/resources/endpoints/index.js +17 -0
- package/dist/cjs/api/resources/dynamic/resources/endpoints/types/BodyRequest.d.ts +5 -0
- package/dist/cjs/api/resources/dynamic/resources/endpoints/types/BodyRequest.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/endpoints/types/Endpoint.d.ts +9 -0
- package/dist/cjs/api/resources/dynamic/resources/endpoints/types/Endpoint.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/endpoints/types/EndpointExample.d.ts +7 -0
- package/dist/cjs/api/resources/dynamic/resources/endpoints/types/EndpointExample.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/endpoints/types/EndpointLocation.d.ts +8 -0
- package/dist/cjs/api/resources/dynamic/resources/endpoints/types/EndpointLocation.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/endpoints/types/FileUploadRequestBody.d.ts +4 -0
- package/dist/cjs/api/resources/dynamic/resources/endpoints/types/FileUploadRequestBody.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/endpoints/types/FileUploadRequestBodyProperty.d.ts +13 -0
- package/dist/cjs/api/resources/dynamic/resources/endpoints/types/FileUploadRequestBodyProperty.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/endpoints/types/InlinedRequest.d.ts +9 -0
- package/dist/cjs/api/resources/dynamic/resources/endpoints/types/InlinedRequest.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/endpoints/types/InlinedRequestBody.d.ts +14 -0
- package/dist/cjs/api/resources/dynamic/resources/endpoints/types/InlinedRequestBody.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/endpoints/types/InlinedRequestMetadata.d.ts +18 -0
- package/dist/cjs/api/resources/dynamic/resources/endpoints/types/InlinedRequestMetadata.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/endpoints/types/ReferencedRequestBody.d.ts +5 -0
- package/dist/cjs/api/resources/dynamic/resources/endpoints/types/ReferencedRequestBody.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/endpoints/types/ReferencedRequestBodyType.d.ts +11 -0
- package/dist/cjs/api/resources/dynamic/resources/endpoints/types/ReferencedRequestBodyType.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/endpoints/types/Request.d.ts +13 -0
- package/dist/cjs/api/resources/dynamic/resources/endpoints/types/Request.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/endpoints/types/Response.d.ts +29 -0
- package/dist/cjs/api/resources/dynamic/resources/endpoints/types/Response.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/endpoints/types/index.d.ts +13 -0
- package/dist/cjs/api/resources/dynamic/resources/endpoints/types/index.js +29 -0
- package/dist/cjs/api/resources/dynamic/resources/environment/index.d.ts +1 -0
- package/dist/cjs/api/resources/dynamic/resources/environment/index.js +17 -0
- package/dist/cjs/api/resources/dynamic/resources/environment/types/EnvironmentBaseUrlId.d.ts +1 -0
- package/dist/cjs/api/resources/dynamic/resources/environment/types/EnvironmentBaseUrlId.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/environment/types/EnvironmentBaseUrlWithId.d.ts +5 -0
- package/dist/cjs/api/resources/dynamic/resources/environment/types/EnvironmentBaseUrlWithId.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/environment/types/EnvironmentId.d.ts +1 -0
- package/dist/cjs/api/resources/dynamic/resources/environment/types/EnvironmentId.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/environment/types/EnvironmentUrl.d.ts +1 -0
- package/dist/cjs/api/resources/dynamic/resources/environment/types/EnvironmentUrl.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/environment/types/EnvironmentValues.d.ts +14 -0
- package/dist/cjs/api/resources/dynamic/resources/environment/types/EnvironmentValues.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/environment/types/Environments.d.ts +10 -0
- package/dist/cjs/api/resources/dynamic/resources/environment/types/Environments.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/environment/types/EnvironmentsConfig.d.ts +5 -0
- package/dist/cjs/api/resources/dynamic/resources/environment/types/EnvironmentsConfig.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/environment/types/MultipleBaseUrlsEnvironment.d.ts +6 -0
- package/dist/cjs/api/resources/dynamic/resources/environment/types/MultipleBaseUrlsEnvironment.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/environment/types/MultipleBaseUrlsEnvironments.d.ts +5 -0
- package/dist/cjs/api/resources/dynamic/resources/environment/types/MultipleBaseUrlsEnvironments.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/environment/types/MultipleEnvironmentUrlValues.d.ts +2 -0
- package/dist/cjs/api/resources/dynamic/resources/environment/types/MultipleEnvironmentUrlValues.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/environment/types/SingleBaseUrlEnvironment.d.ts +6 -0
- package/dist/cjs/api/resources/dynamic/resources/environment/types/SingleBaseUrlEnvironment.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/environment/types/SingleBaseUrlEnvironments.d.ts +4 -0
- package/dist/cjs/api/resources/dynamic/resources/environment/types/SingleBaseUrlEnvironments.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/environment/types/index.d.ts +12 -0
- package/dist/cjs/api/resources/dynamic/resources/environment/types/index.js +28 -0
- package/dist/cjs/api/resources/dynamic/resources/http/index.d.ts +1 -0
- package/dist/cjs/api/resources/dynamic/resources/http/index.js +17 -0
- package/dist/cjs/api/resources/dynamic/resources/http/types/HttpMethod.d.ts +9 -0
- package/dist/cjs/api/resources/dynamic/resources/http/types/HttpMethod.js +12 -0
- package/dist/cjs/api/resources/dynamic/resources/http/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/dynamic/resources/http/types/index.js +17 -0
- package/dist/cjs/api/resources/dynamic/resources/index.d.ts +20 -0
- package/dist/cjs/api/resources/dynamic/resources/index.js +59 -0
- package/dist/cjs/api/resources/dynamic/resources/ir/index.d.ts +1 -0
- package/dist/cjs/api/resources/dynamic/resources/ir/index.js +17 -0
- package/dist/cjs/api/resources/dynamic/resources/ir/types/CratesPublishInfo.d.ts +5 -0
- package/dist/cjs/api/resources/dynamic/resources/ir/types/CratesPublishInfo.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/ir/types/DynamicIntermediateRepresentation.d.ts +34 -0
- package/dist/cjs/api/resources/dynamic/resources/ir/types/DynamicIntermediateRepresentation.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/ir/types/GeneratorConfig.d.ts +15 -0
- package/dist/cjs/api/resources/dynamic/resources/ir/types/GeneratorConfig.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/ir/types/GeneratorOutputConfig.d.ts +15 -0
- package/dist/cjs/api/resources/dynamic/resources/ir/types/GeneratorOutputConfig.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/ir/types/GoPublishInfo.d.ts +5 -0
- package/dist/cjs/api/resources/dynamic/resources/ir/types/GoPublishInfo.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/ir/types/MavenPublishInfo.d.ts +5 -0
- package/dist/cjs/api/resources/dynamic/resources/ir/types/MavenPublishInfo.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/ir/types/NpmPublishInfo.d.ts +5 -0
- package/dist/cjs/api/resources/dynamic/resources/ir/types/NpmPublishInfo.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/ir/types/NugetPublishInfo.d.ts +5 -0
- package/dist/cjs/api/resources/dynamic/resources/ir/types/NugetPublishInfo.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/ir/types/PublishInfo.d.ts +28 -0
- package/dist/cjs/api/resources/dynamic/resources/ir/types/PublishInfo.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/ir/types/PypiPublishInfo.d.ts +5 -0
- package/dist/cjs/api/resources/dynamic/resources/ir/types/PypiPublishInfo.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/ir/types/RubyGemsPublishInfo.d.ts +5 -0
- package/dist/cjs/api/resources/dynamic/resources/ir/types/RubyGemsPublishInfo.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/ir/types/SwiftPublishInfo.d.ts +5 -0
- package/dist/cjs/api/resources/dynamic/resources/ir/types/SwiftPublishInfo.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/ir/types/index.d.ts +12 -0
- package/dist/cjs/api/resources/dynamic/resources/ir/types/index.js +28 -0
- package/dist/cjs/api/resources/dynamic/resources/snippets/index.d.ts +1 -0
- package/dist/cjs/api/resources/dynamic/resources/snippets/index.js +17 -0
- package/dist/cjs/api/resources/dynamic/resources/snippets/types/EndpointSnippetRequest.d.ts +14 -0
- package/dist/cjs/api/resources/dynamic/resources/snippets/types/EndpointSnippetRequest.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/snippets/types/EndpointSnippetResponse.d.ts +12 -0
- package/dist/cjs/api/resources/dynamic/resources/snippets/types/EndpointSnippetResponse.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/snippets/types/ErrorSeverity.d.ts +5 -0
- package/dist/cjs/api/resources/dynamic/resources/snippets/types/ErrorSeverity.js +8 -0
- package/dist/cjs/api/resources/dynamic/resources/snippets/types/Error_.d.ts +5 -0
- package/dist/cjs/api/resources/dynamic/resources/snippets/types/Error_.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/snippets/types/Values.d.ts +7 -0
- package/dist/cjs/api/resources/dynamic/resources/snippets/types/Values.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/snippets/types/index.d.ts +5 -0
- package/dist/cjs/api/resources/dynamic/resources/snippets/types/index.js +21 -0
- package/dist/cjs/api/resources/dynamic/resources/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/dynamic/resources/types/index.js +17 -0
- package/dist/cjs/api/resources/dynamic/resources/types/types/AliasType.d.ts +5 -0
- package/dist/cjs/api/resources/dynamic/resources/types/types/AliasType.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/types/types/DiscriminatedUnionType.d.ts +7 -0
- package/dist/cjs/api/resources/dynamic/resources/types/types/DiscriminatedUnionType.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/types/types/EnumType.d.ts +5 -0
- package/dist/cjs/api/resources/dynamic/resources/types/types/EnumType.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/types/types/LiteralType.d.ts +12 -0
- package/dist/cjs/api/resources/dynamic/resources/types/types/LiteralType.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/types/types/MapType.d.ts +5 -0
- package/dist/cjs/api/resources/dynamic/resources/types/types/MapType.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/types/types/NamedParameter.d.ts +8 -0
- package/dist/cjs/api/resources/dynamic/resources/types/types/NamedParameter.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/types/types/NamedType.d.ts +22 -0
- package/dist/cjs/api/resources/dynamic/resources/types/types/NamedType.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/types/types/ObjectPropertyAccess.d.ts +5 -0
- package/dist/cjs/api/resources/dynamic/resources/types/types/ObjectPropertyAccess.js +8 -0
- package/dist/cjs/api/resources/dynamic/resources/types/types/ObjectType.d.ts +12 -0
- package/dist/cjs/api/resources/dynamic/resources/types/types/ObjectType.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/types/types/PrimitiveTypeV1.d.ts +18 -0
- package/dist/cjs/api/resources/dynamic/resources/types/types/PrimitiveTypeV1.js +21 -0
- package/dist/cjs/api/resources/dynamic/resources/types/types/SingleDiscriminatedUnionType.d.ts +13 -0
- package/dist/cjs/api/resources/dynamic/resources/types/types/SingleDiscriminatedUnionType.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/types/types/SingleDiscriminatedUnionTypeNoProperties.d.ts +6 -0
- package/dist/cjs/api/resources/dynamic/resources/types/types/SingleDiscriminatedUnionTypeNoProperties.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/types/types/SingleDiscriminatedUnionTypeObject.d.ts +7 -0
- package/dist/cjs/api/resources/dynamic/resources/types/types/SingleDiscriminatedUnionTypeObject.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/types/types/SingleDiscriminatedUnionTypeSingleProperty.d.ts +7 -0
- package/dist/cjs/api/resources/dynamic/resources/types/types/SingleDiscriminatedUnionTypeSingleProperty.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/types/types/TypeReference.d.ts +38 -0
- package/dist/cjs/api/resources/dynamic/resources/types/types/TypeReference.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/types/types/UndiscriminatedUnionType.d.ts +6 -0
- package/dist/cjs/api/resources/dynamic/resources/types/types/UndiscriminatedUnionType.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/types/types/index.d.ts +16 -0
- package/dist/cjs/api/resources/dynamic/resources/types/types/index.js +32 -0
- package/dist/cjs/api/resources/dynamic/resources/variables/index.d.ts +1 -0
- package/dist/cjs/api/resources/dynamic/resources/variables/index.js +17 -0
- package/dist/cjs/api/resources/dynamic/resources/variables/types/VariableDeclaration.d.ts +13 -0
- package/dist/cjs/api/resources/dynamic/resources/variables/types/VariableDeclaration.js +3 -0
- package/dist/cjs/api/resources/dynamic/resources/variables/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/dynamic/resources/variables/types/index.js +17 -0
- package/dist/cjs/api/resources/generatorExec/index.d.ts +1 -0
- package/dist/cjs/api/resources/generatorExec/index.js +17 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/index.d.ts +1 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/index.js +17 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/BasicLicense.d.ts +4 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/BasicLicense.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/CratesGithubPublishInfo.d.ts +7 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/CratesGithubPublishInfo.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/CratesRegistryConfig.d.ts +5 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/CratesRegistryConfig.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/CustomLicense.d.ts +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/CustomLicense.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/EnvironmentVariable.d.ts +1 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/EnvironmentVariable.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/GeneratorConfig.d.ts +18 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/GeneratorConfig.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/GeneratorEnvironment.d.ts +10 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/GeneratorEnvironment.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/GeneratorOutputConfig.d.ts +8 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/GeneratorOutputConfig.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/GeneratorPublishConfig.d.ts +9 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/GeneratorPublishConfig.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/GeneratorPublishTarget.d.ts +25 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/GeneratorPublishTarget.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/GeneratorRegistriesConfig.d.ts +5 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/GeneratorRegistriesConfig.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/GeneratorRegistriesConfigV2.d.ts +9 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/GeneratorRegistriesConfigV2.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/GithubOutputMode.d.ts +14 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/GithubOutputMode.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/GithubPublishInfo.d.ts +25 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/GithubPublishInfo.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/LicenseConfig.d.ts +10 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/LicenseConfig.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/LicenseId.d.ts +5 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/LicenseId.js +8 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/MavenCentralSignature.d.ts +5 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/MavenCentralSignature.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/MavenCentralSignatureGithubInfo.d.ts +6 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/MavenCentralSignatureGithubInfo.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/MavenGithubPublishInfo.d.ts +9 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/MavenGithubPublishInfo.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/MavenRegistryConfig.d.ts +8 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/MavenRegistryConfig.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/MavenRegistryConfigV2.d.ts +8 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/MavenRegistryConfigV2.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/NpmGithubPublishInfo.d.ts +7 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/NpmGithubPublishInfo.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/NpmRegistryConfig.d.ts +5 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/NpmRegistryConfig.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/NpmRegistryConfigV2.d.ts +5 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/NpmRegistryConfigV2.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/NugetGithubPublishInfo.d.ts +7 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/NugetGithubPublishInfo.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/NugetRegistryConfig.d.ts +5 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/NugetRegistryConfig.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/OutputMetadata.d.ts +5 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/OutputMetadata.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/OutputMetadataAuthor.d.ts +4 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/OutputMetadataAuthor.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/OutputMode.d.ts +13 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/OutputMode.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/PostmanConfig.d.ts +4 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/PostmanConfig.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/PostmanGithubPublishInfo.d.ts +5 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/PostmanGithubPublishInfo.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/PublishingMetadata.d.ts +9 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/PublishingMetadata.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/PypiGithubPublishInfo.d.ts +9 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/PypiGithubPublishInfo.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/PypiMetadata.d.ts +6 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/PypiMetadata.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/PypiRegistryConfig.d.ts +8 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/PypiRegistryConfig.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/RemoteGeneratorEnvironment.d.ts +5 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/RemoteGeneratorEnvironment.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/RubyGemsGithubPublishInfo.d.ts +7 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/RubyGemsGithubPublishInfo.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/RubyGemsRegistryConfig.d.ts +5 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/RubyGemsRegistryConfig.js +3 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/index.d.ts +38 -0
- package/dist/cjs/api/resources/generatorExec/resources/config/types/index.js +54 -0
- package/dist/cjs/api/resources/generatorExec/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/generatorExec/resources/index.js +41 -0
- package/dist/cjs/api/resources/index.d.ts +4 -0
- package/dist/cjs/api/resources/index.js +43 -0
- package/dist/cjs/core/exports.d.ts +1 -0
- package/dist/cjs/core/exports.js +17 -0
- package/dist/cjs/core/fetcher/APIResponse.d.ts +20 -0
- package/dist/cjs/core/fetcher/APIResponse.js +2 -0
- package/dist/cjs/core/fetcher/BinaryResponse.d.ts +19 -0
- package/dist/cjs/core/fetcher/BinaryResponse.js +17 -0
- package/dist/cjs/core/fetcher/EndpointMetadata.d.ts +13 -0
- package/dist/cjs/core/fetcher/EndpointMetadata.js +2 -0
- package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +12 -0
- package/dist/cjs/core/fetcher/EndpointSupplier.js +22 -0
- package/dist/cjs/core/fetcher/Fetcher.d.ts +48 -0
- package/dist/cjs/core/fetcher/Fetcher.js +316 -0
- package/dist/cjs/core/fetcher/Headers.d.ts +2 -0
- package/dist/cjs/core/fetcher/Headers.js +84 -0
- package/dist/cjs/core/fetcher/HttpResponsePromise.d.ts +58 -0
- package/dist/cjs/core/fetcher/HttpResponsePromise.js +103 -0
- package/dist/cjs/core/fetcher/RawResponse.d.ts +29 -0
- package/dist/cjs/core/fetcher/RawResponse.js +44 -0
- package/dist/cjs/core/fetcher/Supplier.d.ts +4 -0
- package/dist/cjs/core/fetcher/Supplier.js +22 -0
- package/dist/cjs/core/fetcher/createRequestUrl.d.ts +1 -0
- package/dist/cjs/core/fetcher/createRequestUrl.js +8 -0
- package/dist/cjs/core/fetcher/getErrorResponseBody.d.ts +1 -0
- package/dist/cjs/core/fetcher/getErrorResponseBody.js +45 -0
- package/dist/cjs/core/fetcher/getFetchFn.d.ts +1 -0
- package/dist/cjs/core/fetcher/getFetchFn.js +17 -0
- package/dist/cjs/core/fetcher/getHeader.d.ts +1 -0
- package/dist/cjs/core/fetcher/getHeader.js +11 -0
- package/dist/cjs/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/cjs/core/fetcher/getRequestBody.js +27 -0
- package/dist/cjs/core/fetcher/getResponseBody.d.ts +1 -0
- package/dist/cjs/core/fetcher/getResponseBody.js +69 -0
- package/dist/cjs/core/fetcher/index.d.ts +11 -0
- package/dist/cjs/core/fetcher/index.js +17 -0
- package/dist/cjs/core/fetcher/makeRequest.d.ts +1 -0
- package/dist/cjs/core/fetcher/makeRequest.js +40 -0
- package/dist/cjs/core/fetcher/requestWithRetries.d.ts +1 -0
- package/dist/cjs/core/fetcher/requestWithRetries.js +67 -0
- package/dist/cjs/core/fetcher/signals.d.ts +5 -0
- package/dist/cjs/core/fetcher/signals.js +24 -0
- package/dist/cjs/core/headers.d.ts +2 -0
- package/dist/cjs/core/headers.js +31 -0
- package/dist/cjs/core/index.d.ts +4 -0
- package/dist/cjs/core/index.js +43 -0
- package/dist/cjs/core/json.d.ts +15 -0
- package/dist/cjs/core/json.js +24 -0
- package/dist/cjs/core/logging/exports.d.ts +18 -0
- package/dist/cjs/core/logging/exports.js +45 -0
- package/dist/cjs/core/logging/index.d.ts +1 -0
- package/dist/cjs/core/logging/index.js +17 -0
- package/dist/cjs/core/logging/logger.d.ts +126 -0
- package/dist/cjs/core/logging/logger.js +144 -0
- package/dist/cjs/core/runtime/index.d.ts +1 -0
- package/dist/cjs/core/runtime/index.js +5 -0
- package/dist/cjs/core/runtime/runtime.d.ts +9 -0
- package/dist/cjs/core/runtime/runtime.js +103 -0
- package/dist/cjs/core/url/encodePathParam.d.ts +1 -0
- package/dist/cjs/core/url/encodePathParam.js +21 -0
- package/dist/cjs/core/url/index.d.ts +3 -0
- package/dist/cjs/core/url/index.js +9 -0
- package/dist/cjs/core/url/join.d.ts +1 -0
- package/dist/cjs/core/url/join.js +68 -0
- package/dist/cjs/core/url/qs.d.ts +6 -0
- package/dist/cjs/core/url/qs.js +64 -0
- package/dist/cjs/errors/FernIrError.d.ts +12 -0
- package/dist/cjs/errors/FernIrError.js +32 -0
- package/dist/cjs/errors/FernIrTimeoutError.d.ts +3 -0
- package/dist/cjs/errors/FernIrTimeoutError.js +15 -0
- package/dist/cjs/errors/handleNonStatusCodeError.d.ts +2 -0
- package/dist/cjs/errors/handleNonStatusCodeError.js +65 -0
- package/dist/cjs/errors/index.d.ts +2 -0
- package/dist/cjs/errors/index.js +7 -0
- package/dist/cjs/exports.d.ts +1 -0
- package/dist/cjs/exports.js +17 -0
- package/dist/cjs/index.d.ts +4 -0
- package/dist/cjs/index.js +44 -0
- package/dist/cjs/version.d.ts +1 -0
- package/dist/cjs/version.js +4 -0
- package/dist/esm/BaseClient.d.mts +32 -0
- package/dist/esm/BaseClient.mjs +14 -0
- package/dist/esm/api/index.d.mts +1 -0
- package/dist/esm/api/index.mjs +1 -0
- package/dist/esm/api/resources/commons/index.d.mts +1 -0
- package/dist/esm/api/resources/commons/index.mjs +1 -0
- package/dist/esm/api/resources/commons/types/Name.d.mts +8 -0
- package/dist/esm/api/resources/commons/types/Name.mjs +2 -0
- package/dist/esm/api/resources/commons/types/SafeAndUnsafeString.d.mts +6 -0
- package/dist/esm/api/resources/commons/types/SafeAndUnsafeString.mjs +2 -0
- package/dist/esm/api/resources/commons/types/index.d.mts +2 -0
- package/dist/esm/api/resources/commons/types/index.mjs +2 -0
- package/dist/esm/api/resources/dynamic/index.d.mts +1 -0
- package/dist/esm/api/resources/dynamic/index.mjs +1 -0
- package/dist/esm/api/resources/dynamic/resources/auth/index.d.mts +1 -0
- package/dist/esm/api/resources/dynamic/resources/auth/index.mjs +1 -0
- package/dist/esm/api/resources/dynamic/resources/auth/types/Auth.d.mts +19 -0
- package/dist/esm/api/resources/dynamic/resources/auth/types/Auth.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/auth/types/AuthValues.d.mts +19 -0
- package/dist/esm/api/resources/dynamic/resources/auth/types/AuthValues.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/auth/types/BasicAuth.d.mts +5 -0
- package/dist/esm/api/resources/dynamic/resources/auth/types/BasicAuth.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/auth/types/BasicAuthValues.d.mts +4 -0
- package/dist/esm/api/resources/dynamic/resources/auth/types/BasicAuthValues.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/auth/types/BearerAuth.d.mts +4 -0
- package/dist/esm/api/resources/dynamic/resources/auth/types/BearerAuth.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/auth/types/BearerAuthValues.d.mts +3 -0
- package/dist/esm/api/resources/dynamic/resources/auth/types/BearerAuthValues.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/auth/types/HeaderAuth.d.mts +4 -0
- package/dist/esm/api/resources/dynamic/resources/auth/types/HeaderAuth.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/auth/types/HeaderAuthValues.d.mts +3 -0
- package/dist/esm/api/resources/dynamic/resources/auth/types/HeaderAuthValues.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/auth/types/InferredAuth.d.mts +9 -0
- package/dist/esm/api/resources/dynamic/resources/auth/types/InferredAuth.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/auth/types/InferredAuthValues.d.mts +8 -0
- package/dist/esm/api/resources/dynamic/resources/auth/types/InferredAuthValues.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/auth/types/OAuth.d.mts +5 -0
- package/dist/esm/api/resources/dynamic/resources/auth/types/OAuth.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/auth/types/OAuthValues.d.mts +4 -0
- package/dist/esm/api/resources/dynamic/resources/auth/types/OAuthValues.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/auth/types/index.d.mts +12 -0
- package/dist/esm/api/resources/dynamic/resources/auth/types/index.mjs +12 -0
- package/dist/esm/api/resources/dynamic/resources/commons/index.d.mts +1 -0
- package/dist/esm/api/resources/dynamic/resources/commons/index.mjs +1 -0
- package/dist/esm/api/resources/dynamic/resources/commons/types/EndpointId.d.mts +1 -0
- package/dist/esm/api/resources/dynamic/resources/commons/types/EndpointId.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/commons/types/FernFilepath.d.mts +6 -0
- package/dist/esm/api/resources/dynamic/resources/commons/types/FernFilepath.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/commons/types/Name.d.mts +8 -0
- package/dist/esm/api/resources/dynamic/resources/commons/types/Name.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/commons/types/NameAndWireValue.d.mts +5 -0
- package/dist/esm/api/resources/dynamic/resources/commons/types/NameAndWireValue.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/commons/types/SafeAndUnsafeString.d.mts +6 -0
- package/dist/esm/api/resources/dynamic/resources/commons/types/SafeAndUnsafeString.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/commons/types/TypeId.d.mts +1 -0
- package/dist/esm/api/resources/dynamic/resources/commons/types/TypeId.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/commons/types/WithDocs.d.mts +3 -0
- package/dist/esm/api/resources/dynamic/resources/commons/types/WithDocs.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/commons/types/index.d.mts +7 -0
- package/dist/esm/api/resources/dynamic/resources/commons/types/index.mjs +7 -0
- package/dist/esm/api/resources/dynamic/resources/declaration/index.d.mts +1 -0
- package/dist/esm/api/resources/dynamic/resources/declaration/index.mjs +1 -0
- package/dist/esm/api/resources/dynamic/resources/declaration/types/Declaration.d.mts +5 -0
- package/dist/esm/api/resources/dynamic/resources/declaration/types/Declaration.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/declaration/types/index.d.mts +1 -0
- package/dist/esm/api/resources/dynamic/resources/declaration/types/index.mjs +1 -0
- package/dist/esm/api/resources/dynamic/resources/endpoints/index.d.mts +1 -0
- package/dist/esm/api/resources/dynamic/resources/endpoints/index.mjs +1 -0
- package/dist/esm/api/resources/dynamic/resources/endpoints/types/BodyRequest.d.mts +5 -0
- package/dist/esm/api/resources/dynamic/resources/endpoints/types/BodyRequest.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/endpoints/types/Endpoint.d.mts +9 -0
- package/dist/esm/api/resources/dynamic/resources/endpoints/types/Endpoint.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/endpoints/types/EndpointExample.d.mts +7 -0
- package/dist/esm/api/resources/dynamic/resources/endpoints/types/EndpointExample.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/endpoints/types/EndpointLocation.d.mts +8 -0
- package/dist/esm/api/resources/dynamic/resources/endpoints/types/EndpointLocation.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/endpoints/types/FileUploadRequestBody.d.mts +4 -0
- package/dist/esm/api/resources/dynamic/resources/endpoints/types/FileUploadRequestBody.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/endpoints/types/FileUploadRequestBodyProperty.d.mts +13 -0
- package/dist/esm/api/resources/dynamic/resources/endpoints/types/FileUploadRequestBodyProperty.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/endpoints/types/InlinedRequest.d.mts +9 -0
- package/dist/esm/api/resources/dynamic/resources/endpoints/types/InlinedRequest.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/endpoints/types/InlinedRequestBody.d.mts +14 -0
- package/dist/esm/api/resources/dynamic/resources/endpoints/types/InlinedRequestBody.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/endpoints/types/InlinedRequestMetadata.d.mts +18 -0
- package/dist/esm/api/resources/dynamic/resources/endpoints/types/InlinedRequestMetadata.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/endpoints/types/ReferencedRequestBody.d.mts +5 -0
- package/dist/esm/api/resources/dynamic/resources/endpoints/types/ReferencedRequestBody.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/endpoints/types/ReferencedRequestBodyType.d.mts +11 -0
- package/dist/esm/api/resources/dynamic/resources/endpoints/types/ReferencedRequestBodyType.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/endpoints/types/Request.d.mts +13 -0
- package/dist/esm/api/resources/dynamic/resources/endpoints/types/Request.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/endpoints/types/Response.d.mts +29 -0
- package/dist/esm/api/resources/dynamic/resources/endpoints/types/Response.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/endpoints/types/index.d.mts +13 -0
- package/dist/esm/api/resources/dynamic/resources/endpoints/types/index.mjs +13 -0
- package/dist/esm/api/resources/dynamic/resources/environment/index.d.mts +1 -0
- package/dist/esm/api/resources/dynamic/resources/environment/index.mjs +1 -0
- package/dist/esm/api/resources/dynamic/resources/environment/types/EnvironmentBaseUrlId.d.mts +1 -0
- package/dist/esm/api/resources/dynamic/resources/environment/types/EnvironmentBaseUrlId.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/environment/types/EnvironmentBaseUrlWithId.d.mts +5 -0
- package/dist/esm/api/resources/dynamic/resources/environment/types/EnvironmentBaseUrlWithId.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/environment/types/EnvironmentId.d.mts +1 -0
- package/dist/esm/api/resources/dynamic/resources/environment/types/EnvironmentId.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/environment/types/EnvironmentUrl.d.mts +1 -0
- package/dist/esm/api/resources/dynamic/resources/environment/types/EnvironmentUrl.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/environment/types/EnvironmentValues.d.mts +14 -0
- package/dist/esm/api/resources/dynamic/resources/environment/types/EnvironmentValues.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/environment/types/Environments.d.mts +10 -0
- package/dist/esm/api/resources/dynamic/resources/environment/types/Environments.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/environment/types/EnvironmentsConfig.d.mts +5 -0
- package/dist/esm/api/resources/dynamic/resources/environment/types/EnvironmentsConfig.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/environment/types/MultipleBaseUrlsEnvironment.d.mts +6 -0
- package/dist/esm/api/resources/dynamic/resources/environment/types/MultipleBaseUrlsEnvironment.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/environment/types/MultipleBaseUrlsEnvironments.d.mts +5 -0
- package/dist/esm/api/resources/dynamic/resources/environment/types/MultipleBaseUrlsEnvironments.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/environment/types/MultipleEnvironmentUrlValues.d.mts +2 -0
- package/dist/esm/api/resources/dynamic/resources/environment/types/MultipleEnvironmentUrlValues.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/environment/types/SingleBaseUrlEnvironment.d.mts +6 -0
- package/dist/esm/api/resources/dynamic/resources/environment/types/SingleBaseUrlEnvironment.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/environment/types/SingleBaseUrlEnvironments.d.mts +4 -0
- package/dist/esm/api/resources/dynamic/resources/environment/types/SingleBaseUrlEnvironments.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/environment/types/index.d.mts +12 -0
- package/dist/esm/api/resources/dynamic/resources/environment/types/index.mjs +12 -0
- package/dist/esm/api/resources/dynamic/resources/http/index.d.mts +1 -0
- package/dist/esm/api/resources/dynamic/resources/http/index.mjs +1 -0
- package/dist/esm/api/resources/dynamic/resources/http/types/HttpMethod.d.mts +9 -0
- package/dist/esm/api/resources/dynamic/resources/http/types/HttpMethod.mjs +9 -0
- package/dist/esm/api/resources/dynamic/resources/http/types/index.d.mts +1 -0
- package/dist/esm/api/resources/dynamic/resources/http/types/index.mjs +1 -0
- package/dist/esm/api/resources/dynamic/resources/index.d.mts +20 -0
- package/dist/esm/api/resources/dynamic/resources/index.mjs +20 -0
- package/dist/esm/api/resources/dynamic/resources/ir/index.d.mts +1 -0
- package/dist/esm/api/resources/dynamic/resources/ir/index.mjs +1 -0
- package/dist/esm/api/resources/dynamic/resources/ir/types/CratesPublishInfo.d.mts +5 -0
- package/dist/esm/api/resources/dynamic/resources/ir/types/CratesPublishInfo.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/ir/types/DynamicIntermediateRepresentation.d.mts +34 -0
- package/dist/esm/api/resources/dynamic/resources/ir/types/DynamicIntermediateRepresentation.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/ir/types/GeneratorConfig.d.mts +15 -0
- package/dist/esm/api/resources/dynamic/resources/ir/types/GeneratorConfig.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/ir/types/GeneratorOutputConfig.d.mts +15 -0
- package/dist/esm/api/resources/dynamic/resources/ir/types/GeneratorOutputConfig.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/ir/types/GoPublishInfo.d.mts +5 -0
- package/dist/esm/api/resources/dynamic/resources/ir/types/GoPublishInfo.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/ir/types/MavenPublishInfo.d.mts +5 -0
- package/dist/esm/api/resources/dynamic/resources/ir/types/MavenPublishInfo.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/ir/types/NpmPublishInfo.d.mts +5 -0
- package/dist/esm/api/resources/dynamic/resources/ir/types/NpmPublishInfo.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/ir/types/NugetPublishInfo.d.mts +5 -0
- package/dist/esm/api/resources/dynamic/resources/ir/types/NugetPublishInfo.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/ir/types/PublishInfo.d.mts +28 -0
- package/dist/esm/api/resources/dynamic/resources/ir/types/PublishInfo.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/ir/types/PypiPublishInfo.d.mts +5 -0
- package/dist/esm/api/resources/dynamic/resources/ir/types/PypiPublishInfo.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/ir/types/RubyGemsPublishInfo.d.mts +5 -0
- package/dist/esm/api/resources/dynamic/resources/ir/types/RubyGemsPublishInfo.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/ir/types/SwiftPublishInfo.d.mts +5 -0
- package/dist/esm/api/resources/dynamic/resources/ir/types/SwiftPublishInfo.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/ir/types/index.d.mts +12 -0
- package/dist/esm/api/resources/dynamic/resources/ir/types/index.mjs +12 -0
- package/dist/esm/api/resources/dynamic/resources/snippets/index.d.mts +1 -0
- package/dist/esm/api/resources/dynamic/resources/snippets/index.mjs +1 -0
- package/dist/esm/api/resources/dynamic/resources/snippets/types/EndpointSnippetRequest.d.mts +14 -0
- package/dist/esm/api/resources/dynamic/resources/snippets/types/EndpointSnippetRequest.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/snippets/types/EndpointSnippetResponse.d.mts +12 -0
- package/dist/esm/api/resources/dynamic/resources/snippets/types/EndpointSnippetResponse.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/snippets/types/ErrorSeverity.d.mts +5 -0
- package/dist/esm/api/resources/dynamic/resources/snippets/types/ErrorSeverity.mjs +5 -0
- package/dist/esm/api/resources/dynamic/resources/snippets/types/Error_.d.mts +5 -0
- package/dist/esm/api/resources/dynamic/resources/snippets/types/Error_.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/snippets/types/Values.d.mts +7 -0
- package/dist/esm/api/resources/dynamic/resources/snippets/types/Values.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/snippets/types/index.d.mts +5 -0
- package/dist/esm/api/resources/dynamic/resources/snippets/types/index.mjs +5 -0
- package/dist/esm/api/resources/dynamic/resources/types/index.d.mts +1 -0
- package/dist/esm/api/resources/dynamic/resources/types/index.mjs +1 -0
- package/dist/esm/api/resources/dynamic/resources/types/types/AliasType.d.mts +5 -0
- package/dist/esm/api/resources/dynamic/resources/types/types/AliasType.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/types/types/DiscriminatedUnionType.d.mts +7 -0
- package/dist/esm/api/resources/dynamic/resources/types/types/DiscriminatedUnionType.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/types/types/EnumType.d.mts +5 -0
- package/dist/esm/api/resources/dynamic/resources/types/types/EnumType.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/types/types/LiteralType.d.mts +12 -0
- package/dist/esm/api/resources/dynamic/resources/types/types/LiteralType.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/types/types/MapType.d.mts +5 -0
- package/dist/esm/api/resources/dynamic/resources/types/types/MapType.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/types/types/NamedParameter.d.mts +8 -0
- package/dist/esm/api/resources/dynamic/resources/types/types/NamedParameter.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/types/types/NamedType.d.mts +22 -0
- package/dist/esm/api/resources/dynamic/resources/types/types/NamedType.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/types/types/ObjectPropertyAccess.d.mts +5 -0
- package/dist/esm/api/resources/dynamic/resources/types/types/ObjectPropertyAccess.mjs +5 -0
- package/dist/esm/api/resources/dynamic/resources/types/types/ObjectType.d.mts +12 -0
- package/dist/esm/api/resources/dynamic/resources/types/types/ObjectType.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/types/types/PrimitiveTypeV1.d.mts +18 -0
- package/dist/esm/api/resources/dynamic/resources/types/types/PrimitiveTypeV1.mjs +18 -0
- package/dist/esm/api/resources/dynamic/resources/types/types/SingleDiscriminatedUnionType.d.mts +13 -0
- package/dist/esm/api/resources/dynamic/resources/types/types/SingleDiscriminatedUnionType.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/types/types/SingleDiscriminatedUnionTypeNoProperties.d.mts +6 -0
- package/dist/esm/api/resources/dynamic/resources/types/types/SingleDiscriminatedUnionTypeNoProperties.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/types/types/SingleDiscriminatedUnionTypeObject.d.mts +7 -0
- package/dist/esm/api/resources/dynamic/resources/types/types/SingleDiscriminatedUnionTypeObject.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/types/types/SingleDiscriminatedUnionTypeSingleProperty.d.mts +7 -0
- package/dist/esm/api/resources/dynamic/resources/types/types/SingleDiscriminatedUnionTypeSingleProperty.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/types/types/TypeReference.d.mts +38 -0
- package/dist/esm/api/resources/dynamic/resources/types/types/TypeReference.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/types/types/UndiscriminatedUnionType.d.mts +6 -0
- package/dist/esm/api/resources/dynamic/resources/types/types/UndiscriminatedUnionType.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/types/types/index.d.mts +16 -0
- package/dist/esm/api/resources/dynamic/resources/types/types/index.mjs +16 -0
- package/dist/esm/api/resources/dynamic/resources/variables/index.d.mts +1 -0
- package/dist/esm/api/resources/dynamic/resources/variables/index.mjs +1 -0
- package/dist/esm/api/resources/dynamic/resources/variables/types/VariableDeclaration.d.mts +13 -0
- package/dist/esm/api/resources/dynamic/resources/variables/types/VariableDeclaration.mjs +2 -0
- package/dist/esm/api/resources/dynamic/resources/variables/types/index.d.mts +1 -0
- package/dist/esm/api/resources/dynamic/resources/variables/types/index.mjs +1 -0
- package/dist/esm/api/resources/generatorExec/index.d.mts +1 -0
- package/dist/esm/api/resources/generatorExec/index.mjs +1 -0
- package/dist/esm/api/resources/generatorExec/resources/config/index.d.mts +1 -0
- package/dist/esm/api/resources/generatorExec/resources/config/index.mjs +1 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/BasicLicense.d.mts +4 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/BasicLicense.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/CratesGithubPublishInfo.d.mts +7 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/CratesGithubPublishInfo.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/CratesRegistryConfig.d.mts +5 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/CratesRegistryConfig.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/CustomLicense.d.mts +3 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/CustomLicense.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/EnvironmentVariable.d.mts +1 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/EnvironmentVariable.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/GeneratorConfig.d.mts +18 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/GeneratorConfig.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/GeneratorEnvironment.d.mts +10 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/GeneratorEnvironment.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/GeneratorOutputConfig.d.mts +8 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/GeneratorOutputConfig.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/GeneratorPublishConfig.d.mts +9 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/GeneratorPublishConfig.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/GeneratorPublishTarget.d.mts +25 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/GeneratorPublishTarget.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/GeneratorRegistriesConfig.d.mts +5 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/GeneratorRegistriesConfig.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/GeneratorRegistriesConfigV2.d.mts +9 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/GeneratorRegistriesConfigV2.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/GithubOutputMode.d.mts +14 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/GithubOutputMode.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/GithubPublishInfo.d.mts +25 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/GithubPublishInfo.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/LicenseConfig.d.mts +10 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/LicenseConfig.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/LicenseId.d.mts +5 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/LicenseId.mjs +5 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/MavenCentralSignature.d.mts +5 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/MavenCentralSignature.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/MavenCentralSignatureGithubInfo.d.mts +6 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/MavenCentralSignatureGithubInfo.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/MavenGithubPublishInfo.d.mts +9 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/MavenGithubPublishInfo.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/MavenRegistryConfig.d.mts +8 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/MavenRegistryConfig.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/MavenRegistryConfigV2.d.mts +8 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/MavenRegistryConfigV2.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/NpmGithubPublishInfo.d.mts +7 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/NpmGithubPublishInfo.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/NpmRegistryConfig.d.mts +5 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/NpmRegistryConfig.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/NpmRegistryConfigV2.d.mts +5 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/NpmRegistryConfigV2.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/NugetGithubPublishInfo.d.mts +7 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/NugetGithubPublishInfo.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/NugetRegistryConfig.d.mts +5 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/NugetRegistryConfig.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/OutputMetadata.d.mts +5 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/OutputMetadata.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/OutputMetadataAuthor.d.mts +4 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/OutputMetadataAuthor.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/OutputMode.d.mts +13 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/OutputMode.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/PostmanConfig.d.mts +4 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/PostmanConfig.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/PostmanGithubPublishInfo.d.mts +5 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/PostmanGithubPublishInfo.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/PublishingMetadata.d.mts +9 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/PublishingMetadata.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/PypiGithubPublishInfo.d.mts +9 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/PypiGithubPublishInfo.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/PypiMetadata.d.mts +6 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/PypiMetadata.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/PypiRegistryConfig.d.mts +8 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/PypiRegistryConfig.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/RemoteGeneratorEnvironment.d.mts +5 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/RemoteGeneratorEnvironment.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/RubyGemsGithubPublishInfo.d.mts +7 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/RubyGemsGithubPublishInfo.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/RubyGemsRegistryConfig.d.mts +5 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/RubyGemsRegistryConfig.mjs +2 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/index.d.mts +38 -0
- package/dist/esm/api/resources/generatorExec/resources/config/types/index.mjs +38 -0
- package/dist/esm/api/resources/generatorExec/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/generatorExec/resources/index.mjs +2 -0
- package/dist/esm/api/resources/index.d.mts +4 -0
- package/dist/esm/api/resources/index.mjs +4 -0
- package/dist/esm/core/exports.d.mts +1 -0
- package/dist/esm/core/exports.mjs +1 -0
- package/dist/esm/core/fetcher/APIResponse.d.mts +20 -0
- package/dist/esm/core/fetcher/APIResponse.mjs +1 -0
- package/dist/esm/core/fetcher/BinaryResponse.d.mts +19 -0
- package/dist/esm/core/fetcher/BinaryResponse.mjs +14 -0
- package/dist/esm/core/fetcher/EndpointMetadata.d.mts +13 -0
- package/dist/esm/core/fetcher/EndpointMetadata.mjs +1 -0
- package/dist/esm/core/fetcher/EndpointSupplier.d.mts +12 -0
- package/dist/esm/core/fetcher/EndpointSupplier.mjs +19 -0
- package/dist/esm/core/fetcher/Fetcher.d.mts +48 -0
- package/dist/esm/core/fetcher/Fetcher.mjs +312 -0
- package/dist/esm/core/fetcher/Headers.d.mts +2 -0
- package/dist/esm/core/fetcher/Headers.mjs +82 -0
- package/dist/esm/core/fetcher/HttpResponsePromise.d.mts +58 -0
- package/dist/esm/core/fetcher/HttpResponsePromise.mjs +99 -0
- package/dist/esm/core/fetcher/RawResponse.d.mts +29 -0
- package/dist/esm/core/fetcher/RawResponse.mjs +40 -0
- package/dist/esm/core/fetcher/Supplier.d.mts +4 -0
- package/dist/esm/core/fetcher/Supplier.mjs +19 -0
- package/dist/esm/core/fetcher/createRequestUrl.d.mts +1 -0
- package/dist/esm/core/fetcher/createRequestUrl.mjs +5 -0
- package/dist/esm/core/fetcher/getErrorResponseBody.d.mts +1 -0
- package/dist/esm/core/fetcher/getErrorResponseBody.mjs +42 -0
- package/dist/esm/core/fetcher/getFetchFn.d.mts +1 -0
- package/dist/esm/core/fetcher/getFetchFn.mjs +14 -0
- package/dist/esm/core/fetcher/getHeader.d.mts +1 -0
- package/dist/esm/core/fetcher/getHeader.mjs +8 -0
- package/dist/esm/core/fetcher/getRequestBody.d.mts +7 -0
- package/dist/esm/core/fetcher/getRequestBody.mjs +24 -0
- package/dist/esm/core/fetcher/getResponseBody.d.mts +1 -0
- package/dist/esm/core/fetcher/getResponseBody.mjs +66 -0
- package/dist/esm/core/fetcher/index.d.mts +11 -0
- package/dist/esm/core/fetcher/index.mjs +6 -0
- package/dist/esm/core/fetcher/makeRequest.d.mts +1 -0
- package/dist/esm/core/fetcher/makeRequest.mjs +36 -0
- package/dist/esm/core/fetcher/requestWithRetries.d.mts +1 -0
- package/dist/esm/core/fetcher/requestWithRetries.mjs +64 -0
- package/dist/esm/core/fetcher/signals.d.mts +5 -0
- package/dist/esm/core/fetcher/signals.mjs +20 -0
- package/dist/esm/core/headers.d.mts +2 -0
- package/dist/esm/core/headers.mjs +27 -0
- package/dist/esm/core/index.d.mts +4 -0
- package/dist/esm/core/index.mjs +4 -0
- package/dist/esm/core/json.d.mts +15 -0
- package/dist/esm/core/json.mjs +19 -0
- package/dist/esm/core/logging/exports.d.mts +18 -0
- package/dist/esm/core/logging/exports.mjs +9 -0
- package/dist/esm/core/logging/index.d.mts +1 -0
- package/dist/esm/core/logging/index.mjs +1 -0
- package/dist/esm/core/logging/logger.d.mts +126 -0
- package/dist/esm/core/logging/logger.mjs +138 -0
- package/dist/esm/core/runtime/index.d.mts +1 -0
- package/dist/esm/core/runtime/index.mjs +1 -0
- package/dist/esm/core/runtime/runtime.d.mts +9 -0
- package/dist/esm/core/runtime/runtime.mjs +100 -0
- package/dist/esm/core/url/encodePathParam.d.mts +1 -0
- package/dist/esm/core/url/encodePathParam.mjs +18 -0
- package/dist/esm/core/url/index.d.mts +3 -0
- package/dist/esm/core/url/index.mjs +3 -0
- package/dist/esm/core/url/join.d.mts +1 -0
- package/dist/esm/core/url/join.mjs +65 -0
- package/dist/esm/core/url/qs.d.mts +6 -0
- package/dist/esm/core/url/qs.mjs +61 -0
- package/dist/esm/errors/FernIrError.d.mts +12 -0
- package/dist/esm/errors/FernIrError.mjs +28 -0
- package/dist/esm/errors/FernIrTimeoutError.d.mts +3 -0
- package/dist/esm/errors/FernIrTimeoutError.mjs +11 -0
- package/dist/esm/errors/handleNonStatusCodeError.d.mts +2 -0
- package/dist/esm/errors/handleNonStatusCodeError.mjs +29 -0
- package/dist/esm/errors/index.d.mts +2 -0
- package/dist/esm/errors/index.mjs +2 -0
- package/dist/esm/exports.d.mts +1 -0
- package/dist/esm/exports.mjs +1 -0
- package/dist/esm/index.d.mts +4 -0
- package/dist/esm/index.mjs +3 -0
- package/dist/esm/version.d.mts +1 -0
- package/dist/esm/version.mjs +1 -0
- package/package.json +65 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { WithRawResponse } from "./RawResponse.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* A promise that returns the parsed response and lets you retrieve the raw response too.
|
|
4
|
+
*/
|
|
5
|
+
export declare class HttpResponsePromise<T> extends Promise<T> {
|
|
6
|
+
private innerPromise;
|
|
7
|
+
private unwrappedPromise;
|
|
8
|
+
private constructor();
|
|
9
|
+
/**
|
|
10
|
+
* Creates an `HttpResponsePromise` from a function that returns a promise.
|
|
11
|
+
*
|
|
12
|
+
* @param fn - A function that returns a promise resolving to a `WithRawResponse` object.
|
|
13
|
+
* @param args - Arguments to pass to the function.
|
|
14
|
+
* @returns An `HttpResponsePromise` instance.
|
|
15
|
+
*/
|
|
16
|
+
static fromFunction<F extends (...args: never[]) => Promise<WithRawResponse<T>>, T>(fn: F, ...args: Parameters<F>): HttpResponsePromise<T>;
|
|
17
|
+
/**
|
|
18
|
+
* Creates a function that returns an `HttpResponsePromise` from a function that returns a promise.
|
|
19
|
+
*
|
|
20
|
+
* @param fn - A function that returns a promise resolving to a `WithRawResponse` object.
|
|
21
|
+
* @returns A function that returns an `HttpResponsePromise` instance.
|
|
22
|
+
*/
|
|
23
|
+
static interceptFunction<F extends (...args: never[]) => Promise<WithRawResponse<T>>, T = Awaited<ReturnType<F>>["data"]>(fn: F): (...args: Parameters<F>) => HttpResponsePromise<T>;
|
|
24
|
+
/**
|
|
25
|
+
* Creates an `HttpResponsePromise` from an existing promise.
|
|
26
|
+
*
|
|
27
|
+
* @param promise - A promise resolving to a `WithRawResponse` object.
|
|
28
|
+
* @returns An `HttpResponsePromise` instance.
|
|
29
|
+
*/
|
|
30
|
+
static fromPromise<T>(promise: Promise<WithRawResponse<T>>): HttpResponsePromise<T>;
|
|
31
|
+
/**
|
|
32
|
+
* Creates an `HttpResponsePromise` from an executor function.
|
|
33
|
+
*
|
|
34
|
+
* @param executor - A function that takes resolve and reject callbacks to create a promise.
|
|
35
|
+
* @returns An `HttpResponsePromise` instance.
|
|
36
|
+
*/
|
|
37
|
+
static fromExecutor<T>(executor: (resolve: (value: WithRawResponse<T>) => void, reject: (reason?: unknown) => void) => void): HttpResponsePromise<T>;
|
|
38
|
+
/**
|
|
39
|
+
* Creates an `HttpResponsePromise` from a resolved result.
|
|
40
|
+
*
|
|
41
|
+
* @param result - A `WithRawResponse` object to resolve immediately.
|
|
42
|
+
* @returns An `HttpResponsePromise` instance.
|
|
43
|
+
*/
|
|
44
|
+
static fromResult<T>(result: WithRawResponse<T>): HttpResponsePromise<T>;
|
|
45
|
+
private unwrap;
|
|
46
|
+
/** @inheritdoc */
|
|
47
|
+
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
|
|
48
|
+
/** @inheritdoc */
|
|
49
|
+
catch<TResult = never>(onrejected?: ((reason: unknown) => TResult | PromiseLike<TResult>) | null): Promise<T | TResult>;
|
|
50
|
+
/** @inheritdoc */
|
|
51
|
+
finally(onfinally?: (() => void) | null): Promise<T>;
|
|
52
|
+
/**
|
|
53
|
+
* Retrieves the data and raw response.
|
|
54
|
+
*
|
|
55
|
+
* @returns A promise resolving to a `WithRawResponse` object.
|
|
56
|
+
*/
|
|
57
|
+
withRawResponse(): Promise<WithRawResponse<T>>;
|
|
58
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* A promise that returns the parsed response and lets you retrieve the raw response too.
|
|
12
|
+
*/
|
|
13
|
+
export class HttpResponsePromise extends Promise {
|
|
14
|
+
constructor(promise) {
|
|
15
|
+
// Initialize with a no-op to avoid premature parsing
|
|
16
|
+
super((resolve) => {
|
|
17
|
+
resolve(undefined);
|
|
18
|
+
});
|
|
19
|
+
this.innerPromise = promise;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Creates an `HttpResponsePromise` from a function that returns a promise.
|
|
23
|
+
*
|
|
24
|
+
* @param fn - A function that returns a promise resolving to a `WithRawResponse` object.
|
|
25
|
+
* @param args - Arguments to pass to the function.
|
|
26
|
+
* @returns An `HttpResponsePromise` instance.
|
|
27
|
+
*/
|
|
28
|
+
static fromFunction(fn, ...args) {
|
|
29
|
+
return new HttpResponsePromise(fn(...args));
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Creates a function that returns an `HttpResponsePromise` from a function that returns a promise.
|
|
33
|
+
*
|
|
34
|
+
* @param fn - A function that returns a promise resolving to a `WithRawResponse` object.
|
|
35
|
+
* @returns A function that returns an `HttpResponsePromise` instance.
|
|
36
|
+
*/
|
|
37
|
+
static interceptFunction(fn) {
|
|
38
|
+
return (...args) => {
|
|
39
|
+
return HttpResponsePromise.fromPromise(fn(...args));
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Creates an `HttpResponsePromise` from an existing promise.
|
|
44
|
+
*
|
|
45
|
+
* @param promise - A promise resolving to a `WithRawResponse` object.
|
|
46
|
+
* @returns An `HttpResponsePromise` instance.
|
|
47
|
+
*/
|
|
48
|
+
static fromPromise(promise) {
|
|
49
|
+
return new HttpResponsePromise(promise);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Creates an `HttpResponsePromise` from an executor function.
|
|
53
|
+
*
|
|
54
|
+
* @param executor - A function that takes resolve and reject callbacks to create a promise.
|
|
55
|
+
* @returns An `HttpResponsePromise` instance.
|
|
56
|
+
*/
|
|
57
|
+
static fromExecutor(executor) {
|
|
58
|
+
const promise = new Promise(executor);
|
|
59
|
+
return new HttpResponsePromise(promise);
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Creates an `HttpResponsePromise` from a resolved result.
|
|
63
|
+
*
|
|
64
|
+
* @param result - A `WithRawResponse` object to resolve immediately.
|
|
65
|
+
* @returns An `HttpResponsePromise` instance.
|
|
66
|
+
*/
|
|
67
|
+
static fromResult(result) {
|
|
68
|
+
const promise = Promise.resolve(result);
|
|
69
|
+
return new HttpResponsePromise(promise);
|
|
70
|
+
}
|
|
71
|
+
unwrap() {
|
|
72
|
+
if (!this.unwrappedPromise) {
|
|
73
|
+
this.unwrappedPromise = this.innerPromise.then(({ data }) => data);
|
|
74
|
+
}
|
|
75
|
+
return this.unwrappedPromise;
|
|
76
|
+
}
|
|
77
|
+
/** @inheritdoc */
|
|
78
|
+
then(onfulfilled, onrejected) {
|
|
79
|
+
return this.unwrap().then(onfulfilled, onrejected);
|
|
80
|
+
}
|
|
81
|
+
/** @inheritdoc */
|
|
82
|
+
catch(onrejected) {
|
|
83
|
+
return this.unwrap().catch(onrejected);
|
|
84
|
+
}
|
|
85
|
+
/** @inheritdoc */
|
|
86
|
+
finally(onfinally) {
|
|
87
|
+
return this.unwrap().finally(onfinally);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Retrieves the data and raw response.
|
|
91
|
+
*
|
|
92
|
+
* @returns A promise resolving to a `WithRawResponse` object.
|
|
93
|
+
*/
|
|
94
|
+
withRawResponse() {
|
|
95
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
96
|
+
return yield this.innerPromise;
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The raw response from the fetch call excluding the body.
|
|
3
|
+
*/
|
|
4
|
+
export type RawResponse = Omit<{
|
|
5
|
+
[K in keyof Response as Response[K] extends Function ? never : K]: Response[K];
|
|
6
|
+
}, "ok" | "body" | "bodyUsed">;
|
|
7
|
+
/**
|
|
8
|
+
* A raw response indicating that the request was aborted.
|
|
9
|
+
*/
|
|
10
|
+
export declare const abortRawResponse: RawResponse;
|
|
11
|
+
/**
|
|
12
|
+
* A raw response indicating an unknown error.
|
|
13
|
+
*/
|
|
14
|
+
export declare const unknownRawResponse: RawResponse;
|
|
15
|
+
/**
|
|
16
|
+
* Converts a `RawResponse` object into a `RawResponse` by extracting its properties,
|
|
17
|
+
* excluding the `body` and `bodyUsed` fields.
|
|
18
|
+
*
|
|
19
|
+
* @param response - The `RawResponse` object to convert.
|
|
20
|
+
* @returns A `RawResponse` object containing the extracted properties of the input response.
|
|
21
|
+
*/
|
|
22
|
+
export declare function toRawResponse(response: Response): RawResponse;
|
|
23
|
+
/**
|
|
24
|
+
* Creates a `RawResponse` from a standard `Response` object.
|
|
25
|
+
*/
|
|
26
|
+
export interface WithRawResponse<T> {
|
|
27
|
+
readonly data: T;
|
|
28
|
+
readonly rawResponse: RawResponse;
|
|
29
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Headers } from "./Headers.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* A raw response indicating that the request was aborted.
|
|
4
|
+
*/
|
|
5
|
+
export const abortRawResponse = {
|
|
6
|
+
headers: new Headers(),
|
|
7
|
+
redirected: false,
|
|
8
|
+
status: 499,
|
|
9
|
+
statusText: "Client Closed Request",
|
|
10
|
+
type: "error",
|
|
11
|
+
url: "",
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* A raw response indicating an unknown error.
|
|
15
|
+
*/
|
|
16
|
+
export const unknownRawResponse = {
|
|
17
|
+
headers: new Headers(),
|
|
18
|
+
redirected: false,
|
|
19
|
+
status: 0,
|
|
20
|
+
statusText: "Unknown Error",
|
|
21
|
+
type: "error",
|
|
22
|
+
url: "",
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Converts a `RawResponse` object into a `RawResponse` by extracting its properties,
|
|
26
|
+
* excluding the `body` and `bodyUsed` fields.
|
|
27
|
+
*
|
|
28
|
+
* @param response - The `RawResponse` object to convert.
|
|
29
|
+
* @returns A `RawResponse` object containing the extracted properties of the input response.
|
|
30
|
+
*/
|
|
31
|
+
export function toRawResponse(response) {
|
|
32
|
+
return {
|
|
33
|
+
headers: response.headers,
|
|
34
|
+
redirected: response.redirected,
|
|
35
|
+
status: response.status,
|
|
36
|
+
statusText: response.statusText,
|
|
37
|
+
type: response.type,
|
|
38
|
+
url: response.url,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
export const Supplier = {
|
|
11
|
+
get: (supplier) => __awaiter(void 0, void 0, void 0, function* () {
|
|
12
|
+
if (typeof supplier === "function") {
|
|
13
|
+
return supplier();
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
return supplier;
|
|
17
|
+
}
|
|
18
|
+
}),
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function createRequestUrl(baseUrl: string, queryParameters?: Record<string, unknown>): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getErrorResponseBody(response: Response): Promise<unknown>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { fromJson } from "../json.mjs";
|
|
11
|
+
import { getResponseBody } from "./getResponseBody.mjs";
|
|
12
|
+
export function getErrorResponseBody(response) {
|
|
13
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
14
|
+
var _a, _b, _c;
|
|
15
|
+
let contentType = (_a = response.headers.get("Content-Type")) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
16
|
+
if (contentType == null || contentType.length === 0) {
|
|
17
|
+
return getResponseBody(response);
|
|
18
|
+
}
|
|
19
|
+
if (contentType.indexOf(";") !== -1) {
|
|
20
|
+
contentType = (_c = (_b = contentType.split(";")[0]) === null || _b === void 0 ? void 0 : _b.trim()) !== null && _c !== void 0 ? _c : "";
|
|
21
|
+
}
|
|
22
|
+
switch (contentType) {
|
|
23
|
+
case "application/hal+json":
|
|
24
|
+
case "application/json":
|
|
25
|
+
case "application/ld+json":
|
|
26
|
+
case "application/problem+json":
|
|
27
|
+
case "application/vnd.api+json":
|
|
28
|
+
case "text/json": {
|
|
29
|
+
const text = yield response.text();
|
|
30
|
+
return text.length > 0 ? fromJson(text) : undefined;
|
|
31
|
+
}
|
|
32
|
+
default:
|
|
33
|
+
if (contentType.startsWith("application/vnd.") && contentType.endsWith("+json")) {
|
|
34
|
+
const text = yield response.text();
|
|
35
|
+
return text.length > 0 ? fromJson(text) : undefined;
|
|
36
|
+
}
|
|
37
|
+
// Fallback to plain text if content type is not recognized
|
|
38
|
+
// Even if no body is present, the response will be an empty string
|
|
39
|
+
return yield response.text();
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getFetchFn(): Promise<typeof fetch>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
export function getFetchFn() {
|
|
11
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12
|
+
return fetch;
|
|
13
|
+
});
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getHeader(headers: Record<string, any>, header: string): string | undefined;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { toJson } from "../json.mjs";
|
|
11
|
+
import { toQueryString } from "../url/qs.mjs";
|
|
12
|
+
export function getRequestBody(_a) {
|
|
13
|
+
return __awaiter(this, arguments, void 0, function* ({ body, type }) {
|
|
14
|
+
if (type === "form") {
|
|
15
|
+
return toQueryString(body, { arrayFormat: "repeat", encode: true });
|
|
16
|
+
}
|
|
17
|
+
if (type.includes("json")) {
|
|
18
|
+
return toJson(body);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
return body;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getResponseBody(response: Response, responseType?: string): Promise<unknown>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { fromJson } from "../json.mjs";
|
|
11
|
+
import { getBinaryResponse } from "./BinaryResponse.mjs";
|
|
12
|
+
export function getResponseBody(response, responseType) {
|
|
13
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
14
|
+
switch (responseType) {
|
|
15
|
+
case "binary-response":
|
|
16
|
+
return getBinaryResponse(response);
|
|
17
|
+
case "blob":
|
|
18
|
+
return yield response.blob();
|
|
19
|
+
case "arrayBuffer":
|
|
20
|
+
return yield response.arrayBuffer();
|
|
21
|
+
case "sse":
|
|
22
|
+
if (response.body == null) {
|
|
23
|
+
return {
|
|
24
|
+
ok: false,
|
|
25
|
+
error: {
|
|
26
|
+
reason: "body-is-null",
|
|
27
|
+
statusCode: response.status,
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
return response.body;
|
|
32
|
+
case "streaming":
|
|
33
|
+
if (response.body == null) {
|
|
34
|
+
return {
|
|
35
|
+
ok: false,
|
|
36
|
+
error: {
|
|
37
|
+
reason: "body-is-null",
|
|
38
|
+
statusCode: response.status,
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
return response.body;
|
|
43
|
+
case "text":
|
|
44
|
+
return yield response.text();
|
|
45
|
+
}
|
|
46
|
+
// if responseType is "json" or not specified, try to parse as JSON
|
|
47
|
+
const text = yield response.text();
|
|
48
|
+
if (text.length > 0) {
|
|
49
|
+
try {
|
|
50
|
+
const responseBody = fromJson(text);
|
|
51
|
+
return responseBody;
|
|
52
|
+
}
|
|
53
|
+
catch (_err) {
|
|
54
|
+
return {
|
|
55
|
+
ok: false,
|
|
56
|
+
error: {
|
|
57
|
+
reason: "non-json",
|
|
58
|
+
statusCode: response.status,
|
|
59
|
+
rawBody: text,
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return undefined;
|
|
65
|
+
});
|
|
66
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type { APIResponse } from "./APIResponse.mjs";
|
|
2
|
+
export type { BinaryResponse } from "./BinaryResponse.mjs";
|
|
3
|
+
export type { EndpointMetadata } from "./EndpointMetadata.mjs";
|
|
4
|
+
export { EndpointSupplier } from "./EndpointSupplier.mjs";
|
|
5
|
+
export type { Fetcher, FetchFunction } from "./Fetcher.mjs";
|
|
6
|
+
export { fetcher } from "./Fetcher.mjs";
|
|
7
|
+
export { getHeader } from "./getHeader.mjs";
|
|
8
|
+
export { HttpResponsePromise } from "./HttpResponsePromise.mjs";
|
|
9
|
+
export type { RawResponse, WithRawResponse } from "./RawResponse.mjs";
|
|
10
|
+
export { abortRawResponse, toRawResponse, unknownRawResponse } from "./RawResponse.mjs";
|
|
11
|
+
export { Supplier } from "./Supplier.mjs";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { EndpointSupplier } from "./EndpointSupplier.mjs";
|
|
2
|
+
export { fetcher } from "./Fetcher.mjs";
|
|
3
|
+
export { getHeader } from "./getHeader.mjs";
|
|
4
|
+
export { HttpResponsePromise } from "./HttpResponsePromise.mjs";
|
|
5
|
+
export { abortRawResponse, toRawResponse, unknownRawResponse } from "./RawResponse.mjs";
|
|
6
|
+
export { Supplier } from "./Supplier.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const makeRequest: (fetchFn: (url: string, init: RequestInit) => Promise<Response>, url: string, method: string, headers: Headers | Record<string, string>, requestBody: BodyInit | undefined, timeoutMs?: number, abortSignal?: AbortSignal, withCredentials?: boolean, duplex?: "half") => Promise<Response>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { anySignal, getTimeoutSignal } from "./signals.mjs";
|
|
11
|
+
export const makeRequest = (fetchFn, url, method, headers, requestBody, timeoutMs, abortSignal, withCredentials, duplex) => __awaiter(void 0, void 0, void 0, function* () {
|
|
12
|
+
const signals = [];
|
|
13
|
+
let timeoutAbortId;
|
|
14
|
+
if (timeoutMs != null) {
|
|
15
|
+
const { signal, abortId } = getTimeoutSignal(timeoutMs);
|
|
16
|
+
timeoutAbortId = abortId;
|
|
17
|
+
signals.push(signal);
|
|
18
|
+
}
|
|
19
|
+
if (abortSignal != null) {
|
|
20
|
+
signals.push(abortSignal);
|
|
21
|
+
}
|
|
22
|
+
const newSignals = anySignal(signals);
|
|
23
|
+
const response = yield fetchFn(url, {
|
|
24
|
+
method: method,
|
|
25
|
+
headers,
|
|
26
|
+
body: requestBody,
|
|
27
|
+
signal: newSignals,
|
|
28
|
+
credentials: withCredentials ? "include" : undefined,
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
duplex,
|
|
31
|
+
});
|
|
32
|
+
if (timeoutAbortId != null) {
|
|
33
|
+
clearTimeout(timeoutAbortId);
|
|
34
|
+
}
|
|
35
|
+
return response;
|
|
36
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function requestWithRetries(requestFn: () => Promise<Response>, maxRetries?: number): Promise<Response>;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
const INITIAL_RETRY_DELAY = 1000; // in milliseconds
|
|
11
|
+
const MAX_RETRY_DELAY = 60000; // in milliseconds
|
|
12
|
+
const DEFAULT_MAX_RETRIES = 2;
|
|
13
|
+
const JITTER_FACTOR = 0.2; // 20% random jitter
|
|
14
|
+
function addPositiveJitter(delay) {
|
|
15
|
+
const jitterMultiplier = 1 + Math.random() * JITTER_FACTOR;
|
|
16
|
+
return delay * jitterMultiplier;
|
|
17
|
+
}
|
|
18
|
+
function addSymmetricJitter(delay) {
|
|
19
|
+
const jitterMultiplier = 1 + (Math.random() - 0.5) * JITTER_FACTOR;
|
|
20
|
+
return delay * jitterMultiplier;
|
|
21
|
+
}
|
|
22
|
+
function getRetryDelayFromHeaders(response, retryAttempt) {
|
|
23
|
+
const retryAfter = response.headers.get("Retry-After");
|
|
24
|
+
if (retryAfter) {
|
|
25
|
+
const retryAfterSeconds = parseInt(retryAfter, 10);
|
|
26
|
+
if (!Number.isNaN(retryAfterSeconds) && retryAfterSeconds > 0) {
|
|
27
|
+
return Math.min(retryAfterSeconds * 1000, MAX_RETRY_DELAY);
|
|
28
|
+
}
|
|
29
|
+
const retryAfterDate = new Date(retryAfter);
|
|
30
|
+
if (!Number.isNaN(retryAfterDate.getTime())) {
|
|
31
|
+
const delay = retryAfterDate.getTime() - Date.now();
|
|
32
|
+
if (delay > 0) {
|
|
33
|
+
return Math.min(Math.max(delay, 0), MAX_RETRY_DELAY);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
const rateLimitReset = response.headers.get("X-RateLimit-Reset");
|
|
38
|
+
if (rateLimitReset) {
|
|
39
|
+
const resetTime = parseInt(rateLimitReset, 10);
|
|
40
|
+
if (!Number.isNaN(resetTime)) {
|
|
41
|
+
const delay = resetTime * 1000 - Date.now();
|
|
42
|
+
if (delay > 0) {
|
|
43
|
+
return addPositiveJitter(Math.min(delay, MAX_RETRY_DELAY));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return addSymmetricJitter(Math.min(INITIAL_RETRY_DELAY * Math.pow(2, retryAttempt), MAX_RETRY_DELAY));
|
|
48
|
+
}
|
|
49
|
+
export function requestWithRetries(requestFn_1) {
|
|
50
|
+
return __awaiter(this, arguments, void 0, function* (requestFn, maxRetries = DEFAULT_MAX_RETRIES) {
|
|
51
|
+
let response = yield requestFn();
|
|
52
|
+
for (let i = 0; i < maxRetries; ++i) {
|
|
53
|
+
if ([408, 429].includes(response.status) || response.status >= 500) {
|
|
54
|
+
const delay = getRetryDelayFromHeaders(response, i);
|
|
55
|
+
yield new Promise((resolve) => setTimeout(resolve, delay));
|
|
56
|
+
response = yield requestFn();
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return response;
|
|
63
|
+
});
|
|
64
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const TIMEOUT = "timeout";
|
|
2
|
+
export function getTimeoutSignal(timeoutMs) {
|
|
3
|
+
const controller = new AbortController();
|
|
4
|
+
const abortId = setTimeout(() => controller.abort(TIMEOUT), timeoutMs);
|
|
5
|
+
return { signal: controller.signal, abortId };
|
|
6
|
+
}
|
|
7
|
+
export function anySignal(...args) {
|
|
8
|
+
const signals = (args.length === 1 && Array.isArray(args[0]) ? args[0] : args);
|
|
9
|
+
const controller = new AbortController();
|
|
10
|
+
for (const signal of signals) {
|
|
11
|
+
if (signal.aborted) {
|
|
12
|
+
controller.abort(signal === null || signal === void 0 ? void 0 : signal.reason);
|
|
13
|
+
break;
|
|
14
|
+
}
|
|
15
|
+
signal.addEventListener("abort", () => controller.abort(signal === null || signal === void 0 ? void 0 : signal.reason), {
|
|
16
|
+
signal: controller.signal,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
return controller.signal;
|
|
20
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export function mergeHeaders(...headersArray) {
|
|
2
|
+
const result = {};
|
|
3
|
+
for (const [key, value] of headersArray
|
|
4
|
+
.filter((headers) => headers != null)
|
|
5
|
+
.flatMap((headers) => Object.entries(headers))) {
|
|
6
|
+
const insensitiveKey = key.toLowerCase();
|
|
7
|
+
if (value != null) {
|
|
8
|
+
result[insensitiveKey] = value;
|
|
9
|
+
}
|
|
10
|
+
else if (insensitiveKey in result) {
|
|
11
|
+
delete result[insensitiveKey];
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
return result;
|
|
15
|
+
}
|
|
16
|
+
export function mergeOnlyDefinedHeaders(...headersArray) {
|
|
17
|
+
const result = {};
|
|
18
|
+
for (const [key, value] of headersArray
|
|
19
|
+
.filter((headers) => headers != null)
|
|
20
|
+
.flatMap((headers) => Object.entries(headers))) {
|
|
21
|
+
const insensitiveKey = key.toLowerCase();
|
|
22
|
+
if (value != null) {
|
|
23
|
+
result[insensitiveKey] = value;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return result;
|
|
27
|
+
}
|