@capgo/capacitor-document-scanner 7.0.8 → 7.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -54,6 +54,10 @@ Opens the device camera and starts the document scanning experience.
54
54
  | **`scannedImages`** | <code>string[]</code> | Scanned images in the requested response format. |
55
55
  | **`status`** | <code><a href="#scandocumentresponsestatus">ScanDocumentResponseStatus</a></code> | Indicates whether the scan completed or was cancelled. |
56
56
 
57
+ | Method | Signature | Description |
58
+ | -------------------- | -------------------------------------------- | --------------------------------------- |
59
+ | **getPluginVersion** | () =&gt; Promise&lt;{ version: string; }&gt; | Get the native Capacitor plugin version |
60
+
57
61
 
58
62
  #### ScanDocumentOptions
59
63
 
@@ -38,6 +38,8 @@ import java.util.Locale;
38
38
  @CapacitorPlugin(name = "DocumentScanner")
39
39
  public class DocumentScannerPlugin extends Plugin {
40
40
 
41
+ private final String PLUGIN_VERSION = "";
42
+
41
43
  private static final String RESPONSE_TYPE_BASE64 = "base64";
42
44
  private static final String RESPONSE_TYPE_FILE_PATH = "imageFilePath";
43
45
 
@@ -289,4 +291,15 @@ public class DocumentScannerPlugin extends Plugin {
289
291
  }
290
292
  return RESPONSE_TYPE_FILE_PATH;
291
293
  }
294
+
295
+ @PluginMethod
296
+ public void getPluginVersion(final PluginCall call) {
297
+ try {
298
+ final JSObject ret = new JSObject();
299
+ ret.put("version", this.PLUGIN_VERSION);
300
+ call.resolve(ret);
301
+ } catch (final Exception e) {
302
+ call.reject("Could not get plugin version", e);
303
+ }
304
+ }
292
305
  }
package/dist/docs.json CHANGED
@@ -33,7 +33,27 @@
33
33
  "slug": "scandocumentresponse",
34
34
  "docs": "",
35
35
  "tags": [],
36
- "methods": [],
36
+ "methods": [
37
+ {
38
+ "name": "getPluginVersion",
39
+ "signature": "() => Promise<{ version: string; }>",
40
+ "parameters": [],
41
+ "returns": "Promise<{ version: string; }>",
42
+ "tags": [
43
+ {
44
+ "name": "returns",
45
+ "text": "an Promise with version for this device"
46
+ },
47
+ {
48
+ "name": "throws",
49
+ "text": "An error if the something went wrong"
50
+ }
51
+ ],
52
+ "docs": "Get the native Capacitor plugin version",
53
+ "complexTypes": [],
54
+ "slug": "getpluginversion"
55
+ }
56
+ ],
37
57
  "properties": [
38
58
  {
39
59
  "name": "scannedImages",
@@ -46,6 +46,15 @@ export interface ScanDocumentResponse {
46
46
  * Indicates whether the scan completed or was cancelled.
47
47
  */
48
48
  status?: ScanDocumentResponseStatus;
49
+ /**
50
+ * Get the native Capacitor plugin version
51
+ *
52
+ * @returns {Promise<{ id: string }>} an Promise with version for this device
53
+ * @throws An error if the something went wrong
54
+ */
55
+ getPluginVersion(): Promise<{
56
+ version: string;
57
+ }>;
49
58
  }
50
59
  export declare enum ScanDocumentResponseStatus {
51
60
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAkCA,MAAM,CAAN,IAAY,YAUX;AAVD,WAAY,YAAY;IACtB;;OAEG;IACH,iCAAiB,CAAA;IAEjB;;OAEG;IACH,+CAA+B,CAAA;AACjC,CAAC,EAVW,YAAY,KAAZ,YAAY,QAUvB;AAcD,MAAM,CAAN,IAAY,0BAUX;AAVD,WAAY,0BAA0B;IACpC;;OAEG;IACH,iDAAmB,CAAA;IAEnB;;OAEG;IACH,+CAAiB,CAAA;AACnB,CAAC,EAVW,0BAA0B,KAA1B,0BAA0B,QAUrC","sourcesContent":["export interface DocumentScannerPlugin {\n /**\n * Opens the device camera and starts the document scanning experience.\n */\n scanDocument(options?: ScanDocumentOptions): Promise<ScanDocumentResponse>;\n}\n\nexport interface ScanDocumentOptions {\n /**\n * Android only: quality of the cropped image from 0 - 100 (100 is best).\n * @default 100\n */\n croppedImageQuality?: number;\n\n /**\n * Android only: allow the user to adjust the detected crop before saving.\n * Disabling this forces single-document capture.\n * @default true\n */\n letUserAdjustCrop?: boolean;\n\n /**\n * Android only: maximum number of documents the user can scan.\n * @default 24\n */\n maxNumDocuments?: number;\n\n /**\n * Format to return scanned images in (file paths or base64 strings).\n * @default ResponseType.ImageFilePath\n */\n responseType?: ResponseType;\n}\n\nexport enum ResponseType {\n /**\n * Return scanned images as base64-encoded strings.\n */\n Base64 = 'base64',\n\n /**\n * Return scanned images as file paths on disk.\n */\n ImageFilePath = 'imageFilePath',\n}\n\nexport interface ScanDocumentResponse {\n /**\n * Scanned images in the requested response format.\n */\n scannedImages?: string[];\n\n /**\n * Indicates whether the scan completed or was cancelled.\n */\n status?: ScanDocumentResponseStatus;\n}\n\nexport enum ScanDocumentResponseStatus {\n /**\n * The scan completed successfully.\n */\n Success = 'success',\n\n /**\n * The user cancelled the scan flow.\n */\n Cancel = 'cancel',\n}\n"]}
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAkCA,MAAM,CAAN,IAAY,YAUX;AAVD,WAAY,YAAY;IACtB;;OAEG;IACH,iCAAiB,CAAA;IAEjB;;OAEG;IACH,+CAA+B,CAAA;AACjC,CAAC,EAVW,YAAY,KAAZ,YAAY,QAUvB;AAsBD,MAAM,CAAN,IAAY,0BAUX;AAVD,WAAY,0BAA0B;IACpC;;OAEG;IACH,iDAAmB,CAAA;IAEnB;;OAEG;IACH,+CAAiB,CAAA;AACnB,CAAC,EAVW,0BAA0B,KAA1B,0BAA0B,QAUrC","sourcesContent":["export interface DocumentScannerPlugin {\n /**\n * Opens the device camera and starts the document scanning experience.\n */\n scanDocument(options?: ScanDocumentOptions): Promise<ScanDocumentResponse>;\n}\n\nexport interface ScanDocumentOptions {\n /**\n * Android only: quality of the cropped image from 0 - 100 (100 is best).\n * @default 100\n */\n croppedImageQuality?: number;\n\n /**\n * Android only: allow the user to adjust the detected crop before saving.\n * Disabling this forces single-document capture.\n * @default true\n */\n letUserAdjustCrop?: boolean;\n\n /**\n * Android only: maximum number of documents the user can scan.\n * @default 24\n */\n maxNumDocuments?: number;\n\n /**\n * Format to return scanned images in (file paths or base64 strings).\n * @default ResponseType.ImageFilePath\n */\n responseType?: ResponseType;\n}\n\nexport enum ResponseType {\n /**\n * Return scanned images as base64-encoded strings.\n */\n Base64 = 'base64',\n\n /**\n * Return scanned images as file paths on disk.\n */\n ImageFilePath = 'imageFilePath',\n}\n\nexport interface ScanDocumentResponse {\n /**\n * Scanned images in the requested response format.\n */\n scannedImages?: string[];\n\n /**\n * Indicates whether the scan completed or was cancelled.\n */\n status?: ScanDocumentResponseStatus;\n\n /**\n * Get the native Capacitor plugin version\n *\n * @returns {Promise<{ id: string }>} an Promise with version for this device\n * @throws An error if the something went wrong\n */\n getPluginVersion(): Promise<{ version: string }>;\n}\n\nexport enum ScanDocumentResponseStatus {\n /**\n * The scan completed successfully.\n */\n Success = 'success',\n\n /**\n * The user cancelled the scan flow.\n */\n Cancel = 'cancel',\n}\n"]}
package/dist/esm/web.d.ts CHANGED
@@ -2,4 +2,7 @@ import { WebPlugin } from '@capacitor/core';
2
2
  import type { DocumentScannerPlugin, ScanDocumentOptions, ScanDocumentResponse } from './definitions';
3
3
  export declare class DocumentScannerWeb extends WebPlugin implements DocumentScannerPlugin {
4
4
  scanDocument(_options?: ScanDocumentOptions): Promise<ScanDocumentResponse>;
5
+ getPluginVersion(): Promise<{
6
+ version: string;
7
+ }>;
5
8
  }
package/dist/esm/web.js CHANGED
@@ -3,5 +3,8 @@ export class DocumentScannerWeb extends WebPlugin {
3
3
  async scanDocument(_options) {
4
4
  throw this.unimplemented('Document scanning is not supported on the web.');
5
5
  }
6
+ async getPluginVersion() {
7
+ return { version: 'web' };
8
+ }
6
9
  }
7
10
  //# sourceMappingURL=web.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,kBAAmB,SAAQ,SAAS;IAC/C,KAAK,CAAC,YAAY,CAAC,QAA8B;QAC/C,MAAM,IAAI,CAAC,aAAa,CAAC,gDAAgD,CAAC,CAAC;IAC7E,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { DocumentScannerPlugin, ScanDocumentOptions, ScanDocumentResponse } from './definitions';\n\nexport class DocumentScannerWeb extends WebPlugin implements DocumentScannerPlugin {\n async scanDocument(_options?: ScanDocumentOptions): Promise<ScanDocumentResponse> {\n throw this.unimplemented('Document scanning is not supported on the web.');\n }\n}\n"]}
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,kBAAmB,SAAQ,SAAS;IAC/C,KAAK,CAAC,YAAY,CAAC,QAA8B;QAC/C,MAAM,IAAI,CAAC,aAAa,CAAC,gDAAgD,CAAC,CAAC;IAC7E,CAAC;IAED,KAAK,CAAC,gBAAgB;QACpB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { DocumentScannerPlugin, ScanDocumentOptions, ScanDocumentResponse } from './definitions';\n\nexport class DocumentScannerWeb extends WebPlugin implements DocumentScannerPlugin {\n async scanDocument(_options?: ScanDocumentOptions): Promise<ScanDocumentResponse> {\n throw this.unimplemented('Document scanning is not supported on the web.');\n }\n\n async getPluginVersion(): Promise<{ version: string }> {\n return { version: 'web' };\n }\n}\n"]}
@@ -33,6 +33,9 @@ class DocumentScannerWeb extends core.WebPlugin {
33
33
  async scanDocument(_options) {
34
34
  throw this.unimplemented('Document scanning is not supported on the web.');
35
35
  }
36
+ async getPluginVersion() {
37
+ return { version: 'web' };
38
+ }
36
39
  }
37
40
 
38
41
  var web = /*#__PURE__*/Object.freeze({
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["export var ResponseType;\n(function (ResponseType) {\n /**\n * Return scanned images as base64-encoded strings.\n */\n ResponseType[\"Base64\"] = \"base64\";\n /**\n * Return scanned images as file paths on disk.\n */\n ResponseType[\"ImageFilePath\"] = \"imageFilePath\";\n})(ResponseType || (ResponseType = {}));\nexport var ScanDocumentResponseStatus;\n(function (ScanDocumentResponseStatus) {\n /**\n * The scan completed successfully.\n */\n ScanDocumentResponseStatus[\"Success\"] = \"success\";\n /**\n * The user cancelled the scan flow.\n */\n ScanDocumentResponseStatus[\"Cancel\"] = \"cancel\";\n})(ScanDocumentResponseStatus || (ScanDocumentResponseStatus = {}));\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst DocumentScanner = registerPlugin('DocumentScanner', {\n web: () => import('./web').then((m) => new m.DocumentScannerWeb()),\n});\nexport * from './definitions';\nexport { DocumentScanner };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class DocumentScannerWeb extends WebPlugin {\n async scanDocument(_options) {\n throw this.unimplemented('Document scanning is not supported on the web.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["ResponseType","ScanDocumentResponseStatus","registerPlugin","WebPlugin"],"mappings":";;;;AAAWA;AACX,CAAC,UAAU,YAAY,EAAE;AACzB;AACA;AACA;AACA,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,QAAQ;AACrC;AACA;AACA;AACA,IAAI,YAAY,CAAC,eAAe,CAAC,GAAG,eAAe;AACnD,CAAC,EAAEA,oBAAY,KAAKA,oBAAY,GAAG,EAAE,CAAC,CAAC;AAC5BC;AACX,CAAC,UAAU,0BAA0B,EAAE;AACvC;AACA;AACA;AACA,IAAI,0BAA0B,CAAC,SAAS,CAAC,GAAG,SAAS;AACrD;AACA;AACA;AACA,IAAI,0BAA0B,CAAC,QAAQ,CAAC,GAAG,QAAQ;AACnD,CAAC,EAAEA,kCAA0B,KAAKA,kCAA0B,GAAG,EAAE,CAAC,CAAC;;ACpB9D,MAAC,eAAe,GAAGC,mBAAc,CAAC,iBAAiB,EAAE;AAC1D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;AACtE,CAAC;;ACFM,MAAM,kBAAkB,SAASC,cAAS,CAAC;AAClD,IAAI,MAAM,YAAY,CAAC,QAAQ,EAAE;AACjC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,gDAAgD,CAAC;AAClF,IAAI;AACJ;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["export var ResponseType;\n(function (ResponseType) {\n /**\n * Return scanned images as base64-encoded strings.\n */\n ResponseType[\"Base64\"] = \"base64\";\n /**\n * Return scanned images as file paths on disk.\n */\n ResponseType[\"ImageFilePath\"] = \"imageFilePath\";\n})(ResponseType || (ResponseType = {}));\nexport var ScanDocumentResponseStatus;\n(function (ScanDocumentResponseStatus) {\n /**\n * The scan completed successfully.\n */\n ScanDocumentResponseStatus[\"Success\"] = \"success\";\n /**\n * The user cancelled the scan flow.\n */\n ScanDocumentResponseStatus[\"Cancel\"] = \"cancel\";\n})(ScanDocumentResponseStatus || (ScanDocumentResponseStatus = {}));\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst DocumentScanner = registerPlugin('DocumentScanner', {\n web: () => import('./web').then((m) => new m.DocumentScannerWeb()),\n});\nexport * from './definitions';\nexport { DocumentScanner };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class DocumentScannerWeb extends WebPlugin {\n async scanDocument(_options) {\n throw this.unimplemented('Document scanning is not supported on the web.');\n }\n async getPluginVersion() {\n return { version: 'web' };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["ResponseType","ScanDocumentResponseStatus","registerPlugin","WebPlugin"],"mappings":";;;;AAAWA;AACX,CAAC,UAAU,YAAY,EAAE;AACzB;AACA;AACA;AACA,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,QAAQ;AACrC;AACA;AACA;AACA,IAAI,YAAY,CAAC,eAAe,CAAC,GAAG,eAAe;AACnD,CAAC,EAAEA,oBAAY,KAAKA,oBAAY,GAAG,EAAE,CAAC,CAAC;AAC5BC;AACX,CAAC,UAAU,0BAA0B,EAAE;AACvC;AACA;AACA;AACA,IAAI,0BAA0B,CAAC,SAAS,CAAC,GAAG,SAAS;AACrD;AACA;AACA;AACA,IAAI,0BAA0B,CAAC,QAAQ,CAAC,GAAG,QAAQ;AACnD,CAAC,EAAEA,kCAA0B,KAAKA,kCAA0B,GAAG,EAAE,CAAC,CAAC;;ACpB9D,MAAC,eAAe,GAAGC,mBAAc,CAAC,iBAAiB,EAAE;AAC1D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;AACtE,CAAC;;ACFM,MAAM,kBAAkB,SAASC,cAAS,CAAC;AAClD,IAAI,MAAM,YAAY,CAAC,QAAQ,EAAE;AACjC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,gDAAgD,CAAC;AAClF,IAAI;AACJ,IAAI,MAAM,gBAAgB,GAAG;AAC7B,QAAQ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;AACjC,IAAI;AACJ;;;;;;;;;"}
package/dist/plugin.js CHANGED
@@ -32,6 +32,9 @@ var capacitorDocumentScanner = (function (exports, core) {
32
32
  async scanDocument(_options) {
33
33
  throw this.unimplemented('Document scanning is not supported on the web.');
34
34
  }
35
+ async getPluginVersion() {
36
+ return { version: 'web' };
37
+ }
35
38
  }
36
39
 
37
40
  var web = /*#__PURE__*/Object.freeze({
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["export var ResponseType;\n(function (ResponseType) {\n /**\n * Return scanned images as base64-encoded strings.\n */\n ResponseType[\"Base64\"] = \"base64\";\n /**\n * Return scanned images as file paths on disk.\n */\n ResponseType[\"ImageFilePath\"] = \"imageFilePath\";\n})(ResponseType || (ResponseType = {}));\nexport var ScanDocumentResponseStatus;\n(function (ScanDocumentResponseStatus) {\n /**\n * The scan completed successfully.\n */\n ScanDocumentResponseStatus[\"Success\"] = \"success\";\n /**\n * The user cancelled the scan flow.\n */\n ScanDocumentResponseStatus[\"Cancel\"] = \"cancel\";\n})(ScanDocumentResponseStatus || (ScanDocumentResponseStatus = {}));\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst DocumentScanner = registerPlugin('DocumentScanner', {\n web: () => import('./web').then((m) => new m.DocumentScannerWeb()),\n});\nexport * from './definitions';\nexport { DocumentScanner };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class DocumentScannerWeb extends WebPlugin {\n async scanDocument(_options) {\n throw this.unimplemented('Document scanning is not supported on the web.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["ResponseType","ScanDocumentResponseStatus","registerPlugin","WebPlugin"],"mappings":";;;AAAWA;IACX,CAAC,UAAU,YAAY,EAAE;IACzB;IACA;IACA;IACA,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,QAAQ;IACrC;IACA;IACA;IACA,IAAI,YAAY,CAAC,eAAe,CAAC,GAAG,eAAe;IACnD,CAAC,EAAEA,oBAAY,KAAKA,oBAAY,GAAG,EAAE,CAAC,CAAC;AAC5BC;IACX,CAAC,UAAU,0BAA0B,EAAE;IACvC;IACA;IACA;IACA,IAAI,0BAA0B,CAAC,SAAS,CAAC,GAAG,SAAS;IACrD;IACA;IACA;IACA,IAAI,0BAA0B,CAAC,QAAQ,CAAC,GAAG,QAAQ;IACnD,CAAC,EAAEA,kCAA0B,KAAKA,kCAA0B,GAAG,EAAE,CAAC,CAAC;;ACpB9D,UAAC,eAAe,GAAGC,mBAAc,CAAC,iBAAiB,EAAE;IAC1D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;IACtE,CAAC;;ICFM,MAAM,kBAAkB,SAASC,cAAS,CAAC;IAClD,IAAI,MAAM,YAAY,CAAC,QAAQ,EAAE;IACjC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,gDAAgD,CAAC;IAClF,IAAI;IACJ;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["export var ResponseType;\n(function (ResponseType) {\n /**\n * Return scanned images as base64-encoded strings.\n */\n ResponseType[\"Base64\"] = \"base64\";\n /**\n * Return scanned images as file paths on disk.\n */\n ResponseType[\"ImageFilePath\"] = \"imageFilePath\";\n})(ResponseType || (ResponseType = {}));\nexport var ScanDocumentResponseStatus;\n(function (ScanDocumentResponseStatus) {\n /**\n * The scan completed successfully.\n */\n ScanDocumentResponseStatus[\"Success\"] = \"success\";\n /**\n * The user cancelled the scan flow.\n */\n ScanDocumentResponseStatus[\"Cancel\"] = \"cancel\";\n})(ScanDocumentResponseStatus || (ScanDocumentResponseStatus = {}));\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst DocumentScanner = registerPlugin('DocumentScanner', {\n web: () => import('./web').then((m) => new m.DocumentScannerWeb()),\n});\nexport * from './definitions';\nexport { DocumentScanner };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class DocumentScannerWeb extends WebPlugin {\n async scanDocument(_options) {\n throw this.unimplemented('Document scanning is not supported on the web.');\n }\n async getPluginVersion() {\n return { version: 'web' };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["ResponseType","ScanDocumentResponseStatus","registerPlugin","WebPlugin"],"mappings":";;;AAAWA;IACX,CAAC,UAAU,YAAY,EAAE;IACzB;IACA;IACA;IACA,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,QAAQ;IACrC;IACA;IACA;IACA,IAAI,YAAY,CAAC,eAAe,CAAC,GAAG,eAAe;IACnD,CAAC,EAAEA,oBAAY,KAAKA,oBAAY,GAAG,EAAE,CAAC,CAAC;AAC5BC;IACX,CAAC,UAAU,0BAA0B,EAAE;IACvC;IACA;IACA;IACA,IAAI,0BAA0B,CAAC,SAAS,CAAC,GAAG,SAAS;IACrD;IACA;IACA;IACA,IAAI,0BAA0B,CAAC,QAAQ,CAAC,GAAG,QAAQ;IACnD,CAAC,EAAEA,kCAA0B,KAAKA,kCAA0B,GAAG,EAAE,CAAC,CAAC;;ACpB9D,UAAC,eAAe,GAAGC,mBAAc,CAAC,iBAAiB,EAAE;IAC1D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;IACtE,CAAC;;ICFM,MAAM,kBAAkB,SAASC,cAAS,CAAC;IAClD,IAAI,MAAM,YAAY,CAAC,QAAQ,EAAE;IACjC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,gDAAgD,CAAC;IAClF,IAAI;IACJ,IAAI,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;IACjC,IAAI;IACJ;;;;;;;;;;;;;;;"}
@@ -4,10 +4,12 @@ import Foundation
4
4
  @available(iOS 13.0, *)
5
5
  @objc(DocumentScannerPlugin)
6
6
  public class DocumentScannerPlugin: CAPPlugin, CAPBridgedPlugin {
7
+ private let PLUGIN_VERSION: String = "7.1.0"
7
8
  public let identifier = "DocumentScannerPlugin"
8
9
  public let jsName = "DocumentScanner"
9
10
  public let pluginMethods: [CAPPluginMethod] = [
10
- CAPPluginMethod(name: "scanDocument", returnType: CAPPluginReturnPromise)
11
+ CAPPluginMethod(name: "scanDocument", returnType: CAPPluginReturnPromise),
12
+ CAPPluginMethod(name: "getPluginVersion", returnType: CAPPluginReturnPromise)
11
13
  ]
12
14
 
13
15
  private var documentScanner: DocScanner?
@@ -48,4 +50,9 @@ public class DocumentScannerPlugin: CAPPlugin, CAPBridgedPlugin {
48
50
  let quality = value ?? 100
49
51
  return max(0, min(100, quality))
50
52
  }
53
+
54
+ @objc func getPluginVersion(_ call: CAPPluginCall) {
55
+ call.resolve(["version": self.PLUGIN_VERSION])
56
+ }
57
+
51
58
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-document-scanner",
3
- "version": "7.0.8",
3
+ "version": "7.1.0",
4
4
  "description": "Capacitor plugin to scan document iOS and Android",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",