diff --git a/packages/backend-openapi-utils/api-report.md b/packages/backend-openapi-utils/api-report.md index 7e5024b15b..af102d4df8 100644 --- a/packages/backend-openapi-utils/api-report.md +++ b/packages/backend-openapi-utils/api-report.md @@ -3,28 +3,642 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts +import type { ContentObject } from 'openapi3-ts'; +import { default as core_2 } from 'express-serve-static-core'; +import { FromSchema } from 'json-schema-to-ts'; +import { JSONSchema7 } from 'json-schema-to-ts'; +import type { OpenAPIObject } from 'openapi3-ts'; +import type { ParameterObject } from 'openapi3-ts'; +import type { ReferenceObject } from 'openapi3-ts'; +import type { RequestBodyObject } from 'openapi3-ts'; +import type { ResponseObject } from 'openapi3-ts'; import { Router } from 'express'; +import type { SchemaObject } from 'openapi3-ts'; // @public -export interface ApiRouter extends Router { +export interface ApiRouter extends Router { // (undocumented) - all: core.RequestMatcher; + all: DocRequestMatcher; // (undocumented) - delete: core.RequestMatcher; + delete: DocRequestMatcher; // (undocumented) - get: core.RequestMatcher; + get: DocRequestMatcher; // (undocumented) - head: core.RequestMatcher; + head: DocRequestMatcher; // (undocumented) - options: core.RequestMatcher; + options: DocRequestMatcher; // (undocumented) - patch: core.RequestMatcher; + patch: DocRequestMatcher; // (undocumented) - post: core.RequestMatcher; + post: DocRequestMatcher; // (undocumented) - put: core.RequestMatcher; + put: DocRequestMatcher; } // @public (undocumented) -export namespace core {} +type ComponentRef< + Doc extends RequiredDoc, + Type extends ComponentTypes, + Ref extends ImmutableReferenceObject, +> = Ref extends { + $ref: `#/components/${Type}/${infer Name}`; +} + ? Name extends keyof Doc['components'][Type] + ? Doc['components'][Type][Name] extends ImmutableReferenceObject + ? ComponentRef + : Doc['components'][Type][Name] + : never + : never; + +// @public (undocumented) +type ComponentTypes = Extract< + keyof Doc['components'], + string +>; + +// @public (undocumented) +type ConvertAll = []> = T extends [ + infer First extends JSONSchema7, + ...infer Rest, +] + ? ConvertAll]> + : R; + +// @public (undocumented) +interface CookieObject extends ParameterObject { + // (undocumented) + in: 'cookie'; + // (undocumented) + style?: 'form'; +} + +// @public (undocumented) +type CookieSchema< + Doc extends RequiredDoc, + Path extends PathTemplate>, + Method extends DocPathMethod, +> = ParametersSchema, Method, ImmutableCookieObject>; + +declare namespace core { + export { + RequiredDoc, + PathDoc, + ValueOf, + PathTemplate, + DocPath, + DocPathTemplate, + DocPathMethod, + MethodAwareDocPath, + DocOperation, + ComponentTypes, + ComponentRef, + SchemaRef, + ObjectWithContentSchema, + UnionToIntersection, + LastOf, + Push, + TuplifyUnion, + ConvertAll, + UnknownIfNever, + ToTypeSafe, + DiscriminateUnion, + MapDiscriminatedUnion, + PickOptionalKeys, + PickRequiredKeys, + OptionalMap, + RequiredMap, + FullMap, + Filter, + DocRequestHandler, + DocRequestHandlerParams, + DocRequestMatcher, + Immutable, + ImmutableObject, + ImmutableReferenceObject, + ImmutableOpenAPIObject, + ImmutableContentObject, + ImmutableRequestBodyObject, + ImmutableResponseObject, + ImmutableParameterObject, + HeaderObject, + ImmutableHeaderObject, + CookieObject, + ImmutableCookieObject, + QueryObject, + ImmutableQueryObject, + PathObject, + ImmutablePathObject, + ImmutableSchemaObject, + DocParameter, + DocParameters, + ResolveDocParameterSchema, + ParameterSchema, + MapToSchema, + ParametersSchema, + HeaderSchema, + CookieSchema, + PathSchema, + QuerySchema, + RequestBody, + RequestBodySchema, + RequestBodyToJsonSchema, + Response_2 as Response, + ResponseSchemas, + ResponseBodyToJsonSchema, + }; +} +export { core }; + +// @public (undocumented) +type DiscriminateUnion = Extract< + T, + Record +>; + +// @public (undocumented) +type DocOperation< + Doc extends RequiredDoc, + Path extends keyof Doc['paths'], + Method extends keyof Doc['paths'][Path], +> = Doc['paths'][Path][Method]; + +// @public (undocumented) +type DocParameter< + Doc extends RequiredDoc, + Path extends Extract, + Method extends keyof Doc['paths'][Path], + Parameter extends keyof Doc['paths'][Path][Method]['parameters'], +> = DocOperation< + Doc, + Path, + Method +>['parameters'][Parameter] extends ImmutableReferenceObject + ? 'parameters' extends ComponentTypes + ? ComponentRef< + Doc, + 'parameters', + DocOperation['parameters'][Parameter] + > + : never + : DocOperation['parameters'][Parameter]; + +// @public (undocumented) +type DocParameters< + Doc extends RequiredDoc, + Path extends Extract, + Method extends keyof Doc['paths'][Path], +> = DocOperation['parameters'] extends ReadonlyArray + ? { + [Index in keyof DocOperation< + Doc, + Path, + Method + >['parameters']]: DocParameter; + } + : never; + +// @public +type DocPath< + Doc extends PathDoc, + Path extends PathTemplate>, +> = ValueOf<{ + [Template in Extract< + keyof Doc['paths'], + string + >]: Path extends PathTemplate