mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-05-02 00:07:23 +08:00
fix(unvired-cordova-sdk): Update the return type for startDiscoveryService api (#3647)
* feat(unvired-cordova-sdk): support login via email * fix(unvired-cordova-sdk): return typed promise object for user settings * fix(unvired-cordova-sdk): change return type to string for guid() * doc(unvired-cordova-sdk): doc update * doc(unvired-cordova-sdk): update doc * feat(unvired-cordova-sdk): add support for metadata JSON * doc(unvired-cordova-sdk): update doc * doc(unvired-cordova-sdk): update doc * feat(unvired-cordova-sdk): add methods to get and set log level * fix(unvired-cordova-sdk): update the return type for getLog() * feat(unvired-cordova-sdk): return platform name * feat(unvired-cordova-sdk): add method to get log file path * feat(unvired-cordova-sdk): test push notifications * fix(unvired-cordova-sdk): define return for logRead * doc(unvired-cordova-sdk): remove mobile only restriction for some apis * feat(unvired-cordova-sdk): add new property containing HTTP status code. * feat(unvired-cordova-sdk): add new functions to lock & unlock sending of data * fix(unvired-cordova-sdk): update the return type for lock and unlock functions. * fix(unvired-cordova-sdk): change the return type for lockDataSender api * fix(unvired-cordova-sdk): fix the data type for ResultType and OutboxLockStatus * doc(unvired-cordova-sdk): Update doc * doc(unvired-cordova-sdk): Update doc * feat(unvired-cordova-sdk): Added new notification type * feat(unvired-cordova-sdk): delete outbox item based on lid * fix(unvired-cordova-sdk): Update doc * doc(unvired-cordova-sdk): Update doc for userSettings() * feat(unvired-cordova-sdk): add new discovery api * fix(unvired-cordova-sdk): rename the property * doc(unvired-cordova-sdk): Doc update * fix(unvired-cordova-sdk): Update the return type for startDiscoveryService api * doc(unvired-cordova-sdk): Rename the loginParameter languageCode to loginLanguage. * changes after doing npm install Co-authored-by: Srinidhi Anand Rao <srinidhi.rao@unvired.io>
This commit is contained in:
@@ -400,7 +400,7 @@ export class LoginParameters {
|
||||
* Language code to be sent to UMP. Specify a two-letter language code.
|
||||
* The default value of this is 'en'.
|
||||
*/
|
||||
languageCode: string;
|
||||
loginLanguage: string;
|
||||
}
|
||||
export class LoginResult extends UnviredResult {
|
||||
type: LoginListenerType;
|
||||
@@ -1494,24 +1494,23 @@ export class UnviredCordovaSDK extends IonicNativePlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an observable to return the UMP URLs which are discoverable within the network.
|
||||
* Clients can use this information to allow users to select UMP servers in login page.
|
||||
* Returns a promise containing UMP servers which are discoverable within the network.
|
||||
* Clients can use this information to allow users to select appropriate UMP server in the login page.
|
||||
* ```
|
||||
* this.unviredSDK.startDiscoveryService().subscribe( (result) => {
|
||||
* if (result.type == ResultType.success) {
|
||||
* console.log('Discovered URLs: ' + JSON.stringify(result.data))
|
||||
* // {"name":"Chyme 98","url":"http://192.168.98.98:8080/UMP/","root":"UNVIRED","type":"DEVELOPMENT"}
|
||||
* }
|
||||
* else {
|
||||
* console.log('Error in discovering URLs: ' + result.error)
|
||||
* }
|
||||
* })
|
||||
* let discoveryServiceResult = await this.unviredSDK.startDiscoveryService()
|
||||
* if (discoveryServiceResult.type == ResultType.success) {
|
||||
* let UMPServers: any[] = discoveryServiceResult.data
|
||||
* UMPServers.forEach(element => {
|
||||
* console.log(JSON.stringify(element)) // {"name":"Chyme 98","url":"http://192.168.98.98:8080/UMP/","root":"UNVIRED","type":"DEVELOPMENT"}
|
||||
* });
|
||||
* }
|
||||
* else {
|
||||
* console.log('Error searching for UMP Servers: ' + discoveryServiceResult.error)
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true,
|
||||
})
|
||||
startDiscoveryService(): Observable<UnviredResult> {
|
||||
@Cordova()
|
||||
startDiscoveryService(): Promise<UnviredResult> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user