Skip to content

Please add typescript definition #39

@abenhamdine

Description

@abenhamdine

It would be cool to have ts definition for direct configuration :)

Here is my own interface, but properties could be optional too :

export interface ExtDirectConfig {
	/** Namespace in which server will be accessible from client side. Ex : 'Server' */
	rootNamespace: string,
	/** Support method discovery without `function` keyword. */
	ES6: boolean,
	/** API Name */
	apiName: string,
	/** URL to retrieve API configuration. Ex : '/directapi' */
	apiUrl: string,
	/** ,  URL to call Direct methods : ex "/direct" */
	classRouteUrl: string
	/** Direct class location in filesystem relative to the server directory : ex : '/direct', */
	classPath: string,
	/** Hosting server name. Ex : 'localhost' */
	server: string,
	/**  Hosting server port. Ex : "3000" */
	port: string,
	protocol: 'http' | 'https',
	/** Operation timeout. Default : 30000 */
	timeout: number,
	/** Set true to cache API's for production. During development setting to false will allow to make any changes and access API's without server reload */
	cacheAPI: boolean,
	/** Use relative URL's */
	relativeUrl: boolean,
	/** If true, will append req and res objects to method call */
	appendRequestResponseObjects: boolean,
	/** Metadata support */
	enableMetadata: boolean,
	/** Automatically append success true|false */
	responseHelper: boolean,
	/** Enable Helpers to have methods before and after API discovery as well as before and after Transaction batch */
	enableProcessors: boolean
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions