@blueid/access-capacitor 12.19.0 → 12.21.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.
Files changed (78) hide show
  1. package/android/sdklib/com/blue-id/access/12.21.0/access-12.21.0.aar +0 -0
  2. package/android/sdklib/com/blue-id/access/12.21.0/access-12.21.0.aar.asc +7 -0
  3. package/android/sdklib/com/blue-id/access/12.21.0/access-12.21.0.aar.asc.md5 +1 -0
  4. package/android/sdklib/com/blue-id/access/12.21.0/access-12.21.0.aar.asc.sha1 +1 -0
  5. package/android/sdklib/com/blue-id/access/12.21.0/access-12.21.0.aar.asc.sha256 +1 -0
  6. package/android/sdklib/com/blue-id/access/12.21.0/access-12.21.0.aar.asc.sha512 +1 -0
  7. package/android/sdklib/com/blue-id/access/12.21.0/access-12.21.0.aar.md5 +1 -0
  8. package/android/sdklib/com/blue-id/access/12.21.0/access-12.21.0.aar.sha1 +1 -0
  9. package/android/sdklib/com/blue-id/access/12.21.0/access-12.21.0.aar.sha256 +1 -0
  10. package/android/sdklib/com/blue-id/access/12.21.0/access-12.21.0.aar.sha512 +1 -0
  11. package/android/sdklib/com/blue-id/access/{12.19.0/access-12.19.0.module → 12.21.0/access-12.21.0.module} +15 -15
  12. package/android/sdklib/com/blue-id/access/12.21.0/access-12.21.0.module.asc +7 -0
  13. package/android/sdklib/com/blue-id/access/12.21.0/access-12.21.0.module.asc.md5 +1 -0
  14. package/android/sdklib/com/blue-id/access/12.21.0/access-12.21.0.module.asc.sha1 +1 -0
  15. package/android/sdklib/com/blue-id/access/12.21.0/access-12.21.0.module.asc.sha256 +1 -0
  16. package/android/sdklib/com/blue-id/access/12.21.0/access-12.21.0.module.asc.sha512 +1 -0
  17. package/android/sdklib/com/blue-id/access/12.21.0/access-12.21.0.module.md5 +1 -0
  18. package/android/sdklib/com/blue-id/access/12.21.0/access-12.21.0.module.sha1 +1 -0
  19. package/android/sdklib/com/blue-id/access/12.21.0/access-12.21.0.module.sha256 +1 -0
  20. package/android/sdklib/com/blue-id/access/12.21.0/access-12.21.0.module.sha512 +1 -0
  21. package/android/sdklib/com/blue-id/access/{12.19.0/access-12.19.0.pom → 12.21.0/access-12.21.0.pom} +1 -1
  22. package/android/sdklib/com/blue-id/access/12.21.0/access-12.21.0.pom.asc +7 -0
  23. package/android/sdklib/com/blue-id/access/12.21.0/access-12.21.0.pom.asc.md5 +1 -0
  24. package/android/sdklib/com/blue-id/access/12.21.0/access-12.21.0.pom.asc.sha1 +1 -0
  25. package/android/sdklib/com/blue-id/access/12.21.0/access-12.21.0.pom.asc.sha256 +1 -0
  26. package/android/sdklib/com/blue-id/access/12.21.0/access-12.21.0.pom.asc.sha512 +1 -0
  27. package/android/sdklib/com/blue-id/access/12.21.0/access-12.21.0.pom.md5 +1 -0
  28. package/android/sdklib/com/blue-id/access/12.21.0/access-12.21.0.pom.sha1 +1 -0
  29. package/android/sdklib/com/blue-id/access/12.21.0/access-12.21.0.pom.sha256 +1 -0
  30. package/android/sdklib/com/blue-id/access/12.21.0/access-12.21.0.pom.sha512 +1 -0
  31. package/android/sdklib/com/blue-id/access/maven-metadata.xml +4 -4
  32. package/android/sdklib/com/blue-id/access/maven-metadata.xml.md5 +1 -1
  33. package/android/sdklib/com/blue-id/access/maven-metadata.xml.sha1 +1 -1
  34. package/android/sdklib/com/blue-id/access/maven-metadata.xml.sha256 +1 -1
  35. package/android/sdklib/com/blue-id/access/maven-metadata.xml.sha512 +1 -1
  36. package/android/src/main/java/com/blueid/access/plugins/capacitor/BlueIDAccess.java +14 -1
  37. package/android/src/main/java/com/blueid/access/plugins/capacitor/BlueIDAccessPlugin.java +6 -2
  38. package/dist/docs.json +7 -0
  39. package/dist/esm/BlueSDK_pb.d.ts +17 -0
  40. package/dist/esm/BlueSDK_pb.js +23 -0
  41. package/dist/esm/BlueSDK_pb.js.map +1 -1
  42. package/dist/esm/interop.d.ts +2 -1
  43. package/dist/esm/interop.js +2 -1
  44. package/dist/esm/interop.js.map +1 -1
  45. package/dist/plugin.cjs.js +26 -1
  46. package/dist/plugin.cjs.js.map +1 -1
  47. package/dist/plugin.js +26 -1
  48. package/dist/plugin.js.map +1 -1
  49. package/ios/Plugin/BlueIDAccessPlugin.swift +1 -0
  50. package/package.json +1 -1
  51. package/android/sdklib/com/blue-id/access/12.19.0/access-12.19.0.aar +0 -0
  52. package/android/sdklib/com/blue-id/access/12.19.0/access-12.19.0.aar.asc +0 -7
  53. package/android/sdklib/com/blue-id/access/12.19.0/access-12.19.0.aar.asc.md5 +0 -1
  54. package/android/sdklib/com/blue-id/access/12.19.0/access-12.19.0.aar.asc.sha1 +0 -1
  55. package/android/sdklib/com/blue-id/access/12.19.0/access-12.19.0.aar.asc.sha256 +0 -1
  56. package/android/sdklib/com/blue-id/access/12.19.0/access-12.19.0.aar.asc.sha512 +0 -1
  57. package/android/sdklib/com/blue-id/access/12.19.0/access-12.19.0.aar.md5 +0 -1
  58. package/android/sdklib/com/blue-id/access/12.19.0/access-12.19.0.aar.sha1 +0 -1
  59. package/android/sdklib/com/blue-id/access/12.19.0/access-12.19.0.aar.sha256 +0 -1
  60. package/android/sdklib/com/blue-id/access/12.19.0/access-12.19.0.aar.sha512 +0 -1
  61. package/android/sdklib/com/blue-id/access/12.19.0/access-12.19.0.module.asc +0 -7
  62. package/android/sdklib/com/blue-id/access/12.19.0/access-12.19.0.module.asc.md5 +0 -1
  63. package/android/sdklib/com/blue-id/access/12.19.0/access-12.19.0.module.asc.sha1 +0 -1
  64. package/android/sdklib/com/blue-id/access/12.19.0/access-12.19.0.module.asc.sha256 +0 -1
  65. package/android/sdklib/com/blue-id/access/12.19.0/access-12.19.0.module.asc.sha512 +0 -1
  66. package/android/sdklib/com/blue-id/access/12.19.0/access-12.19.0.module.md5 +0 -1
  67. package/android/sdklib/com/blue-id/access/12.19.0/access-12.19.0.module.sha1 +0 -1
  68. package/android/sdklib/com/blue-id/access/12.19.0/access-12.19.0.module.sha256 +0 -1
  69. package/android/sdklib/com/blue-id/access/12.19.0/access-12.19.0.module.sha512 +0 -1
  70. package/android/sdklib/com/blue-id/access/12.19.0/access-12.19.0.pom.asc +0 -7
  71. package/android/sdklib/com/blue-id/access/12.19.0/access-12.19.0.pom.asc.md5 +0 -1
  72. package/android/sdklib/com/blue-id/access/12.19.0/access-12.19.0.pom.asc.sha1 +0 -1
  73. package/android/sdklib/com/blue-id/access/12.19.0/access-12.19.0.pom.asc.sha256 +0 -1
  74. package/android/sdklib/com/blue-id/access/12.19.0/access-12.19.0.pom.asc.sha512 +0 -1
  75. package/android/sdklib/com/blue-id/access/12.19.0/access-12.19.0.pom.md5 +0 -1
  76. package/android/sdklib/com/blue-id/access/12.19.0/access-12.19.0.pom.sha1 +0 -1
  77. package/android/sdklib/com/blue-id/access/12.19.0/access-12.19.0.pom.sha256 +0 -1
  78. package/android/sdklib/com/blue-id/access/12.19.0/access-12.19.0.pom.sha512 +0 -1
@@ -13,6 +13,7 @@ export interface RunCommandOptions {
13
13
  arg0: any | null;
14
14
  arg1: any | null;
15
15
  arg2: any | null;
16
+ arg3: any | null;
16
17
  }
17
18
  export interface TerminalRunOptions {
18
19
  identityID?: string;
@@ -31,7 +32,7 @@ export declare class BlueIDAccessInterop {
31
32
  terminalRunFunc: (options: TerminalRunOptions) => Promise<TerminalRunResult>;
32
33
  addListenerFunc: (event: string, callback: (data: any) => void) => Promise<BlueAccessListener>;
33
34
  constructor(runCommandFunc: (options: RunCommandOptions) => Promise<any>, terminalRunFunc: (options: TerminalRunOptions) => Promise<TerminalRunResult>, addListenerFunc: (event: string, callback: (data: any) => void) => Promise<BlueAccessListener>);
34
- runCommand(command: string, arg0?: any | null, arg1?: any | null, arg2?: any | null): Promise<any | void>;
35
+ runCommand(command: string, arg0?: any | null, arg1?: any | null, arg2?: any | null, arg3?: any | null): Promise<any | void>;
35
36
  terminalRunAll(identityID: string | null, deviceID: string, requests: BlueAccessTerminalRequest[], timeoutSeconds?: number): Promise<BlueAccessTerminalResult[]>;
36
37
  terminalRun(identityID: string | null, deviceID: string, request: BlueAccessTerminalRequest, timeoutSeconds?: number): Promise<BlueAccessTerminalResult>;
37
38
  addListener(event: string, callback: (data: any) => void): Promise<BlueAccessListener>;
@@ -54,7 +54,7 @@ export class BlueIDAccessInterop {
54
54
  this.terminalRunFunc = terminalRunFunc;
55
55
  this.addListenerFunc = addListenerFunc;
56
56
  }
57
- async runCommand(command, arg0 = null, arg1 = null, arg2 = null) {
57
+ async runCommand(command, arg0 = null, arg1 = null, arg2 = null, arg3 = null) {
58
58
  if (!command) {
59
59
  throw new Error("Missing valid command");
60
60
  }
@@ -64,6 +64,7 @@ export class BlueIDAccessInterop {
64
64
  arg0: encodeArgument(arg0),
65
65
  arg1: encodeArgument(arg1),
66
66
  arg2: encodeArgument(arg2),
67
+ arg3: encodeArgument(arg3),
67
68
  });
68
69
  console.log('Running command with result : ' + JSON.stringify(result));
69
70
  if (!result) {
@@ -1 +1 @@
1
- {"version":3,"file":"interop.js","sourceRoot":"","sources":["../../src/interop.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,kFAAkF;AAClF,EAAE;;;;;;;;;;;;AAEF,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAE7D,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAE9C,MAAM,YAAY,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;AAE/D,MAAM,eAAe,GAAG,CAAC,eAAuB,EAAO,EAAE;IACvD,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;QACvC,MAAM,MAAM,GAAI,WAAmB,CAAC,eAAe,CAAC,CAAC;QACrD,IAAI,MA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AC,CAAC,EAAE,CAAC;YACzC,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;QACxC,CAAC;QAED,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,KAAa,EAAE,QAA6B;QAC5D,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC;YACzB,OAAO,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC,IAAS,EAAE,EAAE;gBAC/C,IAAI,SAAS,GAAG,IAAI,CAAC;gBAErB,IAAI,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,IAAI,MAAI,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,eAAe,CAAA,EAAE,CAAC;oBAClD,SAAS,GAAG,YAAY,CAAC,SAAS,CAAC,eAAe,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;gBACtE,CAAC;gBAED,QAAQ,CAAC,SAAS,CAAC,CAAC;YACtB,CAAC,CAAC,CAAC;QACL,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;CACF;AAED,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC","sourcesContent":["//\n// Utilities shared for typescript json-interfaces like react-native and capacitor\n//\n\nimport { Message, protoDelimited } from \"@bufbuild/protobuf\";\n\nimport * as base64 from \"./base64\";\n\nimport * as BlueCore from \"./BlueCore_pb\";\nimport * as BlueLock from \"./BlueLock_pb\";\nimport * as BlueSDK from \"./BlueSDK_pb\";\nimport * as BlueSystem from \"./BlueSystem_pb\";\n\nconst protoModules = [BlueCore, BlueLock, BlueSDK, BlueSystem];\n\nconst getMessageClass = (messageTypeName: string): any => {\n for (const protoModule of protoModules) {\n const result = (protoModule as any)[messageTypeName];\n if (result) {\n return result;\n }\n }\n\n throw new Error(\n `No message class found for message type '${messageTypeName}'`\n );\n};\n\nconst encodeArgument = (arg: any | null): any => {\n if (arg instanceof Message) {\n const binary = protoDelimited.enc(arg);\n\n const binaryString: string[] = [];\n for (let i = 0; i < binary.length; i++) {\n binaryString.push(String.fromCharCode(binary[i]!));\n }\n\n const base64String = base64.encode(binaryString.join(\"\"));\n return `message:${base64String}`;\n }\n return arg;\n};\n\nconst decodeResult = (\n messageTypeName: string,\n messageString: string | null\n): any => {\n const MessageClass = getMessageClass(messageTypeName);\n\n if (messageString == null || !messageString.startsWith(\"message:\")) {\n throw new Error(`Invalid message to decode: '${messageString}'`);\n }\n\n const binary = Uint8Array.from(\n base64.decode(messageString.substring(\"message:\".length)),\n (v: string) => v.charCodeAt(0)\n );\n\n return protoDelimited.dec(MessageClass, binary);\n};\n\nexport interface BlueAccessTerminalRequest {\n action: string;\n data: any | null;\n resultMessageTypeName: string | null;\n}\n\nexport interface BlueAccessTerminalResult {\n statusCode: BlueCore.BlueReturnCode;\n data: any | null;\n}\n\nexport interface RunCommandOptions {\n command: string;\n arg0: any | null;\n arg1: any | null;\n arg2: any | null;\n}\n\nexport interface TerminalRunOptions {\n identityID?: string;\n deviceID: string;\n timeoutSeconds: number;\n requests: BlueAccessTerminalRequest[];\n}\n\nexport interface TerminalRunResult {\n results: BlueAccessTerminalResult[];\n}\n\nexport interface BlueAccessListener {\n remove(): Promise<void>;\n}\n\nexport class BlueIDAccessInterop {\n runCommandFunc: (options: RunCommandOptions) => Promise<any>;\n terminalRunFunc: (options: TerminalRunOptions) => Promise<TerminalRunResult>;\n addListenerFunc: (event: string, callback: (data: any) => void) => Promise<BlueAccessListener>;\n\n constructor(\n runCommandFunc: (options: RunCommandOptions) => Promise<any>,\n terminalRunFunc: (options: TerminalRunOptions) => Promise<TerminalRunResult>,\n addListenerFunc: (event: string, callback: (data: any) => void) => Promise<BlueAccessListener>\n ) {\n this.runCommandFunc = runCommandFunc;\n this.terminalRunFunc = terminalRunFunc;\n this.addListenerFunc = addListenerFunc;\n }\n\n async runCommand(\n command: string,\n arg0: any | null = null,\n arg1: any | null = null,\n arg2: any | null = null\n ): Promise<any | void> {\n if (!command) {\n throw new Error(\"Missing valid command\");\n }\n\n console.log('Starting command: '+ JSON.stringify(command));\n\n const result = await this.runCommandFunc({\n command,\n arg0: encodeArgument(arg0),\n arg1: encodeArgument(arg1),\n arg2: encodeArgument(arg2),\n });\n\n console.log('Running command with result : '+ JSON.stringify(result));\n\n if (!result) {\n return null;\n }\n\n if (result.data && result.messageTypeName) {\n return decodeResult(result.messageTypeName, result.data);\n }\n\n console.log('result from interop '+ command + ' : ' + JSON.stringify(result.data));\n\n return result.data;\n }\n\n async terminalRunAll(\n identityID: string | null,\n deviceID: string,\n requests: BlueAccessTerminalRequest[],\n timeoutSeconds = 10.0,\n ): Promise<BlueAccessTerminalResult[]> {\n if (!deviceID) {\n throw new Error(\"Invalid deviceID\");\n }\n\n if (timeoutSeconds <= 0) {\n throw new Error(\"Invalid timeout\");\n }\n\n if (!requests.length) {\n throw new Error(\"Invalid requests\");\n }\n\n const convertedRequests: BlueAccessTerminalRequest[] = requests.map(\n ({ data, ...otherProps }) => ({\n ...otherProps,\n data: encodeArgument(data),\n })\n );\n\n const runResult = await this.terminalRunFunc({\n identityID: identityID || undefined,\n deviceID,\n timeoutSeconds,\n requests: convertedRequests,\n });\n\n if (!runResult?.results?.length) {\n throw new Error(\"No results received\");\n }\n\n const results: BlueAccessTerminalResult[] = [];\n\n for (let index = 0; index < runResult.results.length; index += 1) {\n const request = convertedRequests[index];\n\n if (!request) {\n throw new Error(\"Invalid request\");\n }\n\n const result = runResult.results[index];\n\n if (!result) {\n throw new Error(\"Invalid result\");\n }\n\n if (request.resultMessageTypeName) {\n results.push({\n statusCode: result.statusCode,\n data: decodeResult(request.resultMessageTypeName, result.data),\n });\n } else if (\n typeof result.data === \"string\" &&\n result.data.startsWith(\"message:\") &&\n result.data !== \"message:\"\n ) {\n throw new Error(\n `Missing resultMessageTypeName for action '${request.action}'`\n );\n } else {\n results.push({ statusCode: result.statusCode, data: result.data });\n }\n }\n\n return results;\n }\n\n async terminalRun(\n identityID: string | null,\n deviceID: string,\n request: BlueAccessTerminalRequest,\n timeoutSeconds = 10.0,\n ): Promise<BlueAccessTerminalResult> {\n const results = await this.terminalRunAll(identityID, deviceID, [request], timeoutSeconds);\n \n if (results?.length !== 1 || !results[0]) {\n throw new Error('Unexpected results');\n }\n\n return results[0];\n }\n\n async addListener(event: string, callback: (data: any) => void): Promise<BlueAccessListener> {\n if (this.addListenerFunc) {\n return this.addListenerFunc(event, (data: any) => {\n let eventData = data;\n\n if (eventData?.data && eventData?.messageTypeName) {\n eventData = decodeResult(eventData.messageTypeName, eventData.data);\n }\n\n callback(eventData);\n });\n }\n throw new Error('No listeners supported.');\n }\n}\n\nexport * from \"./BlueCore_pb\";\nexport * from \"./BlueLock_pb\";\nexport * from \"./BlueSDK_pb\";\nexport * from \"./BlueSystem_pb\";\n"]}
1
+ {"version":3,"file":"interop.js","sourceRoot":"","sources":["../../src/interop.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,kFAAkF;AAClF,EAAE;;;;;;;;;;;;AAEF,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAE7D,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAE9C,MAAM,YAAY,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;AAE/D,MAAM,eAAe,GAAG,CAAC,eAAuB,EAAO,EAAE;IACvD,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;QACvC,MAAM,MAAM,GAAI,WAAmB,CAAC,eAAe,CAAC,CAAC;QACrD,IAAI,MAAM,EAA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AAO,CAAE,MAAM,MAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;YACzC,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;QACxC,CAAC;QAED,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,KAAa,EAAE,QAA6B;QAC5D,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC;YACzB,OAAO,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC,IAAS,EAAE,EAAE;gBAC/C,IAAI,SAAS,GAAG,IAAI,CAAC;gBAErB,IAAI,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,IAAI,MAAI,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,eAAe,CAAA,EAAE,CAAC;oBAClD,SAAS,GAAG,YAAY,CAAC,SAAS,CAAC,eAAe,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;gBACtE,CAAC;gBAED,QAAQ,CAAC,SAAS,CAAC,CAAC;YACtB,CAAC,CAAC,CAAC;QACL,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;CACF;AAED,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC","sourcesContent":["//\n// Utilities shared for typescript json-interfaces like react-native and capacitor\n//\n\nimport { Message, protoDelimited } from \"@bufbuild/protobuf\";\n\nimport * as base64 from \"./base64\";\n\nimport * as BlueCore from \"./BlueCore_pb\";\nimport * as BlueLock from \"./BlueLock_pb\";\nimport * as BlueSDK from \"./BlueSDK_pb\";\nimport * as BlueSystem from \"./BlueSystem_pb\";\n\nconst protoModules = [BlueCore, BlueLock, BlueSDK, BlueSystem];\n\nconst getMessageClass = (messageTypeName: string): any => {\n for (const protoModule of protoModules) {\n const result = (protoModule as any)[messageTypeName];\n if (result) {\n return result;\n }\n }\n\n throw new Error(\n `No message class found for message type '${messageTypeName}'`\n );\n};\n\nconst encodeArgument = (arg: any | null): any => {\n if (arg instanceof Message) {\n const binary = protoDelimited.enc(arg);\n\n const binaryString: string[] = [];\n for (let i = 0; i < binary.length; i++) {\n binaryString.push(String.fromCharCode(binary[i]!));\n }\n\n const base64String = base64.encode(binaryString.join(\"\"));\n return `message:${base64String}`;\n }\n return arg;\n};\n\nconst decodeResult = (\n messageTypeName: string,\n messageString: string | null\n): any => {\n const MessageClass = getMessageClass(messageTypeName);\n\n if (messageString == null || !messageString.startsWith(\"message:\")) {\n throw new Error(`Invalid message to decode: '${messageString}'`);\n }\n\n const binary = Uint8Array.from(\n base64.decode(messageString.substring(\"message:\".length)),\n (v: string) => v.charCodeAt(0)\n );\n\n return protoDelimited.dec(MessageClass, binary);\n};\n\nexport interface BlueAccessTerminalRequest {\n action: string;\n data: any | null;\n resultMessageTypeName: string | null;\n}\n\nexport interface BlueAccessTerminalResult {\n statusCode: BlueCore.BlueReturnCode;\n data: any | null;\n}\n\nexport interface RunCommandOptions {\n command: string;\n arg0: any | null;\n arg1: any | null;\n arg2: any | null;\n arg3: any | null;\n}\n\nexport interface TerminalRunOptions {\n identityID?: string;\n deviceID: string;\n timeoutSeconds: number;\n requests: BlueAccessTerminalRequest[];\n}\n\nexport interface TerminalRunResult {\n results: BlueAccessTerminalResult[];\n}\n\nexport interface BlueAccessListener {\n remove(): Promise<void>;\n}\n\nexport class BlueIDAccessInterop {\n runCommandFunc: (options: RunCommandOptions) => Promise<any>;\n terminalRunFunc: (options: TerminalRunOptions) => Promise<TerminalRunResult>;\n addListenerFunc: (event: string, callback: (data: any) => void) => Promise<BlueAccessListener>;\n\n constructor(\n runCommandFunc: (options: RunCommandOptions) => Promise<any>,\n terminalRunFunc: (options: TerminalRunOptions) => Promise<TerminalRunResult>,\n addListenerFunc: (event: string, callback: (data: any) => void) => Promise<BlueAccessListener>\n ) {\n this.runCommandFunc = runCommandFunc;\n this.terminalRunFunc = terminalRunFunc;\n this.addListenerFunc = addListenerFunc;\n }\n\n async runCommand(\n command: string,\n arg0: any | null = null,\n arg1: any | null = null,\n arg2: any | null = null,\n arg3: any | null = null\n ): Promise<any | void> {\n if (!command) {\n throw new Error(\"Missing valid command\");\n }\n\n console.log('Starting command: '+ JSON.stringify(command));\n\n const result = await this.runCommandFunc({\n command,\n arg0: encodeArgument(arg0),\n arg1: encodeArgument(arg1),\n arg2: encodeArgument(arg2),\n arg3: encodeArgument(arg3),\n });\n\n console.log('Running command with result : '+ JSON.stringify(result));\n\n if (!result) {\n return null;\n }\n\n if (result.data && result.messageTypeName) {\n return decodeResult(result.messageTypeName, result.data);\n }\n\n console.log('result from interop '+ command + ' : ' + JSON.stringify(result.data));\n\n return result.data;\n }\n\n async terminalRunAll(\n identityID: string | null,\n deviceID: string,\n requests: BlueAccessTerminalRequest[],\n timeoutSeconds = 10.0,\n ): Promise<BlueAccessTerminalResult[]> {\n if (!deviceID) {\n throw new Error(\"Invalid deviceID\");\n }\n\n if (timeoutSeconds <= 0) {\n throw new Error(\"Invalid timeout\");\n }\n\n if (!requests.length) {\n throw new Error(\"Invalid requests\");\n }\n\n const convertedRequests: BlueAccessTerminalRequest[] = requests.map(\n ({ data, ...otherProps }) => ({\n ...otherProps,\n data: encodeArgument(data),\n })\n );\n\n const runResult = await this.terminalRunFunc({\n identityID: identityID || undefined,\n deviceID,\n timeoutSeconds,\n requests: convertedRequests,\n });\n\n if (!runResult?.results?.length) {\n throw new Error(\"No results received\");\n }\n\n const results: BlueAccessTerminalResult[] = [];\n\n for (let index = 0; index < runResult.results.length; index += 1) {\n const request = convertedRequests[index];\n\n if (!request) {\n throw new Error(\"Invalid request\");\n }\n\n const result = runResult.results[index];\n\n if (!result) {\n throw new Error(\"Invalid result\");\n }\n\n if (request.resultMessageTypeName) {\n results.push({\n statusCode: result.statusCode,\n data: decodeResult(request.resultMessageTypeName, result.data),\n });\n } else if (\n typeof result.data === \"string\" &&\n result.data.startsWith(\"message:\") &&\n result.data !== \"message:\"\n ) {\n throw new Error(\n `Missing resultMessageTypeName for action '${request.action}'`\n );\n } else {\n results.push({ statusCode: result.statusCode, data: result.data });\n }\n }\n\n return results;\n }\n\n async terminalRun(\n identityID: string | null,\n deviceID: string,\n request: BlueAccessTerminalRequest,\n timeoutSeconds = 10.0,\n ): Promise<BlueAccessTerminalResult> {\n const results = await this.terminalRunAll(identityID, deviceID, [request], timeoutSeconds);\n \n if (results?.length !== 1 || !results[0]) {\n throw new Error('Unexpected results');\n }\n\n return results[0];\n }\n\n async addListener(event: string, callback: (data: any) => void): Promise<BlueAccessListener> {\n if (this.addListenerFunc) {\n return this.addListenerFunc(event, (data: any) => {\n let eventData = data;\n\n if (eventData?.data && eventData?.messageTypeName) {\n eventData = decodeResult(eventData.messageTypeName, eventData.data);\n }\n\n callback(eventData);\n });\n }\n throw new Error('No listeners supported.');\n }\n}\n\nexport * from \"./BlueCore_pb\";\nexport * from \"./BlueLock_pb\";\nexport * from \"./BlueSDK_pb\";\nexport * from \"./BlueSystem_pb\";\n"]}
@@ -3838,6 +3838,29 @@ protobuf.proto2.util.setEnumType(exports.BlueRefreshOssSoCredentialStatus, "Blue
3838
3838
  { no: 3, name: "NotNeeded" },
3839
3839
  { no: 4, name: "Unsupported" },
3840
3840
  ]);
3841
+ /**
3842
+ * @generated from enum BlueHardwareVendor
3843
+ */
3844
+ exports.BlueHardwareVendor = void 0;
3845
+ (function (BlueHardwareVendor) {
3846
+ /**
3847
+ * UUNZ
3848
+ *
3849
+ * @generated from enum value: uundzlocks = 0;
3850
+ */
3851
+ BlueHardwareVendor[BlueHardwareVendor["uundzlocks"] = 0] = "uundzlocks";
3852
+ /**
3853
+ * DigitalLogic
3854
+ *
3855
+ * @generated from enum value: dlogiclock = 1;
3856
+ */
3857
+ BlueHardwareVendor[BlueHardwareVendor["dlogiclock"] = 1] = "dlogiclock";
3858
+ })(exports.BlueHardwareVendor || (exports.BlueHardwareVendor = {}));
3859
+ // Retrieve enum metadata with: proto2.getEnumType(BlueHardwareVendor)
3860
+ protobuf.proto2.util.setEnumType(exports.BlueHardwareVendor, "BlueHardwareVendor", [
3861
+ { no: 0, name: "uundzlocks" },
3862
+ { no: 1, name: "dlogiclock" },
3863
+ ]);
3841
3864
  /**
3842
3865
  * @generated from message BlueI18n
3843
3866
  */
@@ -4709,6 +4732,7 @@ var BlueSDK = /*#__PURE__*/Object.freeze({
4709
4732
  __proto__: null,
4710
4733
  get BlueDeviceType () { return exports.BlueDeviceType; },
4711
4734
  get BlueRefreshOssSoCredentialStatus () { return exports.BlueRefreshOssSoCredentialStatus; },
4735
+ get BlueHardwareVendor () { return exports.BlueHardwareVendor; },
4712
4736
  BlueI18n: BlueI18n,
4713
4737
  BlueDeviceDetailsBluetooth: BlueDeviceDetailsBluetooth,
4714
4738
  BlueDeviceDetailsUWB: BlueDeviceDetailsUWB,
@@ -4787,7 +4811,7 @@ class BlueIDAccessInterop {
4787
4811
  this.terminalRunFunc = terminalRunFunc;
4788
4812
  this.addListenerFunc = addListenerFunc;
4789
4813
  }
4790
- async runCommand(command, arg0 = null, arg1 = null, arg2 = null) {
4814
+ async runCommand(command, arg0 = null, arg1 = null, arg2 = null, arg3 = null) {
4791
4815
  if (!command) {
4792
4816
  throw new Error("Missing valid command");
4793
4817
  }
@@ -4797,6 +4821,7 @@ class BlueIDAccessInterop {
4797
4821
  arg0: encodeArgument(arg0),
4798
4822
  arg1: encodeArgument(arg1),
4799
4823
  arg2: encodeArgument(arg2),
4824
+ arg3: encodeArgument(arg3),
4800
4825
  });
4801
4826
  console.log('Running command with result : ' + JSON.stringify(result));
4802
4827
  if (!result) {