@sebspark/openapi-core 1.1.0 → 1.3.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/dist/index.d.mts +7 -2
- package/dist/index.d.ts +7 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AxiosError } from 'axios';
|
|
2
|
+
import { OutgoingHttpHeaders } from 'http';
|
|
2
3
|
import { RetrySettings } from '@sebspark/retry';
|
|
3
4
|
import { Request, Response, NextFunction } from 'express';
|
|
4
5
|
|
|
@@ -146,6 +147,9 @@ type Serialized<T> = {
|
|
|
146
147
|
[P in keyof T]: T[P] extends Date ? string : T[P] extends Array<infer U> ? Array<Serialized<U>> : T[P] extends (...args: any) => any ? T[P] : T[P] extends object ? Serialized<T[P]> : T[P];
|
|
147
148
|
};
|
|
148
149
|
type PartiallySerialized<T> = T | Serialized<T>;
|
|
150
|
+
type LowerCaseHeaders<T> = {
|
|
151
|
+
[P in keyof T as Lowercase<P & string>]: T[P];
|
|
152
|
+
};
|
|
149
153
|
|
|
150
154
|
type Verb = 'get' | 'post' | 'put' | 'patch' | 'delete';
|
|
151
155
|
type APIResponse<Data = undefined, Headers = undefined> = Data extends undefined ? Headers extends undefined ? Empty : {
|
|
@@ -178,7 +182,8 @@ type PayloadRequestArgs = RequestArgs & {
|
|
|
178
182
|
body?: Record<string, string>;
|
|
179
183
|
};
|
|
180
184
|
type RequestOptions = {
|
|
181
|
-
retry
|
|
185
|
+
retry?: RetrySettings;
|
|
186
|
+
headers?: OutgoingHttpHeaders & Record<string, string>;
|
|
182
187
|
};
|
|
183
188
|
type ClientOptions = RequestOptions & {};
|
|
184
189
|
type BaseClient = {
|
|
@@ -709,4 +714,4 @@ type LinkObject = {
|
|
|
709
714
|
type CallbackObject = Record<string, PathItemObject | ReferenceObject>;
|
|
710
715
|
type SecurityRequirementObject = Record<string, string[]>;
|
|
711
716
|
|
|
712
|
-
export { type APIResponse, type APIServerDefinition, type APIServerOptions, type AsyncApiComponentsObject, type AsyncApiDocument, type AsyncOperationObject, type AvroArray, type AvroEnum, type AvroField, type AvroMap, type AvroPrimitive, type AvroRecord, type AvroSchema, type AvroUnion, BadGatewayError, BadRequestError, type BaseClient, type CallbackObject, type ChannelItemObject, type ClientErrorCode, type ClientOptions, type ComponentsObject, ConflictError, type ContactObject, type CorrelationIdObject, type DefaultValue, type DiscriminatorObject, type EncodingObject, type ErrorCode, type Example, type ExampleObject, ExpectationFailedError, type ExternalDocumentationObject, FailedDependencyError, ForbiddenError, GatewayTimeoutError, type GenericRouteHandler, GoneError, HTTPVersionNotSupportedError, type HeaderObject, type HeaderStyle, HttpError, type HttpMethod, IMATeapotError, type InfoObject, InsufficientStorageError, InternalServerError, LengthRequiredError, type LicenseObject, type LinkObject, LockedError, LoopDetectedError, type MediaTypeObject, type MessageObject, type MessageTraitObject, MethodNotAllowedError, MisdirectedRequestError, NetworkAuthenticationRequiredError, NotAcceptableError, NotExtendedError, NotFoundError, NotImplementedError, type OAuthFlowObject, type OAuthFlowsObject, type OpenApiDocument, type OperationObject, type OperationTraitObject, type ParameterIn, type ParameterObject, type ParameterStyle, type PartiallySerialized, type PathItemObject, type PayloadRequestArgs, PayloadTooLargeError, PaymentRequiredError, PreconditionFailedError, PreconditionRequiredError, ProxyAuthenticationRequiredError, RangeNotSatisfiableError, type ReferenceObject, type RequestArgs, type RequestBodyObject, RequestHeaderFieldsTooLargeError, type RequestOptions, RequestTimeoutError, type ResponseObject, type ResponsesObject, type Route, type RouteHandler, type SchemaEnum, type SchemaObject, type SchemaType, type SecurityRequirementObject, type SecuritySchemeObject, type SecuritySchemeType, type Serialized, type ServerErrorCode, type ServerObject, type ServerVariableObject, ServiceUnavailableError, type TagObject, TooEarlyError, TooManyRequestsError, URITooLongError, UnauthorizedError, UnavailableForLegalReasonsError, UnprocessableEntityError, UnsupportedMediaTypeError, UpgradeRequiredError, VariantAlsoNegotiatesError, type Verb, type XMLObject, createHttpError, fromAxiosError };
|
|
717
|
+
export { type APIResponse, type APIServerDefinition, type APIServerOptions, type AsyncApiComponentsObject, type AsyncApiDocument, type AsyncOperationObject, type AvroArray, type AvroEnum, type AvroField, type AvroMap, type AvroPrimitive, type AvroRecord, type AvroSchema, type AvroUnion, BadGatewayError, BadRequestError, type BaseClient, type CallbackObject, type ChannelItemObject, type ClientErrorCode, type ClientOptions, type ComponentsObject, ConflictError, type ContactObject, type CorrelationIdObject, type DefaultValue, type DiscriminatorObject, type EncodingObject, type ErrorCode, type Example, type ExampleObject, ExpectationFailedError, type ExternalDocumentationObject, FailedDependencyError, ForbiddenError, GatewayTimeoutError, type GenericRouteHandler, GoneError, HTTPVersionNotSupportedError, type HeaderObject, type HeaderStyle, HttpError, type HttpMethod, IMATeapotError, type InfoObject, InsufficientStorageError, InternalServerError, LengthRequiredError, type LicenseObject, type LinkObject, LockedError, LoopDetectedError, type LowerCaseHeaders, type MediaTypeObject, type MessageObject, type MessageTraitObject, MethodNotAllowedError, MisdirectedRequestError, NetworkAuthenticationRequiredError, NotAcceptableError, NotExtendedError, NotFoundError, NotImplementedError, type OAuthFlowObject, type OAuthFlowsObject, type OpenApiDocument, type OperationObject, type OperationTraitObject, type ParameterIn, type ParameterObject, type ParameterStyle, type PartiallySerialized, type PathItemObject, type PayloadRequestArgs, PayloadTooLargeError, PaymentRequiredError, PreconditionFailedError, PreconditionRequiredError, ProxyAuthenticationRequiredError, RangeNotSatisfiableError, type ReferenceObject, type RequestArgs, type RequestBodyObject, RequestHeaderFieldsTooLargeError, type RequestOptions, RequestTimeoutError, type ResponseObject, type ResponsesObject, type Route, type RouteHandler, type SchemaEnum, type SchemaObject, type SchemaType, type SecurityRequirementObject, type SecuritySchemeObject, type SecuritySchemeType, type Serialized, type ServerErrorCode, type ServerObject, type ServerVariableObject, ServiceUnavailableError, type TagObject, TooEarlyError, TooManyRequestsError, URITooLongError, UnauthorizedError, UnavailableForLegalReasonsError, UnprocessableEntityError, UnsupportedMediaTypeError, UpgradeRequiredError, VariantAlsoNegotiatesError, type Verb, type XMLObject, createHttpError, fromAxiosError };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AxiosError } from 'axios';
|
|
2
|
+
import { OutgoingHttpHeaders } from 'http';
|
|
2
3
|
import { RetrySettings } from '@sebspark/retry';
|
|
3
4
|
import { Request, Response, NextFunction } from 'express';
|
|
4
5
|
|
|
@@ -146,6 +147,9 @@ type Serialized<T> = {
|
|
|
146
147
|
[P in keyof T]: T[P] extends Date ? string : T[P] extends Array<infer U> ? Array<Serialized<U>> : T[P] extends (...args: any) => any ? T[P] : T[P] extends object ? Serialized<T[P]> : T[P];
|
|
147
148
|
};
|
|
148
149
|
type PartiallySerialized<T> = T | Serialized<T>;
|
|
150
|
+
type LowerCaseHeaders<T> = {
|
|
151
|
+
[P in keyof T as Lowercase<P & string>]: T[P];
|
|
152
|
+
};
|
|
149
153
|
|
|
150
154
|
type Verb = 'get' | 'post' | 'put' | 'patch' | 'delete';
|
|
151
155
|
type APIResponse<Data = undefined, Headers = undefined> = Data extends undefined ? Headers extends undefined ? Empty : {
|
|
@@ -178,7 +182,8 @@ type PayloadRequestArgs = RequestArgs & {
|
|
|
178
182
|
body?: Record<string, string>;
|
|
179
183
|
};
|
|
180
184
|
type RequestOptions = {
|
|
181
|
-
retry
|
|
185
|
+
retry?: RetrySettings;
|
|
186
|
+
headers?: OutgoingHttpHeaders & Record<string, string>;
|
|
182
187
|
};
|
|
183
188
|
type ClientOptions = RequestOptions & {};
|
|
184
189
|
type BaseClient = {
|
|
@@ -709,4 +714,4 @@ type LinkObject = {
|
|
|
709
714
|
type CallbackObject = Record<string, PathItemObject | ReferenceObject>;
|
|
710
715
|
type SecurityRequirementObject = Record<string, string[]>;
|
|
711
716
|
|
|
712
|
-
export { type APIResponse, type APIServerDefinition, type APIServerOptions, type AsyncApiComponentsObject, type AsyncApiDocument, type AsyncOperationObject, type AvroArray, type AvroEnum, type AvroField, type AvroMap, type AvroPrimitive, type AvroRecord, type AvroSchema, type AvroUnion, BadGatewayError, BadRequestError, type BaseClient, type CallbackObject, type ChannelItemObject, type ClientErrorCode, type ClientOptions, type ComponentsObject, ConflictError, type ContactObject, type CorrelationIdObject, type DefaultValue, type DiscriminatorObject, type EncodingObject, type ErrorCode, type Example, type ExampleObject, ExpectationFailedError, type ExternalDocumentationObject, FailedDependencyError, ForbiddenError, GatewayTimeoutError, type GenericRouteHandler, GoneError, HTTPVersionNotSupportedError, type HeaderObject, type HeaderStyle, HttpError, type HttpMethod, IMATeapotError, type InfoObject, InsufficientStorageError, InternalServerError, LengthRequiredError, type LicenseObject, type LinkObject, LockedError, LoopDetectedError, type MediaTypeObject, type MessageObject, type MessageTraitObject, MethodNotAllowedError, MisdirectedRequestError, NetworkAuthenticationRequiredError, NotAcceptableError, NotExtendedError, NotFoundError, NotImplementedError, type OAuthFlowObject, type OAuthFlowsObject, type OpenApiDocument, type OperationObject, type OperationTraitObject, type ParameterIn, type ParameterObject, type ParameterStyle, type PartiallySerialized, type PathItemObject, type PayloadRequestArgs, PayloadTooLargeError, PaymentRequiredError, PreconditionFailedError, PreconditionRequiredError, ProxyAuthenticationRequiredError, RangeNotSatisfiableError, type ReferenceObject, type RequestArgs, type RequestBodyObject, RequestHeaderFieldsTooLargeError, type RequestOptions, RequestTimeoutError, type ResponseObject, type ResponsesObject, type Route, type RouteHandler, type SchemaEnum, type SchemaObject, type SchemaType, type SecurityRequirementObject, type SecuritySchemeObject, type SecuritySchemeType, type Serialized, type ServerErrorCode, type ServerObject, type ServerVariableObject, ServiceUnavailableError, type TagObject, TooEarlyError, TooManyRequestsError, URITooLongError, UnauthorizedError, UnavailableForLegalReasonsError, UnprocessableEntityError, UnsupportedMediaTypeError, UpgradeRequiredError, VariantAlsoNegotiatesError, type Verb, type XMLObject, createHttpError, fromAxiosError };
|
|
717
|
+
export { type APIResponse, type APIServerDefinition, type APIServerOptions, type AsyncApiComponentsObject, type AsyncApiDocument, type AsyncOperationObject, type AvroArray, type AvroEnum, type AvroField, type AvroMap, type AvroPrimitive, type AvroRecord, type AvroSchema, type AvroUnion, BadGatewayError, BadRequestError, type BaseClient, type CallbackObject, type ChannelItemObject, type ClientErrorCode, type ClientOptions, type ComponentsObject, ConflictError, type ContactObject, type CorrelationIdObject, type DefaultValue, type DiscriminatorObject, type EncodingObject, type ErrorCode, type Example, type ExampleObject, ExpectationFailedError, type ExternalDocumentationObject, FailedDependencyError, ForbiddenError, GatewayTimeoutError, type GenericRouteHandler, GoneError, HTTPVersionNotSupportedError, type HeaderObject, type HeaderStyle, HttpError, type HttpMethod, IMATeapotError, type InfoObject, InsufficientStorageError, InternalServerError, LengthRequiredError, type LicenseObject, type LinkObject, LockedError, LoopDetectedError, type LowerCaseHeaders, type MediaTypeObject, type MessageObject, type MessageTraitObject, MethodNotAllowedError, MisdirectedRequestError, NetworkAuthenticationRequiredError, NotAcceptableError, NotExtendedError, NotFoundError, NotImplementedError, type OAuthFlowObject, type OAuthFlowsObject, type OpenApiDocument, type OperationObject, type OperationTraitObject, type ParameterIn, type ParameterObject, type ParameterStyle, type PartiallySerialized, type PathItemObject, type PayloadRequestArgs, PayloadTooLargeError, PaymentRequiredError, PreconditionFailedError, PreconditionRequiredError, ProxyAuthenticationRequiredError, RangeNotSatisfiableError, type ReferenceObject, type RequestArgs, type RequestBodyObject, RequestHeaderFieldsTooLargeError, type RequestOptions, RequestTimeoutError, type ResponseObject, type ResponsesObject, type Route, type RouteHandler, type SchemaEnum, type SchemaObject, type SchemaType, type SecurityRequirementObject, type SecuritySchemeObject, type SecuritySchemeType, type Serialized, type ServerErrorCode, type ServerObject, type ServerVariableObject, ServiceUnavailableError, type TagObject, TooEarlyError, TooManyRequestsError, URITooLongError, UnauthorizedError, UnavailableForLegalReasonsError, UnprocessableEntityError, UnsupportedMediaTypeError, UpgradeRequiredError, VariantAlsoNegotiatesError, type Verb, type XMLObject, createHttpError, fromAxiosError };
|