@temporary-name/server 1.9.3-alpha.2957dbc009ec31fa21575f028b83c96651cba827 → 1.9.3-alpha.305aebe633f301e28426c6b15cdfd58ddf45641c
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/adapters/aws-lambda/index.d.mts +3 -3
- package/dist/adapters/aws-lambda/index.d.ts +3 -3
- package/dist/adapters/aws-lambda/index.mjs +3 -3
- package/dist/adapters/fetch/index.d.mts +3 -3
- package/dist/adapters/fetch/index.d.ts +3 -3
- package/dist/adapters/fetch/index.mjs +3 -3
- package/dist/adapters/node/index.d.mts +3 -3
- package/dist/adapters/node/index.d.ts +3 -3
- package/dist/adapters/node/index.mjs +3 -3
- package/dist/adapters/standard/index.d.mts +3 -3
- package/dist/adapters/standard/index.d.ts +3 -3
- package/dist/adapters/standard/index.mjs +3 -3
- package/dist/index.d.mts +338 -34
- package/dist/index.d.ts +338 -34
- package/dist/index.mjs +424 -96
- package/dist/openapi/index.d.mts +16 -34
- package/dist/openapi/index.d.ts +16 -34
- package/dist/openapi/index.mjs +339 -298
- package/dist/shared/{server.DfUs5c4R.d.ts → server.B0LJ_wu-.d.ts} +3 -3
- package/dist/shared/{server.L8lRAYBR.d.mts → server.BQZMQrPe.d.mts} +3 -3
- package/dist/shared/{server.CpS0m3at.mjs → server.CYa9puL2.mjs} +3 -3
- package/dist/shared/server.ChOv1yG3.mjs +319 -0
- package/dist/shared/server.CjPiuQYH.d.mts +51 -0
- package/dist/shared/server.CjPiuQYH.d.ts +51 -0
- package/dist/shared/server.Cza0RB3u.mjs +160 -0
- package/dist/shared/{server.DPD7R7h_.d.mts → server.DXPMDozZ.d.mts} +182 -20
- package/dist/shared/{server.DPD7R7h_.d.ts → server.DXPMDozZ.d.ts} +182 -20
- package/dist/shared/server.Ny4yD6yY.mjs +525 -0
- package/package.json +10 -11
- package/dist/shared/server.B7tjiDal.mjs +0 -354
package/dist/openapi/index.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
1
|
+
import { Contract } from '@temporary-name/server';
|
|
2
|
+
import { OpenAPI, Promisable, Value, HTTPPath, HTTPMethod } from '@temporary-name/shared';
|
|
3
|
+
export { OpenAPI } from '@temporary-name/shared';
|
|
4
|
+
import { Z as ZodToJsonSchemaConverterOptions } from '../shared/server.CjPiuQYH.js';
|
|
5
|
+
import { d as AnySchema, b as Contract$1, a9 as TraverseContractProcedureCallbackOptions, $ as ContractRouter, u as AnyRouter } from '../shared/server.DXPMDozZ.js';
|
|
5
6
|
import { JSONSchema } from '@temporary-name/interop/json-schema-typed/draft-2020-12';
|
|
6
7
|
export { JSONSchema, ContentEncoding as JSONSchemaContentEncoding, Format as JSONSchemaFormat, TypeName as JSONSchemaTypeName } from '@temporary-name/interop/json-schema-typed/draft-2020-12';
|
|
8
|
+
import '@temporary-name/server/openapi';
|
|
9
|
+
import '@temporary-name/zod';
|
|
7
10
|
|
|
8
11
|
type OverrideOperationValue = Partial<OpenAPI.OperationObject> | ((current: OpenAPI.OperationObject, procedure: Contract) => OpenAPI.OperationObject);
|
|
9
12
|
/**
|
|
@@ -54,29 +57,18 @@ interface SchemaConvertOptions {
|
|
|
54
57
|
*/
|
|
55
58
|
minStructureDepthForRef?: number;
|
|
56
59
|
}
|
|
57
|
-
|
|
58
|
-
convert(schemas: AnySchema | undefined, options: SchemaConvertOptions): Promisable<[required: boolean, jsonSchema: JSONSchema]>;
|
|
59
|
-
}
|
|
60
|
-
interface ConditionalSchemaConverter extends SchemaConverter {
|
|
61
|
-
condition(schema: AnySchema | undefined, options: SchemaConvertOptions): Promisable<boolean>;
|
|
62
|
-
}
|
|
63
|
-
declare class CompositeSchemaConverter implements SchemaConverter {
|
|
64
|
-
private readonly converters;
|
|
65
|
-
constructor(converters: readonly ConditionalSchemaConverter[]);
|
|
66
|
-
convert(schema: AnySchema | undefined, options: SchemaConvertOptions): Promise<[required: boolean, jsonSchema: JSONSchema]>;
|
|
67
|
-
}
|
|
60
|
+
type SchemaConverter = (schemas: AnySchema | undefined, options: SchemaConvertOptions) => Promisable<[required: boolean, jsonSchema: JSONSchema]>;
|
|
68
61
|
|
|
69
|
-
interface
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
interface OpenAPIGeneratorGenerateOptions extends Partial<Omit<OpenAPI.Document, 'openapi'>> {
|
|
62
|
+
interface OpenAPIGeneratorGenerateOptions {
|
|
63
|
+
spec?: Partial<Omit<OpenAPI.Document, 'openapi'>>;
|
|
64
|
+
schemaConverter?: ZodToJsonSchemaConverterOptions | SchemaConverter;
|
|
73
65
|
/**
|
|
74
66
|
* Exclude procedures from the OpenAPI specification.
|
|
75
67
|
*
|
|
76
68
|
* @deprecated Use `filter` option instead.
|
|
77
69
|
* @default () => false
|
|
78
70
|
*/
|
|
79
|
-
exclude?: (procedure: Contract, path: readonly string[]) => boolean;
|
|
71
|
+
exclude?: (procedure: Contract$1, path: readonly string[]) => boolean;
|
|
80
72
|
/**
|
|
81
73
|
* Filter procedures. Return `false` to exclude a procedure from the OpenAPI specification.
|
|
82
74
|
*
|
|
@@ -116,21 +108,11 @@ interface OpenAPIGeneratorGenerateOptions extends Partial<Omit<OpenAPI.Document,
|
|
|
116
108
|
}>;
|
|
117
109
|
}
|
|
118
110
|
/**
|
|
119
|
-
*
|
|
111
|
+
* Generates OpenAPI specifications from oRPC routers/contracts.
|
|
120
112
|
*
|
|
121
113
|
* @see {@link https://orpc.unnoq.com/docs/openapi/openapi-specification OpenAPI Specification Docs}
|
|
122
114
|
*/
|
|
123
|
-
declare
|
|
124
|
-
#private;
|
|
125
|
-
private readonly converter;
|
|
126
|
-
constructor(options?: OpenAPIGeneratorOptions);
|
|
127
|
-
/**
|
|
128
|
-
* Generates OpenAPI specifications from oRPC routers/contracts.
|
|
129
|
-
*
|
|
130
|
-
* @see {@link https://orpc.unnoq.com/docs/openapi/openapi-specification OpenAPI Specification Docs}
|
|
131
|
-
*/
|
|
132
|
-
generate(router: ContractRouter | AnyRouter, options?: OpenAPIGeneratorGenerateOptions): Promise<OpenAPI.Document>;
|
|
133
|
-
}
|
|
115
|
+
declare function generateOpenApiSpec(router: ContractRouter | AnyRouter, options?: OpenAPIGeneratorGenerateOptions): Promise<OpenAPI.Document>;
|
|
134
116
|
|
|
135
117
|
/**
|
|
136
118
|
* @internal
|
|
@@ -199,5 +181,5 @@ declare const oo: {
|
|
|
199
181
|
spec: typeof customOpenAPIOperation;
|
|
200
182
|
};
|
|
201
183
|
|
|
202
|
-
export {
|
|
203
|
-
export type {
|
|
184
|
+
export { LOGIC_KEYWORDS, applyCustomOpenAPIOperation, applySchemaOptionality, checkParamsSchema, customOpenAPIOperation, expandArrayableSchema, expandUnionSchema, filterSchemaBranches, generateOpenApiSpec, getCustomOpenAPIOperation, isAnySchema, isFileSchema, isObjectSchema, isPrimitiveSchema, oo, resolveOpenAPIJsonSchemaRef, separateObjectSchema, toOpenAPIContent, toOpenAPIEventIteratorContent, toOpenAPIMethod, toOpenAPIParameters, toOpenAPIPath, toOpenAPISchema };
|
|
185
|
+
export type { FileSchema, ObjectSchema, OpenAPIGeneratorGenerateOptions, OverrideOperationValue, SchemaConvertOptions, SchemaConverter, SchemaConverterComponent };
|