@beignet/core
Version:
Core framework primitives for Beignet
102 lines (100 loc) • 2.23 kB
text/typescript
/**
* @beignet/core/contracts
*
* HTTP contract definitions and builders for Beignet.
*/
/**
* Standard Schema type re-exported for contract authors.
*/
export type { StandardSchemaV1 } from "@standard-schema/spec";
/**
* Idempotency metadata types for contracts.
*/
export type {
IdempotencyMeta,
IdempotencyScopeMode,
} from "../idempotency/index.js";
/**
* Contract builder exports.
*/
export {
ContractBuilder,
type DefineContractOptions,
defineContract,
} from "./contract-builder.js";
/**
* Contract group exports.
*/
export { ContractGroup, defineContractGroup } from "./contract-group.js";
/**
* Contract-like helper exports.
*/
export {
type ContractLike,
type ResolveContract,
resolveContract,
} from "./contract-like.js";
/**
* Contract lifecycle metadata and errors.
*/
export {
type ContractDeprecationMeta,
ContractLifecycleError,
type ContractLifecycleFindingCode,
} from "./lifecycle.js";
/**
* OpenAPI operation metadata type.
*/
export type { OpenAPIOperationMeta } from "./openapi-meta.js";
/**
* Path template parsing exports.
*/
export {
type ParsedPathTemplate,
type PathTemplateSegment,
parsePathTemplate,
} from "./path-template.js";
/**
* Rate limit metadata types for contracts.
*/
export type { RateLimitMeta, RateLimitScope } from "./rate-limit.js";
/**
* Success status helpers shared by the server route binder and tooling.
*/
export {
getSuccess2xxStatuses,
type IsSingle2xx,
inferSoleSuccessStatus,
type Success2xxKeys,
} from "./success-status.js";
/**
* Contract config and inference types.
*/
export type {
AnyContract,
BodyHttpMethod,
ContractErrorDefinition,
ContractErrorResponses,
ContractHeaderSchemas,
ContractMeta,
ContractResponseSchema,
ContractResponses,
HttpContractConfig,
HttpMethod,
InferHeaderSchemaInput,
InferHeaderSchemaOutput,
InferInput,
InferOutput,
MergedContractErrorResponses,
ResponsesFromErrorDefinitions,
StandardErrorResponseBody,
StandardErrorResponseSchema,
StandardSchema,
} from "./types.js";
export {
BEIGNET_ERROR_OWNER_HEADER,
BODY_HTTP_METHODS,
getContractHeaderSchemas,
methodSupportsRequestBody,
STANDARD_ERROR_RESPONSE_SCHEMA,
} from "./types.js";