// Generic Messaging datatype String; servicepackage Messaging { service Messaging { operation sendSMS(recipient: String, sender: String, body: String): String; operation sendMMS(recipient:String,sender:String,body:String,attachment:File):String; operation sendEmail(recipient:String,sender:String,title:String, body:String, attachment:File): String; operation sendIM(recipient: String, sender: String, body: String): String; operation sendVoice(recipient: String, sender: String, body: String[0..1], audio: File[0..1]): String; operation send(recipient: String, sender: String, title: String, subject: String, body: String, attachment: File[0..1]): String; } datatype File { filepath : String; } } // end service pakage // SMS Messaging // Click to Call servicepackage ClickToCall { service ClickToCall { operation createCall(from_:String,to_:String,private:String[0..1], max_duration:String[0..1],call_confirmation:String[0..1], audio_url:String[0..1],notification_url:String[0..1]) : String; operation releaseCall(call_id:String): String; } } servicepackage ClickToCallNotification { service ClickToCallNotification { operation notification(call_id: String, code: String, message: String, call_start_date: String, call_end_date: String): String; } } // end service package // Synchronization servicepackage Synchronization { service Synchronization { operation getUserSpheres(userId: String): Sphere[*]; operation getUserSphere(userId:String, sphereId: String): Sphere; operation getUserSphereEndpoint(userId: String, sphereId: String, endpointId: String): Endpoint; operation getSphereSyncs(userId: String, sphereId: String): SyncItem[*]; operation getPatterns(): Pattern[*]; operation getPattern(patternId: String): Pattern; operation getEndpointConfig(endpointId: String): Configuration; operation getCapabilities(): Capability[*]; operation getCapabilitySources(capability: String): Source[*]; operation addSphere(userId: String, capability: String, endpoints: Endpoint[*]) : Sphere; operation getLastSync(sphereId: String): SyncItem[*]; operation startSync(sphereId: String): String; operation syncIsOn(sphereId:String): Boolean; operation getElementUrls(userId: String, sphereId: String, endpointId: String, capability: String): String[*]; operation inform(serviceName: String, url: String, logourl: String); operation addSource(userId: String, sphereId: String, endpointId: String): Source; } datatype Sphere { sphereId : String; name : String; type : String; endpoints : Endpoint[*]; } datatype Endpoint { endpointId : String; name : String; configuration : String; } datatype SyncItem { id : String; timestamp : String; url : String; } datatype Pattern { patternId : String; name : String; contract : String; description : String; capability : Capability; accessPoint : String; } datatype Configuration { properties : ConfigurationProperty; } datatype ConfigurationProperty { key : String; val : String; } datatype Capability { name : String; } datatype Source { name : String; } } servicepackage Syncable { service Syncable { operation getCapabilities(): String[]; operation getDataList(capability: String): SyncItem[]; operation getData(capability: String, id: String): Base64; operation addData(capability: String, id: String, content: Base64) : SyncItem[]; operation updateData(capability: String, id: String, content: Base64) : SyncItem[]; operation deleteData(capability: String, id: String); } datatype Base64 { base64 : String; } } // end service package // IVR servicepackage InteractiveVoiceResponseFacility { service InteractiveVoiceResponseFacility { operation makeCall(to_:String):IVRResponse; operation waitCall(from_:String[0..1]):IVRResponse; operation answerCall(from_:String[0..1]) : IVRResponse; operation hangUp(call_id:String):IVRResponse; operation transfer(call_id:String,to_:String): String; operation sayPrompt(call_id:String,content:String): IVRResponse; operation playPrompt(call_id:String,url:String): IVRResponse; operation collectDtmf(call_id:String,max:Integer[0..1],term:String[0..1]) : IVRResponse; operation recognizeSpeech(call_id:String,grammar:String,lang:String[0..1]) : IVRResponse; operation startRecord(call_id:String,url:String) : IVRResponse; operation stopRecord(call_id:String): IVRResponse; operation getVersion() : String; } datatype IVRResponse { call_id : String; body : String; } } // end service package // Privacy servicepackage PrivacyResourceManager { service PrivacyResourceManager { operation validateToken(request: AccessRequest): AttributeInfo[*]; } datatype AccessRequest { calledFunc : String; token : String; recipient : String; accessor : String; attributeList : AttributeInfo; } datatype AttributeInfo { owner : String; attributeName : String; action : ActionKind; } enumeration ActionKind { read, write } } servicepackage PrivacyPolicyManager { service PrivacyPolicyManager { operation get(clientId: String, serviceId: String): Policy; operation update(clientId: String, serviceId: String, policy: Policy): Policy; operation create(clientId: String, serviceId: String, policy: Policy): Policy; operation delete(clientId: String, serviceId: String, policy: Policy); } datatype Policy { policy : String; language : String; } }