coderitter-api
Coderitter API code
Last updated 4 months ago by coderitter .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install coderitter-api 
SYNC missed versions from official npm registry.

Coderitter API

This package contains the core files usable both in the server and client applications.

Install

npm install coderitter-api

Overview

This package exposes the content of the following packages.

Result

The Coderitter API style defines a result object which is sent back to the requesting client.

class Result<T> {

  type: string
  value!: T
  mismatch!: Mismatch
  remoteError!: string

IsudInterface (insert, select, update, delete)

The interface IsudInterface defines the basic ISUD methods. They are using the Coderitter API options and result objects. If its appropriate then use this as a starting point.

interface IsudInterface<T> {
  insert(options: DbInsertOptions): Promise<Result<DbInsertResult<T>>>
  select(options?: DbSelectOptions): Promise<Result<DbSelectResult<T>>>
  update(options?: DbUpdateOptions): Promise<Result<DbUpdateResult>>
  delete(options?: DbDeleteOptions): Promise<Result<DbDeleteResult>>
}

We do not use CRUD (create, read, update, delete) terms here because we are in the realm of the database.

CrudInterface (create, read, update, delete)

The interface CrudInterface defines the basic CRUD methods. They are using the Coderitter API options and result objects. If its appropriate then use this as a starting point.

interface CrudInterface<T> {
  create(options: LogicCreateOptions<T>): Promise<Result<LogicCreateResult>>
  read(options?: LogicReadOptions): Promise<Result<LogicReadResult<T>>>
  update(options: LogicUpdateOptions<T>): Promise<Result<LogicUpdateResult>>
  delete(options: LogicDeleteOptions): Promise<Result<LogicDeleteResult>>
}

Component

Visual components always use a model according to the MVC pattern to describe the data which is displayed in the component. The class Component is be used as the base class for component models.

class Component {

  componentId?: string
  usedEntities: ChangeDescription[] = []

It contains

  • componentId: A unique id to identify that instance of that certain component type. This is useful in React for example.
  • usedEntites: Uses ChangeDescriptions of the package mega-nice-change-event to describe the component's displayed entities which it wants to be informed of its changes.

EventBus

A very simple and event bus implementation to be used to spead change events both on the server and on the client.

FormTranslationVisitor

A visitor for any form element of mega-nice-form which translates the path of such an element to a title.

Current Tags

  • 0.22.2                                ...           latest (4 months ago)

61 Versions

  • 0.22.2                                ...           4 months ago
  • 0.22.1                                ...           4 months ago
  • 0.22.0                                ...           4 months ago
  • 0.21.6                                ...           4 months ago
  • 0.21.5                                ...           4 months ago
  • 0.21.4                                ...           4 months ago
  • 0.21.3                                ...           4 months ago
  • 0.21.2                                ...           4 months ago
  • 0.21.1                                ...           4 months ago
  • 0.21.0                                ...           4 months ago
  • 0.20.2                                ...           4 months ago
  • 0.20.1                                ...           4 months ago
  • 0.20.0                                ...           4 months ago
  • 0.19.0                                ...           4 months ago
  • 0.18.0                                ...           4 months ago
  • 0.17.0                                ...           4 months ago
  • 0.16.1                                ...           4 months ago
  • 0.16.0                                ...           4 months ago
  • 0.15.0                                ...           4 months ago
  • 0.14.1                                ...           4 months ago
  • 0.14.0                                ...           4 months ago
  • 0.13.2                                ...           4 months ago
  • 0.13.1                                ...           4 months ago
  • 0.13.0                                ...           4 months ago
  • 0.12.0                                ...           5 months ago
  • 0.11.4                                ...           5 months ago
  • 0.11.3                                ...           5 months ago
  • 0.11.2                                ...           5 months ago
  • 0.11.1                                ...           5 months ago
  • 0.11.0                                ...           5 months ago
  • 0.10.10                                ...           5 months ago
  • 0.10.9                                ...           5 months ago
  • 0.10.8                                ...           5 months ago
  • 0.10.7                                ...           5 months ago
  • 0.10.6                                ...           5 months ago
  • 0.10.5                                ...           5 months ago
  • 0.10.4                                ...           5 months ago
  • 0.10.3                                ...           5 months ago
  • 0.10.2                                ...           5 months ago
  • 0.10.1                                ...           5 months ago
  • 0.10.0                                ...           5 months ago
  • 0.9.0                                ...           5 months ago
  • 0.8.2                                ...           5 months ago
  • 0.8.1                                ...           5 months ago
  • 0.8.0                                ...           5 months ago
  • 0.7.2                                ...           5 months ago
  • 0.7.1                                ...           5 months ago
  • 0.7.0                                ...           5 months ago
  • 0.6.3                                ...           5 months ago
  • 0.6.1                                ...           5 months ago
  • 0.6.0                                ...           5 months ago
  • 0.6.4                                ...           5 months ago
  • 0.6.2                                ...           5 months ago
  • 0.5.0                                ...           5 months ago
  • 0.4.0                                ...           5 months ago
  • 0.3.0                                ...           5 months ago
  • 0.2.1                                ...           5 months ago
  • 0.2.0                                ...           5 months ago
  • 0.1.1                                ...           6 months ago
  • 0.1.0                                ...           6 months ago
  • 0.0.0                                ...           6 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dev Dependencies (3)

Copyright 2014 - 2016 © taobao.org |