diff --git a/src/@ionic-native/plugins/biocatch/index.ts b/src/@ionic-native/plugins/biocatch/index.ts new file mode 100644 index 000000000..ad51f57de --- /dev/null +++ b/src/@ionic-native/plugins/biocatch/index.ts @@ -0,0 +1,102 @@ +import { Injectable } from '@angular/core'; +import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; + +/** + * @name Biocatch + * @description + * Biocatch SDK Cordova support + * + * @usage + * ```typescript + * import { Biocatch } from '@ionic-native/biocatch'; + * + * + * constructor(private biocatch: Biocatch) { } + * + * ... + * + * + * this.biocatch.start('customer-session-1', 'http://example.com', 'some-public-key') + * .then((res: any) => console.log(res)) + * .catch((error: any) => console.error(error)); + * + * ``` + */ +@Plugin({ + pluginName: 'Biocatch', + plugin: 'cordova-plugin-biocatch', + pluginRef: 'BioCatch', + repo: 'https://bitbucket.org/whisprnd/biocatch-cordova-plugin', + platforms: ['iOS'], +}) +@Injectable() +export class Biocatch extends IonicNativePlugin { + + /** + * Start a session + * @param customerSessionID {String} Customer session id + * @param wupUrl {String} WUP server URL + * @param publicKey {String} Public Key + * @return {Promise} Returns a promise + */ + @Cordova() + start(customerSessionID: string | null, wupUrl: string, publicKey?: string | null): Promise { + return; + } + + /** + * Pause the session + * @return {Promise} Returns a promise + */ + @Cordova() + pause(): Promise { + return; + } + + /** + * Resume the session + * @return {Promise} Returns a promise + */ + @Cordova() + resume(): Promise { + return; + } + + /** + * Stop the session + * @return {Promise} Returns a promise + */ + @Cordova() + stop(): Promise { + return; + } + + /** + * Reset the session + * @return {Promise} Returns a promise + */ + @Cordova() + resetSession(): Promise { + return; + } + + /** + * Change the session context + * @param contextName {String} Context name + * @return {Promise} Returns a promise + */ + @Cordova() + changeContext(contextName: string): Promise { + return; + } + + /** + * Update the customer session ID + * @param customerSessionID {String} + * @return {Promise} Returns a promise + */ + @Cordova() + updateCustomerSessionID(customerSessionID: string): Promise { + return; + } +}