🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

wot-typescript-definitions

Package Overview
Dependencies
Maintainers
4
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wot-typescript-definitions - npm Package Compare versions

Comparing version

to
0.5.0-SNAPSHOT.7

62

index.d.ts

@@ -195,6 +195,11 @@ import { Observable } from 'rxjs/Observable';

// define how to expose and run the Thing
/** Start serving external requests for the Thing. */
/**
* Start serving external requests for the Thing, so that WoT Interactions using Properties, Actions and Events will be possible.
*/
expose(): Promise<void>;
/** Stop serving external requests for the Thing. */
/**
* Stop serving external requests for the Thing and destroy the object. Note that eventual unregistering should be done before invoking this method.
*/
destroy(): Promise<void>;

@@ -205,3 +210,3 @@

/**
* Adds a Property defined by the argument and updates the Thing Description
* Adds a Property with name defined by the name argument, the data schema provided by the property argument of type PropertyFragment, and optionally an initial value provided in the argument initValue whose type should match the one defined in the type property.
*/

@@ -211,3 +216,3 @@ addProperty(name: string, property: PropertyFragment, init?: any): ExposedThing;

/**
* Removes the Property specified by the name argument, updates the Thing Description and returns the object.
* Removes the Property specified by the name argument and updates the Thing Description. Throws on error. Returns a reference to the same object for supporting chaining.
*/

@@ -217,8 +222,12 @@ removeProperty(name: string): ExposedThing;

/**
* Adds an Action to the Thing object as defined by the action argument of type ThingActionInit and updates the Thing Description.
* Adds to the actions property of a Thing object an Action with name defined by the name argument, defines input and output data format by the action argument of type ActionFragment, and adds the function provided in the handler argument as a handler, then updates the Thing Description.
* Throws on error.
* Returns a reference to the same object for supporting chaining.
*/
addAction(name: string, action?: ActionFragment): ExposedThing;
addAction(name: string, action: ActionFragment, handler: ActionHandler): ExposedThing;
/**
* Removes the Action specified by the name argument, updates the Thing Description and returns the object.
* Removes the Action specified by the name argument and updates the Thing Description.
* Throws on error.
* Returns a reference to the same object for supporting chaining.
*/

@@ -228,3 +237,5 @@ removeAction(name: string): ExposedThing;

/**
* Adds an event to the Thing object as defined by the event argument of type ThingEventInit and updates the Thing Description.
* Adds an event with name defined by the name argument and qualifiers and initialization value provided by the event argument of type EventFragmentto the Thing object and updates the Thing Description.
* Throws on error.
* Returns a reference to the same object for supporting chaining.
*/

@@ -234,3 +245,4 @@ addEvent(name: string, event: EventFragment): ExposedThing;

/**
* Removes the event specified by the name argument, updates the Thing Description and returns the object.
* Removes the event specified by the name argument and updates the Thing Description.
* Returns a reference to the same object for supporting chaining.
*/

@@ -242,24 +254,24 @@ removeEvent(name: string): ExposedThing;

/**
* Takes a propertyName as string argument, and a readHandler argument of type PropertyReadHandler. Sets the handler function for reading the specified Property matched by propertyName if propertyName is specified, otherwise sets it for reading any property. Throws on error. Returns a reference to the same object for supporting chaining.
*
* @param propertyName
* @param readHandler
* Takes name as string argument and handler as argument of type PropertyReadHandler.
* Sets the handler function for reading the specified Property matched by name.
* Throws on error.
* Returns a reference to the same object for supporting chaining.
*/
setPropertyReadHandler(propertyName: string, readHandler: PropertyReadHandler): ExposedThing;
setPropertyReadHandler(name: string, handler: PropertyReadHandler): ExposedThing;
/**
* Takes a propertyName as string argument, and a writeHandler argument of type PropertyWriteHandler. Sets the handler function for writing the specified Property matched by propertyName if the propertyName is specified, otherwise sets it for writing any properties. Throws on error. Returns a reference to the same object for supporting chaining.
*
* @param propertyName
* @param write
* Takes name as string argument and handler as argument of type PropertyWriteHandler.
* Sets the handler function for writing the specified Property matched by name.
* Throws on error.
* Returns a reference to the same object for supporting chaining.
*/
setPropertyWriteHandler(propertyName: string, writeHandler: PropertyWriteHandler): ExposedThing;
setPropertyWriteHandler(name: string, handler: PropertyWriteHandler): ExposedThing;
/**
* Takes a actionName as string argument, and an action argument of type ActionHandler. Sets the handler function for the specified Action matched by actionName if actionName is specified, otherwise sets it for any action. Throws on error. Returns a reference to the same object for supporting chaining.
*
* @param actionName
* @param action
* Takes name as string argument and handler as argument of type ActionHandler.
* Sets the handler function for the specified Action matched by name.
* Throws on error.
* Returns a reference to the same object for supporting chaining.
*/
setActionHandler(actionName: string, action: ActionHandler): ExposedThing;
setActionHandler(name: string, handler: ActionHandler): ExposedThing;
}

@@ -295,3 +307,3 @@

export interface BaseSchema {
type: string;
type?: string;
const?: any;

@@ -298,0 +310,0 @@ enum?: Array<any>;

{
"name": "wot-typescript-definitions",
"version": "0.5.0-SNAPSHOT.6",
"version": "0.5.0-SNAPSHOT.7",
"description": "TypeScript definitions for the W3C WoT Scripting API",

@@ -5,0 +5,0 @@ "author": "the thingweb community",