UNPKG

gypsum

Version:

Simple and easy lightweight typescript server side framework on Node.js.

36 lines (35 loc) 1.08 kB
import { API_TYPES } from './api-types'; import { RESPONSE_CODES } from './response-codes'; import { RESPONSE_DOMAINS } from './response-domains'; import { IResponseError } from './response-error'; export declare type responseTypes = 'json' | 'html' | 'file'; export interface IResponse { rid?: string; data?: any; count?: number; code?: RESPONSE_CODES; domain?: RESPONSE_DOMAINS; apiType?: API_TYPES.REST | API_TYPES.SOCKET; service?: string; event?: string; room?: string; crud?: 'read' | 'create' | 'update' | 'delete'; success?: boolean; type?: responseTypes; error?: IResponseError; } export declare class Response { rid: string; data: any; count: number; code: RESPONSE_CODES; domain: RESPONSE_DOMAINS; apiType: API_TYPES.REST | API_TYPES.SOCKET; service: string; room: string; crud: 'read' | 'create' | 'update' | 'delete'; success: boolean; type: responseTypes; error: IResponseError | undefined; constructor(options: IResponse); }