refactor(anyline): support anyline 43.0.0 (#4518)

This commit is contained in:
MaximBelov
2023-07-11 20:24:24 +03:00
committed by GitHub
parent 4cd48b4d0e
commit bb1164f4fc
@@ -1,12 +1,8 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-plugins/core'; import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-plugins/core';
export interface AnylineOptions { export interface AnylineConfig {
// Valid License Key [key: string]: any;
licenseKey: string;
// Scanning options
config: any;
} }
/** /**
@@ -38,14 +34,29 @@ export interface AnylineOptions {
}) })
@Injectable() @Injectable()
export class Anyline extends AwesomeCordovaNativePlugin { export class Anyline extends AwesomeCordovaNativePlugin {
@Cordova()
checkLicense(licenseKey: string): Promise<any> {
return;
}
@Cordova()
initAnylineSDK(licenseKey: string): Promise<any> {
return;
}
@Cordova()
getSDKVersion(): Promise<any> {
return;
}
/** /**
* Scan * Scan
* *
* @param options {AnylineOptions} Scanning options * @param config {AnylineConfig} Scanning options
* @returns {Promise<any>} Returns a promise that resolves when Code is captured * @returns {Promise<any>} Returns a promise that resolves when Code is captured
*/ */
@Cordova() @Cordova()
scan(options: AnylineOptions): Promise<any> { scan(config: AnylineConfig): Promise<any> {
return; return;
} }
} }