Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ts-rest/core

Package Overview
Dependencies
Maintainers
1
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ts-rest/core - npm Package Compare versions

Comparing version 3.22.1-pre.0 to 3.23.0-beta.0

6

CHANGELOG.md
# @ts-rest/core
## 3.22.1-pre.0
## 3.23.0-beta.0
### Patch Changes
### Minor Changes
- Test prerelease
- b84b0df: Add 'metadata' property to routes

@@ -9,0 +9,0 @@ ## 3.22.0

{
"name": "@ts-rest/core",
"version": "3.22.1-pre.0",
"version": "3.23.0-beta.0",
"description": "RPC-like experience over a regular REST API, with type safe server implementations 🪄",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -12,7 +12,3 @@ import { Merge, Opaque, Prettify, WithoutUnknown } from './type-utils';

type Path = string;
/**
* A query endpoint. In REST terms, one using GET.
*/
export type AppRouteQuery = {
method: 'GET';
type AppRouteCommon = {
path: Path;

@@ -26,19 +22,18 @@ pathParams?: unknown;

responses: Record<number, unknown>;
metadata?: unknown;
};
/**
* A query endpoint. In REST terms, one using GET.
*/
export type AppRouteQuery = AppRouteCommon & {
method: 'GET';
};
/**
* A mutation endpoint. In REST terms, one using POST, PUT,
* PATCH, or DELETE.
*/
export type AppRouteMutation = {
export type AppRouteMutation = AppRouteCommon & {
method: 'POST' | 'DELETE' | 'PUT' | 'PATCH';
path: Path;
pathParams?: unknown;
contentType?: 'application/json' | 'multipart/form-data';
body: unknown;
query?: unknown;
headers?: unknown;
summary?: string;
description?: string;
deprecated?: boolean;
responses: Record<number, unknown>;
};

@@ -45,0 +40,0 @@ type ValidatedHeaders<T extends AppRoute, TOptions extends RouterOptions, TOptionsApplied = ApplyOptions<T, TOptions>> = 'headers' extends keyof TOptionsApplied ? TOptionsApplied['headers'] extends MixedZodError<infer A, infer B> ? {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc