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

yaschema-api

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yaschema-api - npm Package Compare versions

Comparing version 0.0.0-alpha.0 to 0.0.0-alpha.1

lib/types/GenericApi.d.ts

1

lib/types/Api.d.ts

@@ -5,2 +5,3 @@ import type { SingleOrArray } from 'yaschema';

import type { CachePolicy } from './CachePolicy';
/** A generic API description. See `HttpApi` */
export interface Api<ReqHeadersT extends Record<string, AnyStringSerializableType>, ReqParamsT extends Record<string, AnyStringSerializableType>, ReqQueryT extends Record<string, SingleOrArray<AnyStringSerializableType>>, ReqBodyT, ResStatusT extends number, ResHeadersT extends Record<string, AnyStringSerializableType>, ResBodyT, ErrResStatusT extends number, ErrResHeadersT extends Record<string, AnyStringSerializableType>, ErrResBodyT> {

@@ -7,0 +8,0 @@ schemas: ApiSchemas<ReqHeadersT, ReqParamsT, ReqQueryT, ReqBodyT, ResStatusT, ResHeadersT, ResBodyT, ErrResStatusT, ErrResHeadersT, ErrResBodyT>;

@@ -5,2 +5,3 @@ import type { SingleOrArray } from 'yaschema';

import type { ResponseSchemas } from './ResponseSchemas';
/** Api schemas used for requests and responses */
export interface ApiSchemas<ReqHeadersT extends Record<string, AnyStringSerializableType>, ReqParamsT extends Record<string, AnyStringSerializableType>, ReqQueryT extends Record<string, SingleOrArray<AnyStringSerializableType>>, ReqBodyT, ResStatusT extends number, ResHeadersT extends Record<string, AnyStringSerializableType>, ResBodyT, ErrResStatusT extends number, ErrResHeadersT extends Record<string, AnyStringSerializableType>, ErrResBodyT> {

@@ -7,0 +8,0 @@ request: RequestSchemas<ReqHeadersT, ReqParamsT, ReqQueryT, ReqBodyT>;

@@ -5,2 +5,4 @@ export * from './AnyStringSerializableType';

export * from './CachePolicy';
export * from './GenericApi';
export * from './GenericHttpApi';
export * from './HttpApi';

@@ -7,0 +9,0 @@ export * from './HttpApiCredentialsSetting';

@@ -21,2 +21,4 @@ "use strict";

__exportStar(require("./CachePolicy"), exports);
__exportStar(require("./GenericApi"), exports);
__exportStar(require("./GenericHttpApi"), exports);
__exportStar(require("./HttpApi"), exports);

@@ -23,0 +25,0 @@ __exportStar(require("./HttpApiCredentialsSetting"), exports);

4

lib/types/HttpApi.d.ts

@@ -7,5 +7,7 @@ import type { SingleOrArray } from 'yaschema';

import type { HttpResponseType } from './HttpResponseType';
/** An HTTP API description */
export interface HttpApi<ReqHeadersT extends Record<string, AnyStringSerializableType>, ReqParamsT extends Record<string, AnyStringSerializableType>, ReqQueryT extends Record<string, SingleOrArray<AnyStringSerializableType>>, ReqBodyT, ResStatusT extends number, ResHeadersT extends Record<string, AnyStringSerializableType>, ResBodyT, ErrResStatusT extends number, ErrResHeadersT extends Record<string, AnyStringSerializableType>, ErrResBodyT> extends Api<ReqHeadersT, ReqParamsT, ReqQueryT, ReqBodyT, ResStatusT, ResHeadersT, ResBodyT, ErrResStatusT, ErrResHeadersT, ErrResBodyT> {
method: HttpMethod;
/** The URL for accessing this API, which may be relative to a URL base configuring for the `routeType` */
/** The URL for accessing this API, which may be relative to a URL base configuring for the `routeType`. Use `{…}` syntax to mark
* parameters, as you might with Express. */
url: string;

@@ -12,0 +14,0 @@ /**

import type { Schema, SingleOrArray } from 'yaschema';
import type { AnyStringSerializableType } from './AnyStringSerializableType';
/** Schemas used for requests */
export interface RequestSchemas<HeadersT extends Record<string, AnyStringSerializableType>, ParamsT extends Record<string, AnyStringSerializableType>, QueryT extends Record<string, SingleOrArray<AnyStringSerializableType>>, BodyT> {

@@ -4,0 +5,0 @@ headers?: Schema<HeadersT>;

import type { Schema } from 'yaschema';
import type { AnyStringSerializableType } from './AnyStringSerializableType';
/** Schemas used for responses */
export interface ResponseSchemas<StatusT extends number, HeadersT extends Record<string, AnyStringSerializableType>, BodyT> {

@@ -4,0 +5,0 @@ status?: Schema<StatusT>;

{
"name": "yaschema-api",
"version": "0.0.0-alpha.0",
"version": "0.0.0-alpha.1",
"description": "Yet another API",

@@ -5,0 +5,0 @@ "keywords": [

@@ -7,2 +7,3 @@ import type { SingleOrArray } from 'yaschema';

/** A generic API description. See `HttpApi` */
export interface Api<

@@ -9,0 +10,0 @@ ReqHeadersT extends Record<string, AnyStringSerializableType>,

@@ -7,2 +7,3 @@ import type { SingleOrArray } from 'yaschema';

/** Api schemas used for requests and responses */
export interface ApiSchemas<

@@ -9,0 +10,0 @@ ReqHeadersT extends Record<string, AnyStringSerializableType>,

@@ -5,2 +5,4 @@ export * from './AnyStringSerializableType';

export * from './CachePolicy';
export * from './GenericApi';
export * from './GenericHttpApi';
export * from './HttpApi';

@@ -7,0 +9,0 @@ export * from './HttpApiCredentialsSetting';

@@ -9,2 +9,3 @@ import type { SingleOrArray } from 'yaschema';

/** An HTTP API description */
export interface HttpApi<

@@ -23,3 +24,4 @@ ReqHeadersT extends Record<string, AnyStringSerializableType>,

method: HttpMethod;
/** The URL for accessing this API, which may be relative to a URL base configuring for the `routeType` */
/** The URL for accessing this API, which may be relative to a URL base configuring for the `routeType`. Use `{…}` syntax to mark
* parameters, as you might with Express. */
url: string;

@@ -26,0 +28,0 @@

@@ -5,2 +5,3 @@ import type { Schema, SingleOrArray } from 'yaschema';

/** Schemas used for requests */
export interface RequestSchemas<

@@ -7,0 +8,0 @@ HeadersT extends Record<string, AnyStringSerializableType>,

@@ -5,2 +5,3 @@ import type { Schema } from 'yaschema';

/** Schemas used for responses */
export interface ResponseSchemas<StatusT extends number, HeadersT extends Record<string, AnyStringSerializableType>, BodyT> {

@@ -7,0 +8,0 @@ status?: Schema<StatusT>;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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