@orpc/openapi 0.0.0-next.eb37cbe → 0.0.0-next.eb3d98a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +99 -0
- package/dist/adapters/aws-lambda/index.d.mts +19 -0
- package/dist/adapters/aws-lambda/index.d.ts +19 -0
- package/dist/adapters/aws-lambda/index.mjs +18 -0
- package/dist/adapters/fetch/index.d.mts +19 -0
- package/dist/adapters/fetch/index.d.ts +19 -0
- package/dist/adapters/fetch/index.mjs +18 -0
- package/dist/adapters/node/index.d.mts +19 -0
- package/dist/adapters/node/index.d.ts +19 -0
- package/dist/adapters/node/index.mjs +18 -0
- package/dist/adapters/standard/index.d.mts +29 -0
- package/dist/adapters/standard/index.d.ts +29 -0
- package/dist/adapters/standard/index.mjs +9 -0
- package/dist/index.d.mts +110 -0
- package/dist/index.d.ts +110 -0
- package/dist/index.mjs +41 -0
- package/dist/plugins/index.d.mts +69 -0
- package/dist/plugins/index.d.ts +69 -0
- package/dist/plugins/index.mjs +108 -0
- package/dist/shared/openapi.BVXcB0u4.mjs +187 -0
- package/dist/shared/openapi.BtoY8ZFF.mjs +742 -0
- package/dist/shared/openapi.CQmjvnb0.d.mts +31 -0
- package/dist/shared/openapi.CQmjvnb0.d.ts +31 -0
- package/dist/shared/openapi.DPAN3GVs.d.mts +108 -0
- package/dist/shared/openapi.DPAN3GVs.d.ts +108 -0
- package/package.json +35 -25
- package/dist/chunk-KNYXLM77.js +0 -107
- package/dist/fetch.js +0 -594
- package/dist/index.js +0 -362
- package/dist/src/fetch/bracket-notation.d.ts +0 -84
- package/dist/src/fetch/index.d.ts +0 -10
- package/dist/src/fetch/input-builder-full.d.ts +0 -11
- package/dist/src/fetch/input-builder-simple.d.ts +0 -6
- package/dist/src/fetch/openapi-handler-server.d.ts +0 -7
- package/dist/src/fetch/openapi-handler-serverless.d.ts +0 -7
- package/dist/src/fetch/openapi-handler.d.ts +0 -30
- package/dist/src/fetch/openapi-payload-codec.d.ts +0 -15
- package/dist/src/fetch/openapi-procedure-matcher.d.ts +0 -19
- package/dist/src/fetch/schema-coercer.d.ts +0 -10
- package/dist/src/index.d.ts +0 -12
- package/dist/src/json-serializer.d.ts +0 -5
- package/dist/src/openapi-content-builder.d.ts +0 -10
- package/dist/src/openapi-generator.d.ts +0 -51
- package/dist/src/openapi-parameters-builder.d.ts +0 -9
- package/dist/src/openapi-path-parser.d.ts +0 -8
- package/dist/src/openapi.d.ts +0 -3
- package/dist/src/schema-converter.d.ts +0 -16
- package/dist/src/schema-utils.d.ts +0 -11
- package/dist/src/schema.d.ts +0 -12
- package/dist/src/utils.d.ts +0 -18
package/dist/src/openapi.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Schema } from '@orpc/contract';
|
|
2
|
-
import type { JSONSchema } from './schema';
|
|
3
|
-
export interface SchemaConvertOptions {
|
|
4
|
-
strategy: 'input' | 'output';
|
|
5
|
-
}
|
|
6
|
-
export interface SchemaConverter {
|
|
7
|
-
condition: (schema: Schema, options: SchemaConvertOptions) => boolean;
|
|
8
|
-
convert: (schema: Schema, options: SchemaConvertOptions) => JSONSchema.JSONSchema;
|
|
9
|
-
}
|
|
10
|
-
export declare class CompositeSchemaConverter implements SchemaConverter {
|
|
11
|
-
private readonly converters;
|
|
12
|
-
constructor(converters: SchemaConverter[]);
|
|
13
|
-
condition(): boolean;
|
|
14
|
-
convert(schema: Schema, options: SchemaConvertOptions): JSONSchema.JSONSchema;
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=schema-converter.d.ts.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type FileSchema, type JSONSchema, type ObjectSchema } from './schema';
|
|
2
|
-
export declare class SchemaUtils {
|
|
3
|
-
isFileSchema(schema: JSONSchema.JSONSchema): schema is FileSchema;
|
|
4
|
-
isObjectSchema(schema: JSONSchema.JSONSchema): schema is ObjectSchema;
|
|
5
|
-
isAnySchema(schema: JSONSchema.JSONSchema): boolean;
|
|
6
|
-
isUndefinableSchema(schema: JSONSchema.JSONSchema): boolean;
|
|
7
|
-
separateObjectSchema(schema: ObjectSchema, separatedProperties: string[]): [matched: ObjectSchema, rest: ObjectSchema];
|
|
8
|
-
filterSchemaBranches(schema: JSONSchema.JSONSchema, check: (schema: JSONSchema.JSONSchema) => boolean, matches?: JSONSchema.JSONSchema[]): [matches: JSONSchema.JSONSchema[], rest: JSONSchema.JSONSchema | undefined];
|
|
9
|
-
}
|
|
10
|
-
export type PublicSchemaUtils = Pick<SchemaUtils, keyof SchemaUtils>;
|
|
11
|
-
//# sourceMappingURL=schema-utils.d.ts.map
|
package/dist/src/schema.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as JSONSchema from 'json-schema-typed/draft-2020-12';
|
|
2
|
-
export { Format as JSONSchemaFormat } from 'json-schema-typed/draft-2020-12';
|
|
3
|
-
export { JSONSchema };
|
|
4
|
-
export type ObjectSchema = JSONSchema.JSONSchema & {
|
|
5
|
-
type: 'object';
|
|
6
|
-
} & object;
|
|
7
|
-
export type FileSchema = JSONSchema.JSONSchema & {
|
|
8
|
-
type: 'string';
|
|
9
|
-
contentMediaType: string;
|
|
10
|
-
} & object;
|
|
11
|
-
export declare const NON_LOGIC_KEYWORDS: ("$anchor" | "$comment" | "$defs" | "$dynamicAnchor" | "$dynamicRef" | "$id" | "$schema" | "$vocabulary" | "contentEncoding" | "contentMediaType" | "default" | "definitions" | "deprecated" | "description" | "examples" | "format" | "readOnly" | "title" | "writeOnly")[];
|
|
12
|
-
//# sourceMappingURL=schema.d.ts.map
|
package/dist/src/utils.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { ContractRouter, HTTPPath, WELL_CONTRACT_PROCEDURE } from '@orpc/contract';
|
|
2
|
-
import type { ANY_PROCEDURE, ANY_ROUTER, Lazy } from '@orpc/server';
|
|
3
|
-
export interface EachLeafOptions {
|
|
4
|
-
router: ContractRouter | ANY_ROUTER;
|
|
5
|
-
path: string[];
|
|
6
|
-
}
|
|
7
|
-
export interface EachLeafCallbackOptions {
|
|
8
|
-
contract: WELL_CONTRACT_PROCEDURE;
|
|
9
|
-
path: string[];
|
|
10
|
-
}
|
|
11
|
-
export interface EachContractLeafResultItem {
|
|
12
|
-
router: Lazy<ANY_PROCEDURE> | Lazy<Record<string, ANY_ROUTER> | ANY_PROCEDURE>;
|
|
13
|
-
path: string[];
|
|
14
|
-
}
|
|
15
|
-
export declare function forEachContractProcedure(options: EachLeafOptions, callback: (options: EachLeafCallbackOptions) => void, result?: EachContractLeafResultItem[], isCurrentRouterContract?: boolean): EachContractLeafResultItem[];
|
|
16
|
-
export declare function forEachAllContractProcedure(router: ContractRouter | ANY_ROUTER, callback: (options: EachLeafCallbackOptions) => void): Promise<void>;
|
|
17
|
-
export declare function standardizeHTTPPath(path: HTTPPath): HTTPPath;
|
|
18
|
-
//# sourceMappingURL=utils.d.ts.map
|