Socket
Socket
Sign inDemoInstall

@effect-ts-app/core

Package Overview
Dependencies
Maintainers
1
Versions
344
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@effect-ts-app/core - npm Package Compare versions

Comparing version 0.18.5 to 0.19.0

Schema/_api/fromProps.d.ts

4

package.json
{
"name": "@effect-ts-app/core",
"version": "0.18.5",
"version": "0.19.0",
"main": "./index.js",

@@ -44,3 +44,3 @@ "license": "MIT",

},
"gitHead": "09e2122c459a95595fce12f4aea0c0a258da9948"
"gitHead": "348d1536a49dda172d24ee013b664862e803639c"
}

@@ -11,1 +11,2 @@ export * from "./futureDate";

export * from "./tuple";
export * from "./fromProps";

@@ -23,2 +23,3 @@ "use strict";

__exportStar(require("./tuple"), exports);
__exportStar(require("./fromProps"), exports);
//# sourceMappingURL=index.js.map

@@ -8,2 +8,3 @@ import * as A from "@effect-ts/core/Collections/Immutable/Array";

import { Lazy } from "../Function";
import { FromProperty } from "./_api";
import * as MO from "./_schema";

@@ -39,4 +40,4 @@ import { UUID } from "./_schema";

export declare function findAnnotation<A>(schema: MO.SchemaAny, id: MO.Annotation<A>): A | undefined;
export declare type SupportedDefaultsSchema = MO.Schema<unknown, MO.AnyError, SupportedDefaults, any, MO.AnyError, any, any>;
export declare type DefaultProperty = MO.Property<any, any, any, any>;
export declare type SupportedDefaultsSchema = MO.Schema<any, MO.AnyError, SupportedDefaults, any, MO.AnyError, any, any>;
export declare type DefaultProperty = FromProperty<any, any, any, any>;
export declare type DefaultPropertyRecord = Record<PropertyKey, DefaultProperty>;

@@ -43,0 +44,0 @@ declare type ParsedShapeOfBla<X extends MO.Schema<any, any, any, any, any, any, any>> = X extends MO.Schema<any, any, infer Y, any, any, any, any> ? Y : never;

import * as Lens from "@effect-ts/monocle/Lens";
import { ParsedShapeOf } from "@effect-ts/schema";
import { AnyProperty, ParsedShapeOf, PropertyRecord } from "@effect-ts/schema";
import { Compute } from "../Compute";

@@ -129,6 +129,6 @@ import * as MO from "./_schema";

export declare type IfPathPropsProvided<Path extends string, B extends MO.PropertyRecord, C> = PathParams<Path> extends never ? C : PathParams<Path> extends keyof B ? C : ["You must specify the properties that you expect in the path", never];
export declare type PropsExtensions<Props extends MO.PropertyRecord> = {
include: <NewProps extends Record<string, MO.AnyProperty>>(fnc: (props: Props) => NewProps) => NewProps;
export declare type PropsExtensions<Props extends PropertyRecord> = {
include: <NewProps extends Record<string, AnyProperty>>(fnc: (props: Props) => NewProps) => NewProps;
};
export declare function Model<M>(__name?: string): <Props extends MO.PropertyRecord = {}>(props: Props) => Model<M, MO.SchemaProperties<Props>> & PropsExtensions<Props extends MO.PropertyRecord ? Props : never>;
export declare function Model<M>(__name?: string): <Props extends PropertyRecord = {}>(props: Props) => Model<M, MO.SchemaProperties<Props>> & PropsExtensions<Props extends PropertyRecord ? Props : never>;
/**

@@ -138,4 +138,4 @@ * See {@link Req} but with Props

export declare function ReqProps<M>(): {
<Path_1 extends string, Method extends Methods, Props extends MO.PropertyRecord = {}>(method: Method, path: Path_1): IfPathPropsProvided<Path_1, Props, Method extends "GET" | "DELETE" ? QueryRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path_1>>>, MO.SchemaProperties<Omit<Props, PathParams<Path_1>>>, undefined, MO.SchemaProperties<Props>> : BodyRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path_1>>>, MO.SchemaProperties<Omit<Props, PathParams<Path_1>>>, undefined, undefined, MO.SchemaProperties<Props>>>;
<Path_2 extends string, Method_1 extends Methods, Props_1 extends MO.PropertyRecord>(method: Method_1, path: Path_2, props: Props_1): IfPathPropsProvided<Path_2, Props_1, Method_1 extends "GET" | "DELETE" ? QueryRequest<M, MO.SchemaProperties<Pick<Props_1, PathParams<Path_2>>>, MO.SchemaProperties<Omit<Props_1, PathParams<Path_2>>>, undefined, MO.SchemaProperties<Props_1>> : BodyRequest<M, MO.SchemaProperties<Pick<Props_1, PathParams<Path_2>>>, MO.SchemaProperties<Omit<Props_1, PathParams<Path_2>>>, undefined, undefined, MO.SchemaProperties<Props_1>>>;
<Path_1 extends string, Method extends Methods, Props extends PropertyRecord = {}>(method: Method, path: Path_1): IfPathPropsProvided<Path_1, Props, Method extends "GET" | "DELETE" ? QueryRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path_1>>>, MO.SchemaProperties<Omit<Props, PathParams<Path_1>>>, undefined, MO.SchemaProperties<Props>> : BodyRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path_1>>>, MO.SchemaProperties<Omit<Props, PathParams<Path_1>>>, undefined, undefined, MO.SchemaProperties<Props>>>;
<Path_2 extends string, Method_1 extends Methods, Props_1 extends PropertyRecord>(method: Method_1, path: Path_2, props: Props_1): IfPathPropsProvided<Path_2, Props_1, Method_1 extends "GET" | "DELETE" ? QueryRequest<M, MO.SchemaProperties<Pick<Props_1, PathParams<Path_2>>>, MO.SchemaProperties<Omit<Props_1, PathParams<Path_2>>>, undefined, MO.SchemaProperties<Props_1>> : BodyRequest<M, MO.SchemaProperties<Pick<Props_1, PathParams<Path_2>>>, MO.SchemaProperties<Omit<Props_1, PathParams<Path_2>>>, undefined, undefined, MO.SchemaProperties<Props_1>>>;
};

@@ -148,8 +148,8 @@ /**

export declare function Delete<Path extends string>(path: Path): <M>(__name?: string | undefined) => {
<Props extends MO.PropertyRecord = {}>(): IfPathPropsProvided<Path, Props, QueryRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path>>>, MO.SchemaProperties<Omit<Props, PathParams<Path>>>, undefined, MO.SchemaProperties<Props>>>;
<Props_1 extends MO.PropertyRecord>(props: Props_1): IfPathPropsProvided<Path, Props_1, QueryRequest<M, MO.SchemaProperties<Pick<Props_1, PathParams<Path>>>, MO.SchemaProperties<Omit<Props_1, PathParams<Path>>>, undefined, MO.SchemaProperties<Props_1>>>;
<Props extends PropertyRecord = {}>(): IfPathPropsProvided<Path, Props, QueryRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path>>>, MO.SchemaProperties<Omit<Props, PathParams<Path>>>, undefined, MO.SchemaProperties<Props>>>;
<Props_1 extends PropertyRecord>(props: Props_1): IfPathPropsProvided<Path, Props_1, QueryRequest<M, MO.SchemaProperties<Pick<Props_1, PathParams<Path>>>, MO.SchemaProperties<Omit<Props_1, PathParams<Path>>>, undefined, MO.SchemaProperties<Props_1>>>;
};
export declare function DeleteSpecial<Path extends string>(path: Path): <M>(__name?: string | undefined) => {
<Props extends MO.PropertyRecord = {}>(): IfPathPropsProvided<Path, Props, BodyRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path>>>, MO.SchemaProperties<Omit<Props, PathParams<Path>>>, undefined, undefined, MO.SchemaProperties<Props>>>;
<Props_1 extends MO.PropertyRecord>(props: Props_1): IfPathPropsProvided<Path, Props_1, BodyRequest<M, MO.SchemaProperties<Pick<Props_1, PathParams<Path>>>, MO.SchemaProperties<Omit<Props_1, PathParams<Path>>>, undefined, undefined, MO.SchemaProperties<Props_1>>>;
<Props extends PropertyRecord = {}>(): IfPathPropsProvided<Path, Props, BodyRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path>>>, MO.SchemaProperties<Omit<Props, PathParams<Path>>>, undefined, undefined, MO.SchemaProperties<Props>>>;
<Props_1 extends PropertyRecord>(props: Props_1): IfPathPropsProvided<Path, Props_1, BodyRequest<M, MO.SchemaProperties<Pick<Props_1, PathParams<Path>>>, MO.SchemaProperties<Omit<Props_1, PathParams<Path>>>, undefined, undefined, MO.SchemaProperties<Props_1>>>;
};

@@ -162,6 +162,6 @@ /**

export declare function Put<Path extends string>(path: Path): <M>(__name?: string | undefined) => {
<Props extends MO.PropertyRecord = {}>(): IfPathPropsProvided<Path, Props, BodyRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path>>>, MO.SchemaProperties<Omit<Props, PathParams<Path>>>, undefined, undefined, MO.SchemaProperties<Props>>>;
<Props_1 extends MO.PropertyRecord>(props: Props_1): IfPathPropsProvided<Path, Props_1, BodyRequest<M, MO.SchemaProperties<Pick<Props_1, PathParams<Path>>>, MO.SchemaProperties<Omit<Props_1, PathParams<Path>>>, undefined, undefined, MO.SchemaProperties<Props_1>>>;
<Props extends PropertyRecord = {}>(): IfPathPropsProvided<Path, Props, BodyRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path>>>, MO.SchemaProperties<Omit<Props, PathParams<Path>>>, undefined, undefined, MO.SchemaProperties<Props>>>;
<Props_1 extends PropertyRecord>(props: Props_1): IfPathPropsProvided<Path, Props_1, BodyRequest<M, MO.SchemaProperties<Pick<Props_1, PathParams<Path>>>, MO.SchemaProperties<Omit<Props_1, PathParams<Path>>>, undefined, undefined, MO.SchemaProperties<Props_1>>>;
};
export declare function PutSpecial<Path extends string>(path: Path): <M>(__name?: string | undefined) => <Props extends MO.PropertyRecord>(self: MO.SchemaProperties<Props>) => IfPathPropsProvided<Path, Props, BodyRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path>>>, MO.SchemaProperties<Omit<Props, PathParams<Path>>>, undefined, undefined, MO.SchemaProperties<Props>>>;
export declare function PutSpecial<Path extends string>(path: Path): <M>(__name?: string | undefined) => <Props extends PropertyRecord>(self: MO.SchemaProperties<Props>) => IfPathPropsProvided<Path, Props, BodyRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path>>>, MO.SchemaProperties<Omit<Props, PathParams<Path>>>, undefined, undefined, MO.SchemaProperties<Props>>>;
/**

@@ -173,6 +173,6 @@ * GET http method.

export declare function Get<Path extends string>(path: Path): <M>(__name?: string | undefined) => {
<Props extends MO.PropertyRecord = {}>(): IfPathPropsProvided<Path, Props, QueryRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path>>>, MO.SchemaProperties<Omit<Props, PathParams<Path>>>, undefined, MO.SchemaProperties<Props>>>;
<Props_1 extends MO.PropertyRecord>(props: Props_1): IfPathPropsProvided<Path, Props_1, QueryRequest<M, MO.SchemaProperties<Pick<Props_1, PathParams<Path>>>, MO.SchemaProperties<Omit<Props_1, PathParams<Path>>>, undefined, MO.SchemaProperties<Props_1>>>;
<Props extends PropertyRecord = {}>(): IfPathPropsProvided<Path, Props, QueryRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path>>>, MO.SchemaProperties<Omit<Props, PathParams<Path>>>, undefined, MO.SchemaProperties<Props>>>;
<Props_1 extends PropertyRecord>(props: Props_1): IfPathPropsProvided<Path, Props_1, QueryRequest<M, MO.SchemaProperties<Pick<Props_1, PathParams<Path>>>, MO.SchemaProperties<Omit<Props_1, PathParams<Path>>>, undefined, MO.SchemaProperties<Props_1>>>;
};
export declare function GetSpecial<Path extends string>(path: Path): <M>(__name?: string | undefined) => <Props extends MO.PropertyRecord>(self: MO.SchemaProperties<Props>) => IfPathPropsProvided<Path, Props, QueryRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path>>>, MO.SchemaProperties<Omit<Props, PathParams<Path>>>, undefined, MO.SchemaProperties<Props>>>;
export declare function GetSpecial<Path extends string>(path: Path): <M>(__name?: string | undefined) => <Props extends PropertyRecord>(self: MO.SchemaProperties<Props>) => IfPathPropsProvided<Path, Props, QueryRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path>>>, MO.SchemaProperties<Omit<Props, PathParams<Path>>>, undefined, MO.SchemaProperties<Props>>>;
/**

@@ -184,6 +184,6 @@ * PATCH http method.

export declare function Patch<Path extends string>(path: Path): <M>(__name?: string | undefined) => {
<Props extends MO.PropertyRecord = {}>(): IfPathPropsProvided<Path, Props, BodyRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path>>>, MO.SchemaProperties<Omit<Props, PathParams<Path>>>, undefined, undefined, MO.SchemaProperties<Props>>>;
<Props_1 extends MO.PropertyRecord>(props: Props_1): IfPathPropsProvided<Path, Props_1, BodyRequest<M, MO.SchemaProperties<Pick<Props_1, PathParams<Path>>>, MO.SchemaProperties<Omit<Props_1, PathParams<Path>>>, undefined, undefined, MO.SchemaProperties<Props_1>>>;
<Props extends PropertyRecord = {}>(): IfPathPropsProvided<Path, Props, BodyRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path>>>, MO.SchemaProperties<Omit<Props, PathParams<Path>>>, undefined, undefined, MO.SchemaProperties<Props>>>;
<Props_1 extends PropertyRecord>(props: Props_1): IfPathPropsProvided<Path, Props_1, BodyRequest<M, MO.SchemaProperties<Pick<Props_1, PathParams<Path>>>, MO.SchemaProperties<Omit<Props_1, PathParams<Path>>>, undefined, undefined, MO.SchemaProperties<Props_1>>>;
};
export declare function PatchSpecial<Path extends string>(path: Path): <M>(__name?: string | undefined) => <Props extends MO.PropertyRecord>(self: MO.SchemaProperties<Props>) => IfPathPropsProvided<Path, Props, BodyRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path>>>, MO.SchemaProperties<Omit<Props, PathParams<Path>>>, undefined, undefined, MO.SchemaProperties<Props>>>;
export declare function PatchSpecial<Path extends string>(path: Path): <M>(__name?: string | undefined) => <Props extends PropertyRecord>(self: MO.SchemaProperties<Props>) => IfPathPropsProvided<Path, Props, BodyRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path>>>, MO.SchemaProperties<Omit<Props, PathParams<Path>>>, undefined, undefined, MO.SchemaProperties<Props>>>;
/**

@@ -195,19 +195,19 @@ * POST http method.

export declare function Post<Path extends string>(path: Path): <M>(__name?: string | undefined) => {
<Props extends MO.PropertyRecord = {}>(): IfPathPropsProvided<Path, Props, BodyRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path>>>, MO.SchemaProperties<Omit<Props, PathParams<Path>>>, undefined, undefined, MO.SchemaProperties<Props>>>;
<Props_1 extends MO.PropertyRecord>(props: Props_1): IfPathPropsProvided<Path, Props_1, BodyRequest<M, MO.SchemaProperties<Pick<Props_1, PathParams<Path>>>, MO.SchemaProperties<Omit<Props_1, PathParams<Path>>>, undefined, undefined, MO.SchemaProperties<Props_1>>>;
<Props extends PropertyRecord = {}>(): IfPathPropsProvided<Path, Props, BodyRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path>>>, MO.SchemaProperties<Omit<Props, PathParams<Path>>>, undefined, undefined, MO.SchemaProperties<Props>>>;
<Props_1 extends PropertyRecord>(props: Props_1): IfPathPropsProvided<Path, Props_1, BodyRequest<M, MO.SchemaProperties<Pick<Props_1, PathParams<Path>>>, MO.SchemaProperties<Omit<Props_1, PathParams<Path>>>, undefined, undefined, MO.SchemaProperties<Props_1>>>;
};
export declare function PostSpecial<Path extends string>(path: Path): <M>(__name?: string | undefined) => <Props extends MO.PropertyRecord>(self: MO.SchemaProperties<Props>) => IfPathPropsProvided<Path, Props, BodyRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path>>>, MO.SchemaProperties<Omit<Props, PathParams<Path>>>, undefined, undefined, MO.SchemaProperties<Props>>>;
export declare function PostSpecial<Path extends string>(path: Path): <M>(__name?: string | undefined) => <Props extends PropertyRecord>(self: MO.SchemaProperties<Props>) => IfPathPropsProvided<Path, Props, BodyRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path>>>, MO.SchemaProperties<Omit<Props, PathParams<Path>>>, undefined, undefined, MO.SchemaProperties<Props>>>;
export declare function MethodReqProps2<Method extends Methods>(method: Method): <Path_1 extends string>(path: Path_1) => <M>(__name?: string | undefined) => {
<Props extends MO.PropertyRecord = {}>(): IfPathPropsProvided<Path_1, Props, Method extends "GET" | "DELETE" ? QueryRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path_1>>>, MO.SchemaProperties<Omit<Props, PathParams<Path_1>>>, undefined, MO.SchemaProperties<Props>> : BodyRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path_1>>>, MO.SchemaProperties<Omit<Props, PathParams<Path_1>>>, undefined, undefined, MO.SchemaProperties<Props>>>;
<Props_1 extends MO.PropertyRecord>(props: Props_1): IfPathPropsProvided<Path_1, Props_1, Method extends "GET" | "DELETE" ? QueryRequest<M, MO.SchemaProperties<Pick<Props_1, PathParams<Path_1>>>, MO.SchemaProperties<Omit<Props_1, PathParams<Path_1>>>, undefined, MO.SchemaProperties<Props_1>> : BodyRequest<M, MO.SchemaProperties<Pick<Props_1, PathParams<Path_1>>>, MO.SchemaProperties<Omit<Props_1, PathParams<Path_1>>>, undefined, undefined, MO.SchemaProperties<Props_1>>>;
<Props extends PropertyRecord = {}>(): IfPathPropsProvided<Path_1, Props, Method extends "GET" | "DELETE" ? QueryRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path_1>>>, MO.SchemaProperties<Omit<Props, PathParams<Path_1>>>, undefined, MO.SchemaProperties<Props>> : BodyRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path_1>>>, MO.SchemaProperties<Omit<Props, PathParams<Path_1>>>, undefined, undefined, MO.SchemaProperties<Props>>>;
<Props_1 extends PropertyRecord>(props: Props_1): IfPathPropsProvided<Path_1, Props_1, Method extends "GET" | "DELETE" ? QueryRequest<M, MO.SchemaProperties<Pick<Props_1, PathParams<Path_1>>>, MO.SchemaProperties<Omit<Props_1, PathParams<Path_1>>>, undefined, MO.SchemaProperties<Props_1>> : BodyRequest<M, MO.SchemaProperties<Pick<Props_1, PathParams<Path_1>>>, MO.SchemaProperties<Omit<Props_1, PathParams<Path_1>>>, undefined, undefined, MO.SchemaProperties<Props_1>>>;
};
export declare function MethodReqProps2_<Method extends Methods, Path extends string>(method: Method, path: Path): <M>(__name?: string | undefined) => {
<Props extends MO.PropertyRecord = {}>(): IfPathPropsProvided<Path, Props, Method extends "GET" | "DELETE" ? QueryRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path>>>, MO.SchemaProperties<Omit<Props, PathParams<Path>>>, undefined, MO.SchemaProperties<Props>> : BodyRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path>>>, MO.SchemaProperties<Omit<Props, PathParams<Path>>>, undefined, undefined, MO.SchemaProperties<Props>>>;
<Props_1 extends MO.PropertyRecord>(props: Props_1): IfPathPropsProvided<Path, Props_1, Method extends "GET" | "DELETE" ? QueryRequest<M, MO.SchemaProperties<Pick<Props_1, PathParams<Path>>>, MO.SchemaProperties<Omit<Props_1, PathParams<Path>>>, undefined, MO.SchemaProperties<Props_1>> : BodyRequest<M, MO.SchemaProperties<Pick<Props_1, PathParams<Path>>>, MO.SchemaProperties<Omit<Props_1, PathParams<Path>>>, undefined, undefined, MO.SchemaProperties<Props_1>>>;
<Props extends PropertyRecord = {}>(): IfPathPropsProvided<Path, Props, Method extends "GET" | "DELETE" ? QueryRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path>>>, MO.SchemaProperties<Omit<Props, PathParams<Path>>>, undefined, MO.SchemaProperties<Props>> : BodyRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path>>>, MO.SchemaProperties<Omit<Props, PathParams<Path>>>, undefined, undefined, MO.SchemaProperties<Props>>>;
<Props_1 extends PropertyRecord>(props: Props_1): IfPathPropsProvided<Path, Props_1, Method extends "GET" | "DELETE" ? QueryRequest<M, MO.SchemaProperties<Pick<Props_1, PathParams<Path>>>, MO.SchemaProperties<Omit<Props_1, PathParams<Path>>>, undefined, MO.SchemaProperties<Props_1>> : BodyRequest<M, MO.SchemaProperties<Pick<Props_1, PathParams<Path>>>, MO.SchemaProperties<Omit<Props_1, PathParams<Path>>>, undefined, undefined, MO.SchemaProperties<Props_1>>>;
};
export declare function MethodReqProps<Method extends Methods>(method: Method): <M>() => {
<Path_1 extends string, Props extends MO.PropertyRecord = {}>(path: Path_1): IfPathPropsProvided<Path_1, Props, Method extends "GET" | "DELETE" ? QueryRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path_1>>>, MO.SchemaProperties<Omit<Props, PathParams<Path_1>>>, undefined, MO.SchemaProperties<Props>> : BodyRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path_1>>>, MO.SchemaProperties<Omit<Props, PathParams<Path_1>>>, undefined, undefined, MO.SchemaProperties<Props>>>;
<Path_2 extends string, Props_1 extends MO.PropertyRecord>(path: Path_2, props: Props_1): IfPathPropsProvided<Path_2, Props_1, Method extends "GET" | "DELETE" ? QueryRequest<M, MO.SchemaProperties<Pick<Props_1, PathParams<Path_2>>>, MO.SchemaProperties<Omit<Props_1, PathParams<Path_2>>>, undefined, MO.SchemaProperties<Props_1>> : BodyRequest<M, MO.SchemaProperties<Pick<Props_1, PathParams<Path_2>>>, MO.SchemaProperties<Omit<Props_1, PathParams<Path_2>>>, undefined, undefined, MO.SchemaProperties<Props_1>>>;
<Path_1 extends string, Props extends PropertyRecord = {}>(path: Path_1): IfPathPropsProvided<Path_1, Props, Method extends "GET" | "DELETE" ? QueryRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path_1>>>, MO.SchemaProperties<Omit<Props, PathParams<Path_1>>>, undefined, MO.SchemaProperties<Props>> : BodyRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path_1>>>, MO.SchemaProperties<Omit<Props, PathParams<Path_1>>>, undefined, undefined, MO.SchemaProperties<Props>>>;
<Path_2 extends string, Props_1 extends PropertyRecord>(path: Path_2, props: Props_1): IfPathPropsProvided<Path_2, Props_1, Method extends "GET" | "DELETE" ? QueryRequest<M, MO.SchemaProperties<Pick<Props_1, PathParams<Path_2>>>, MO.SchemaProperties<Omit<Props_1, PathParams<Path_2>>>, undefined, MO.SchemaProperties<Props_1>> : BodyRequest<M, MO.SchemaProperties<Pick<Props_1, PathParams<Path_2>>>, MO.SchemaProperties<Omit<Props_1, PathParams<Path_2>>>, undefined, undefined, MO.SchemaProperties<Props_1>>>;
};
export declare function MethodReq_<Method extends Methods, Path extends string>(method: Method, path: Path): <M>(__name?: string | undefined) => <Props extends MO.PropertyRecord>(self: MO.SchemaProperties<Props>) => IfPathPropsProvided<Path, Props, Method extends "GET" | "DELETE" ? QueryRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path>>>, MO.SchemaProperties<Omit<Props, PathParams<Path>>>, undefined, MO.SchemaProperties<Props>> : BodyRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path>>>, MO.SchemaProperties<Omit<Props, PathParams<Path>>>, undefined, undefined, MO.SchemaProperties<Props>>>;
export declare function MethodReq_<Method extends Methods, Path extends string>(method: Method, path: Path): <M>(__name?: string | undefined) => <Props extends PropertyRecord>(self: MO.SchemaProperties<Props>) => IfPathPropsProvided<Path, Props, Method extends "GET" | "DELETE" ? QueryRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path>>>, MO.SchemaProperties<Omit<Props, PathParams<Path>>>, undefined, MO.SchemaProperties<Props>> : BodyRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path>>>, MO.SchemaProperties<Omit<Props, PathParams<Path>>>, undefined, undefined, MO.SchemaProperties<Props>>>;
/**

@@ -217,4 +217,4 @@ * Automatically picks path, query and body, based on Path params and Request Method.

export declare function Req<M>(__name?: string): {
<Path_1 extends string, Method extends Methods, Props extends MO.PropertyRecord = {}>(method: Method, path: Path_1): IfPathPropsProvided<Path_1, Props, Method extends "GET" | "DELETE" ? QueryRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path_1>>>, MO.SchemaProperties<Omit<Props, PathParams<Path_1>>>, undefined, MO.SchemaProperties<Props>> : BodyRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path_1>>>, MO.SchemaProperties<Omit<Props, PathParams<Path_1>>>, undefined, undefined, MO.SchemaProperties<Props>>>;
<Path_2 extends string, Method_1 extends Methods, Props_1 extends MO.PropertyRecord>(method: Method_1, path: Path_2, self: MO.SchemaProperties<Props_1>): IfPathPropsProvided<Path_2, Props_1, Method_1 extends "GET" | "DELETE" ? QueryRequest<M, MO.SchemaProperties<Pick<Props_1, PathParams<Path_2>>>, MO.SchemaProperties<Omit<Props_1, PathParams<Path_2>>>, undefined, MO.SchemaProperties<Props_1>> : BodyRequest<M, MO.SchemaProperties<Pick<Props_1, PathParams<Path_2>>>, MO.SchemaProperties<Omit<Props_1, PathParams<Path_2>>>, undefined, undefined, MO.SchemaProperties<Props_1>>>;
<Path_1 extends string, Method extends Methods, Props extends PropertyRecord = {}>(method: Method, path: Path_1): IfPathPropsProvided<Path_1, Props, Method extends "GET" | "DELETE" ? QueryRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path_1>>>, MO.SchemaProperties<Omit<Props, PathParams<Path_1>>>, undefined, MO.SchemaProperties<Props>> : BodyRequest<M, MO.SchemaProperties<Pick<Props, PathParams<Path_1>>>, MO.SchemaProperties<Omit<Props, PathParams<Path_1>>>, undefined, undefined, MO.SchemaProperties<Props>>>;
<Path_2 extends string, Method_1 extends Methods, Props_1 extends PropertyRecord>(method: Method_1, path: Path_2, self: MO.SchemaProperties<Props_1>): IfPathPropsProvided<Path_2, Props_1, Method_1 extends "GET" | "DELETE" ? QueryRequest<M, MO.SchemaProperties<Pick<Props_1, PathParams<Path_2>>>, MO.SchemaProperties<Omit<Props_1, PathParams<Path_2>>>, undefined, MO.SchemaProperties<Props_1>> : BodyRequest<M, MO.SchemaProperties<Pick<Props_1, PathParams<Path_2>>>, MO.SchemaProperties<Omit<Props_1, PathParams<Path_2>>>, undefined, undefined, MO.SchemaProperties<Props_1>>>;
};

@@ -231,3 +231,3 @@ export declare function parsePathParams<Path extends string>(path: Path): PathParams<Path>[];

};
export declare function lensFromProps<T>(): <Props extends MO.PropertyRecord>(props: Props) => PropsToLenses<T, Props>;
export declare function lensFromProps<T>(): <Props extends PropertyRecord>(props: Props) => PropsToLenses<T, Props>;
export declare type Meta = {

@@ -249,3 +249,3 @@ description?: string;

};
} ? Props extends MO.PropertyRecord ? Props : never : never;
} ? Props extends PropertyRecord ? Props : never : never;
export declare function ModelSpecial<M>(__name?: string): <Self extends MO.SchemaAny & {

@@ -252,0 +252,0 @@ Api: {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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