typedapi-server
TypeScript icon, indicating that this package has built-in type declarations

0.3.2 • Public • Published

TypedAPI Server library

WebsiteDocumentation

TypedAPI is set of libraries for creating client-server APIs for applications written in typescript.

About this library

Server functionality for TypedAPI.

  • http
    • HttpProxyClient.ts: need to process Api request on other service, when you use TypedApi as set of microservices. Used only on intrance backend.
    • HttpServer.ts: HTTP server with polling support for events
    • HttpTrustServer.ts: Trust server for using in microservices.
  • ApiMap.ts: interface of map with api`s methods and events. For fast access.
  • auth.ts: authorization data interfaces
  • buildMap.ts: function for building ApiMap object from Api realization and reflection
  • clientDataReflections.ts: reflections to validate some user`s input data
  • decorators.ts: Decorators that can be added to Api methods
  • events.ts: Events implementations for server
  • EventsProxy.ts: Proxy for events. Hold events subscriptions, and signaling to server when need to notify client
  • filter.ts: filtering input/output data
  • log.ts: Base logger interface for TypedAPI classes and text implementation for console
  • MethodProxy.ts: Proxy for methods. Receive method name and raw data, validate it, call api method and return response
  • ObjectProxy.ts: Serializer/restorer for objects that can be sent between client and server
  • session.ts: SessionProvider interface that used in many configs, and mamory provider that using for testing purposes
  • validation.ts: validators for input data

Package Sidebar

Install

npm i typedapi-server

Weekly Downloads

1

Version

0.3.2

License

MIT

Unpacked Size

111 kB

Total Files

38

Last publish

Collaborators

  • serega3000