wot-typescript-definitions
Advanced tools
Comparing version
@@ -45,6 +45,11 @@ export as namespace WoT; | ||
/** The ThingTemplate dictionary contains properties to initialize a Thing */ | ||
export interface ThingTemplate extends SemanticAnnotations { | ||
/** The name attribute represents the user given name of the Thing */ | ||
name: string; | ||
} | ||
/** A Thing model is used for producing a new ExposedThing and can be either a ThingTemplate, or a ThingDescription. */ | ||
export declare type ThingModel = (ThingTemplate | ThingDescription); | ||
export declare type ThingModel = (ThingDescription | ThingTemplate); | ||
/** | ||
@@ -88,10 +93,8 @@ * Dictionary that represents the constraints for discovering Things as key-value pairs. | ||
/** A dictionary that provides the semantic types and semantic metadata. */ | ||
export interface SemanticAnnotations { | ||
semanticTypes?: [SemanticType]; | ||
semanticType?: [SemanticType]; | ||
metadata?: [SemanticMetadata]; | ||
} | ||
/** Represents a semantic type annotation, containing a name and a context. */ | ||
@@ -113,10 +116,2 @@ export interface SemanticType { | ||
/** The ThingTemplate dictionary contains properties to initialize a Thing */ | ||
export interface ThingTemplate extends SemanticAnnotations { | ||
/** The name attribute represents the user given name of the Thing */ | ||
name: string; | ||
} | ||
/** The ConsumedThing interface is a client API for sending requests to servers in order to retrieve or update properties, invoke Actions, and observe properties, Actions and Events. */ | ||
@@ -131,3 +126,3 @@ export interface ConsumedThing { | ||
*/ | ||
getThingDescription(): ThingDescription | ||
getThingDescription(): ThingDescription; | ||
@@ -138,3 +133,3 @@ /** | ||
*/ | ||
readProperty(propertyName: string): Promise<any> | ||
readProperty(propertyName: string): Promise<any>; | ||
@@ -146,4 +141,7 @@ /** | ||
*/ | ||
writeProperty(propertyName: string, newValue: any): Promise<void> | ||
writeProperty(propertyName: string, newValue: any): Promise<void>; | ||
/** Observable for subscribing to property changes */ | ||
onPropertyChange(name: string): Observable<any>; | ||
/** Takes the Action name from the name argument and the list of parameters, then requests from the underlying platform and the Protocol Bindings to invoke the Action on the remote Thing and return the result. Returns a Promise that resolves with the return value or rejects with an Error. | ||
@@ -153,3 +151,3 @@ * @param actionName Name of the action to invoke | ||
*/ | ||
invokeAction(actionName: string, parameter?: any): Promise<any> | ||
invokeAction(actionName: string, parameter?: any): Promise<any>; | ||
@@ -159,5 +157,2 @@ /** Observable for subscribing to events */ | ||
/** Observable for subscribing to property changes */ | ||
onPropertyChange(name: string): Observable<any>; | ||
/** Observable for subscribing to TD changes */ | ||
@@ -168,3 +163,3 @@ onTDChange(): Observable<any>; | ||
/** | ||
* TODO Linked Data JSON Schema | ||
* TODO Linked Data Schema | ||
*/ | ||
@@ -179,3 +174,3 @@ export declare type DataSchema = USVString; | ||
/** The type attribute provides the description of the data. */ | ||
type: DataSchema; | ||
schema: DataSchema; | ||
/** The intial value. */ | ||
@@ -194,5 +189,5 @@ value?: any; | ||
/** The inputDataDescription attribute provides the description of the input arguments (argument list is represented by an object). If missing, it means the action does not accept arguments. */ | ||
inputDataDescription?: DataSchema; | ||
inputSchema?: DataSchema; | ||
/** The outputDataDescription attribute provides the description of the returned data. If missing, it means the action does not return data. */ | ||
outputDataDescription?: DataSchema; | ||
outputSchema?: DataSchema; | ||
// /** The action attribute provides a function that defines the Action. */ | ||
@@ -206,3 +201,3 @@ // action: Function; | ||
/** The type attribute provides the description of the data. */ | ||
dataDescription?: DataSchema; | ||
schema?: DataSchema; | ||
} | ||
@@ -286,3 +281,2 @@ | ||
setPropertyWriteHandler(writeHandler: PropertyWriteHandler, propertyName? : string) : ExposedThing; | ||
} | ||
@@ -289,0 +283,0 @@ |
{ | ||
"name": "wot-typescript-definitions", | ||
"version": "0.4.0-SNAPSHOT.11", | ||
"description": "Typescript definitions for the WoT scripting API", | ||
"main": "index.d.ts", | ||
"types": "index.d.ts", | ||
"typings": "index.d.ts", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/thingweb/wot-typescript-definitions.git" | ||
}, | ||
"version": "0.4.0-SNAPSHOT.12", | ||
"description": "TypeScript definitions for the W3C WoT Scripting API", | ||
"author": "the thingweb community", | ||
"license": "W3C-20150513", | ||
"repository": "https://github.com/thingweb/wot-typescript-definitions.git", | ||
"keywords": [ | ||
"web", | ||
"Web", | ||
"W3C", | ||
"WoT", | ||
"IoT", | ||
"things", | ||
"scripting", | ||
@@ -23,15 +18,13 @@ "typescript", | ||
], | ||
"contributors": [ | ||
"Johannes Hund <johannes.hund@siemens.com>", | ||
"Daniel Peintner <daniel.peintner.ext@siemens.com>", | ||
"Sebastian Kaebisch <sebastian.kaebisch@siemens.com>" | ||
], | ||
"license": "W3C Software License", | ||
"bugs": { | ||
"url": "https://github.com/thingweb/wot-typescript-definitions/issues" | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"homepage": "https://github.com/thingweb/wot-typescript-definitions#readme", | ||
"main": "index.d.ts", | ||
"types": "index.d.ts", | ||
"dependencies": { | ||
"rxjs": "5.4.3" | ||
}, | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
} | ||
} |
{ | ||
"compilerOptions": { | ||
"target": "ES6", | ||
"target": "es5", | ||
"lib" : ["es2015","dom"], | ||
"module": "commonjs", | ||
@@ -11,3 +12,4 @@ "outDir": "dist", | ||
"preserveConstEnums": true, | ||
"experimentalDecorators": true | ||
"experimentalDecorators": true, | ||
"declaration": true | ||
}, | ||
@@ -14,0 +16,0 @@ "include": [ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
Misc. License Issues
License(Experimental) A package's licensing information has fine-grained problems.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
1
-50%0
-100%242
0.83%14845
-2.25%1
Infinity%3
50%1
Infinity%1
Infinity%