{(c) WoT.IO inc (2014)
BipIO Pod Manifest Definition v0.1 (draft)
The manifest.json file describes how to assemble a Pod boilerplate programatically
and is an authoritative schema from which different views can be surfaced.
{Name (string) alphanumeric, lowercase object key (unique key)
"name" : "pod_name",Title (string) is the short, human readable version of name
"title" : "Pod Name",Useful Description (string) is the description used when generating UI and supporting documentation
"description" : "For doing X-Y-Z",Provider URL (string, optional) URL to service provider
"url" : "Provider URL",API Version (string) provider API version
"version" : "1",Track Duplicates (boolean, optional default false) Pod requires a de-duplication resource
"trackDuplicates" : true,Track Deltas (boolean, optional default false) Pod requires an object delta tracking resource
"trackDeltas" : true,Data Sources (object, optional) Model objects which should be bound to a DAO resource, keyed by the name of the action.
"dataSources" : {Model (object) Model Object, keyed by the name of the model.
"my_model" : {Expects JSON Schema
"properties" : {
"id" : {
"type" : "string"
}
},Keys (array) Unique Key (all keys in array create a compound key
"keys" : [ "id" ]
}
},Config (object) anything here is persisted to server config (default.json) when the pod is installed
"config" : {
"example_stored_key" : "value",OAuth Config (object) if your pod uses oAuth, store the node-passport strategy configs here.
"oauth" : {
"clientID" : "oauth client id",
"clientSecret" : "oauth client secret"
}
},The Authentication block describes how users should authenticate setup of their channels, and what credentials to use when channels are invoked
Auth Strategy (object, optional) user authentication strategy
"auth" : {Strategy (string) one of :
none (default) no authentication requiredoauth User must negotiate oAuth credentialsissuer_token User must supply authentication tokens "strategy" : "oauth",Passport (object, optional) when strategy : oauth, sets node-passport
strategy instantiation parameters
"passport" : {Provider (string, optional, default pod name) strategy name
"provider" : "google",Strategy (string, optional, default ‘Strategy’) strategy function name
"strategy" : "Strategy",
},Properties (object, optional) JSON-Schema Properties Object when strategy is not none.
Describes which authentication properties are minimally required by this pod for its rpc’s and actions
to be invoked.
When strategy is oauth, properties should indicate the required oauth attributes
When strategy is issuer_token, properties should be any of username|password|key
For example, HipChat needs an access token, so properties contains password : 'API Access Token'.
Note Its up to pods to implement any auth properties mapping
"properties" : {Name (object) Property, keyed by name
"username" : {Type (string) Property type
"type" : "string",Title (string) Short, human readable action label
"title" : "User Name Label",Description (string) extended description
"description" : "Find Username under x-y-z link ",
}
},Disposition (array) ordered list of property names, all properties are required
"disposition" : [
"username"
]
}, "rpcs" : {Key (object) Renderer key, becomes the URI eg: /rpc/pod/:pod_name/:rpc_name
"rpc_name" : {Title (string) Short, human readable RPC label
"title" : "Do Something",Description (string) extended description
"description" : "This is what it does",Content Type (string) expected response mime type
"contentType" : "application/json"
}
},Actions are individual methods supplied by the provider API. When a channel is created,
it points to pod_name.action_name
Actions (object) Implemented Action Schemas
"actions" : {Action Key (object) Action Schema, keyed by the name of the action.
action implementation will be written to ./{action_name}.js for this pod
"action_name" : {Title (string) Short, human readable action name
"title" : "Action Name",Description (string) extended description
"description":"Action Name does some great thing",Reference Documentation (string) Provider Reference Documentation URL. should point to the authoritative documentation this action attempts to encapsulate.
"doc_ref" : "http://example.org/docs/#action_name",Trigger (string) one of :
invoke - (default) must be explicitly invokedpoll - should be periodically polled with system schedulerrealtime - self managed "trigger" : "invoke",config items make immutable attributes available, or provide sane defaults in the case of an import not existing
Config (object, optional) Channel Configuration Schema - channel defaults. Expects JSON Schema
"config" : {Properties (object, optional) JSON-Schema Properties Object
"properties": {Name (object) Property, keyed by name
"rcpt_to" : {Type (string) Property type
"type" : "string",Title (string) Short, human readable action label
"title" : "Email Address",Description (string) extended description
"description" : "(eg : foo@bar.com)",Default (mixed) default value
"default" : "Some Sane Default"
}
},Required Fields (array, optional) list of required property name
"required": [
"rcpt_to"
],Disposition (array) ordered list of property names, where required fields are first, then optional properties, then most optional properties
"disposition" : [
"rcpt_to"
]
},Imports (object, optional) Data Imports Schema. Expects JSON Schema
"imports" : {Properties (object, optional) JSON-Schema Properties Object
"properties": {Name (object) Property, keyed by name
"message_id" : {Type (string) Property type
"type" : "string",Title (string) Short, human readable action label
"title" : "Message ID",Description (string) extended description
"description" : "abc-123",
}
},Required Fields (array, optional) list of required property name
"required": [
"rcpt_to"
],Disposition (array) ordered list of property names, where required fields are first, then optional properties, then most optional properties.
"disposition" : [
"rcpt_to"
]
},Exports (object, optional) Data Exports Schema. Expects JSON Schema
"exports" : {Properties (object, optional) JSON-Schema Properties Object
"properties": {Name (object) Property, keyed by name
"message_id" : {Type (string) Property type
"type" : "string",Title (string) Short, human readable action label
"title" : "Message ID",Description (string) extended description
"description" : "abc-123"
}
}
}, "rpcs" : {Key (object) Renderer key, becomes the URI eg: /rpc/channel/:channel_id/:action_rpc_name
"action_rpc_name" : {Title (string) Short, human readable RPC label
"title" : "Do Something",Description (string) extended description
"description" : "This is what it does",Content Type (string) expected response mime type
"contentType" : "application/json"
}
}
}
}
}