@capgo/capacitor-zebra-datawedge 8.2.2 → 8.2.4
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 +111 -0
- package/android/src/main/java/app/capgo/zebradatawedge/ZebraDataWedge.java +1 -1
- package/android/src/main/java/app/capgo/zebradatawedge/ZebraDataWedgePlugin.java +158 -20
- package/dist/docs.json +11 -11
- package/dist/esm/definitions.d.ts +114 -0
- package/dist/esm/definitions.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -155,6 +155,14 @@ console.log(result);
|
|
|
155
155
|
- `softRfidTrigger()` uses the first registered scan intent action. Register a scan action first if you need RFID reads.
|
|
156
156
|
- Web and iOS return "not available" errors for all DataWedge operations.
|
|
157
157
|
|
|
158
|
+
## Broadcast compatibility and security
|
|
159
|
+
|
|
160
|
+
DataWedge can return query results without `COMMAND_IDENTIFIER`. The plugin accepts such a result only when its payload type matches exactly one pending query that expects that payload shape. Avoid overlapping pending calls that share the same result payload shape: replies without identifiers cannot reliably distinguish their owners. For example, `getAssociatedApps()` and `getConfig()` both send `CMD_GET_CONFIG` and expect `CONFIG_RESULTS`, so one pending call to each still overlaps. If a query times out, a delayed identifier-free reply to the timed-out query can still match a later sequential call that expects the same payload shape and resolve it with stale data. Replies with unknown nonempty identifiers are not assigned to another query.
|
|
161
|
+
|
|
162
|
+
On Android 14/API 34 and later, identifier-free replies that share platform sender identity must identify the DataWedge package. A sender can withhold its identity on API 34 and later, and the plugin then accepts matching identifier-free results. Identity is also unavailable on Android API 24 to 33, where the plugin accepts matching identifier-free results for compatibility with DataWedge.
|
|
163
|
+
|
|
164
|
+
Query correlation and payload validation do not guarantee sender authenticity. Any installed app can inject a matching identifier-free query result on every Android version, including by withholding its identity on API 34 and later. Replies with matching command identifiers, scan data and notification broadcasts also lack complete sender authentication. See the [known sender-authentication limitations](https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25) for details.
|
|
165
|
+
|
|
158
166
|
## API
|
|
159
167
|
|
|
160
168
|
<docgen-index>
|
|
@@ -365,6 +373,15 @@ Dispose of local listeners separately when using the low-level API.
|
|
|
365
373
|
enumerateScanners() => Promise<{ scanners: ZebraDeviceScanner[]; }>
|
|
366
374
|
```
|
|
367
375
|
|
|
376
|
+
Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts
|
|
377
|
+
identifier-free replies only when the payload matches exactly one pending call that expects the
|
|
378
|
+
same result payload shape. Avoid overlapping pending calls that share that shape. When sender
|
|
379
|
+
identity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),
|
|
380
|
+
matching identifier-free replies are accepted for compatibility. If a call times out, a delayed
|
|
381
|
+
identifier-free reply can still match a later sequential call that expects the same shape and
|
|
382
|
+
resolve it with stale data. This default may change in the next Capacitor major version; see
|
|
383
|
+
https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.
|
|
384
|
+
|
|
368
385
|
**Returns:** <code>Promise<{ scanners: ZebraDeviceScanner[]; }></code>
|
|
369
386
|
|
|
370
387
|
---
|
|
@@ -375,6 +392,15 @@ enumerateScanners() => Promise<{ scanners: ZebraDeviceScanner[]; }>
|
|
|
375
392
|
getActiveProfile() => Promise<{ profileName: string; }>
|
|
376
393
|
```
|
|
377
394
|
|
|
395
|
+
Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts
|
|
396
|
+
identifier-free replies only when the payload matches exactly one pending call that expects the
|
|
397
|
+
same result payload shape. Avoid overlapping pending calls that share that shape. When sender
|
|
398
|
+
identity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),
|
|
399
|
+
matching identifier-free replies are accepted for compatibility. If a call times out, a delayed
|
|
400
|
+
identifier-free reply can still match a later sequential call that expects the same shape and
|
|
401
|
+
resolve it with stale data. This default may change in the next Capacitor major version; see
|
|
402
|
+
https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.
|
|
403
|
+
|
|
378
404
|
**Returns:** <code>Promise<{ profileName: string; }></code>
|
|
379
405
|
|
|
380
406
|
---
|
|
@@ -385,6 +411,17 @@ getActiveProfile() => Promise<{ profileName: string; }>
|
|
|
385
411
|
getAssociatedApps(options: { profileName: string; }) => Promise<{ appList: DataWedgeAppConfig[]; }>
|
|
386
412
|
```
|
|
387
413
|
|
|
414
|
+
Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts
|
|
415
|
+
identifier-free replies only when the payload matches exactly one pending call that expects the
|
|
416
|
+
same result payload shape. Avoid overlapping pending calls that share that shape. For example,
|
|
417
|
+
`getAssociatedApps()` and `getConfig()` both send `CMD_GET_CONFIG` and expect `CONFIG_RESULTS`, so one
|
|
418
|
+
pending call to each overlaps. When sender identity is unavailable (Android API 24 to 33, or API
|
|
419
|
+
34+ when the platform withholds it), matching identifier-free replies are accepted for
|
|
420
|
+
compatibility. If a call times out, a delayed identifier-free reply can still match a later
|
|
421
|
+
sequential call that expects the same shape and resolve it with stale data. This default may
|
|
422
|
+
change in the next Capacitor major version; see
|
|
423
|
+
https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.
|
|
424
|
+
|
|
388
425
|
| Param | Type |
|
|
389
426
|
| ------------- | ------------------------------------- |
|
|
390
427
|
| **`options`** | <code>{ profileName: string; }</code> |
|
|
@@ -399,6 +436,17 @@ getAssociatedApps(options: { profileName: string; }) => Promise<{ appList: DataW
|
|
|
399
436
|
getConfig(options: GetConfigOptions) => Promise<ZebraProfileConfiguration>
|
|
400
437
|
```
|
|
401
438
|
|
|
439
|
+
Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts
|
|
440
|
+
identifier-free replies only when the payload matches exactly one pending call that expects the
|
|
441
|
+
same result payload shape. Avoid overlapping pending calls that share that shape. For example,
|
|
442
|
+
`getAssociatedApps()` and `getConfig()` both send `CMD_GET_CONFIG` and expect `CONFIG_RESULTS`, so one
|
|
443
|
+
pending call to each overlaps. When sender identity is unavailable (Android API 24 to 33, or API
|
|
444
|
+
34+ when the platform withholds it), matching identifier-free replies are accepted for
|
|
445
|
+
compatibility. If a call times out, a delayed identifier-free reply can still match a later
|
|
446
|
+
sequential call that expects the same shape and resolve it with stale data. This default may
|
|
447
|
+
change in the next Capacitor major version; see
|
|
448
|
+
https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.
|
|
449
|
+
|
|
402
450
|
| Param | Type |
|
|
403
451
|
| ------------- | ------------------------------------------------------------- |
|
|
404
452
|
| **`options`** | <code><a href="#getconfigoptions">GetConfigOptions</a></code> |
|
|
@@ -413,6 +461,15 @@ getConfig(options: GetConfigOptions) => Promise<ZebraProfileConfiguration>
|
|
|
413
461
|
getDatawedgeStatus() => Promise<DataWedgeStatusResult>
|
|
414
462
|
```
|
|
415
463
|
|
|
464
|
+
Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts
|
|
465
|
+
identifier-free replies only when the payload matches exactly one pending call that expects the
|
|
466
|
+
same result payload shape. Avoid overlapping pending calls that share that shape. When sender
|
|
467
|
+
identity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),
|
|
468
|
+
matching identifier-free replies are accepted for compatibility. If a call times out, a delayed
|
|
469
|
+
identifier-free reply can still match a later sequential call that expects the same shape and
|
|
470
|
+
resolve it with stale data. This default may change in the next Capacitor major version; see
|
|
471
|
+
https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.
|
|
472
|
+
|
|
416
473
|
**Returns:** <code>Promise<<a href="#datawedgestatusresult">DataWedgeStatusResult</a>></code>
|
|
417
474
|
|
|
418
475
|
---
|
|
@@ -423,6 +480,15 @@ getDatawedgeStatus() => Promise<DataWedgeStatusResult>
|
|
|
423
480
|
getDisabledAppList() => Promise<{ appList: DataWedgeAppConfig[]; }>
|
|
424
481
|
```
|
|
425
482
|
|
|
483
|
+
Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts
|
|
484
|
+
identifier-free replies only when the payload matches exactly one pending call that expects the
|
|
485
|
+
same result payload shape. Avoid overlapping pending calls that share that shape. When sender
|
|
486
|
+
identity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),
|
|
487
|
+
matching identifier-free replies are accepted for compatibility. If a call times out, a delayed
|
|
488
|
+
identifier-free reply can still match a later sequential call that expects the same shape and
|
|
489
|
+
resolve it with stale data. This default may change in the next Capacitor major version; see
|
|
490
|
+
https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.
|
|
491
|
+
|
|
426
492
|
**Returns:** <code>Promise<{ appList: DataWedgeAppConfig[]; }></code>
|
|
427
493
|
|
|
428
494
|
---
|
|
@@ -433,6 +499,15 @@ getDisabledAppList() => Promise<{ appList: DataWedgeAppConfig[]; }>
|
|
|
433
499
|
getIgnoreDisabledProfiles() => Promise<IgnoreDisabledProfilesResult>
|
|
434
500
|
```
|
|
435
501
|
|
|
502
|
+
Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts
|
|
503
|
+
identifier-free replies only when the payload matches exactly one pending call that expects the
|
|
504
|
+
same result payload shape. Avoid overlapping pending calls that share that shape. When sender
|
|
505
|
+
identity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),
|
|
506
|
+
matching identifier-free replies are accepted for compatibility. If a call times out, a delayed
|
|
507
|
+
identifier-free reply can still match a later sequential call that expects the same shape and
|
|
508
|
+
resolve it with stale data. This default may change in the next Capacitor major version; see
|
|
509
|
+
https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.
|
|
510
|
+
|
|
436
511
|
**Returns:** <code>Promise<<a href="#ignoredisabledprofilesresult">IgnoreDisabledProfilesResult</a>></code>
|
|
437
512
|
|
|
438
513
|
---
|
|
@@ -443,6 +518,15 @@ getIgnoreDisabledProfiles() => Promise<IgnoreDisabledProfilesResult>
|
|
|
443
518
|
getProfilesList() => Promise<{ profiles: string[]; }>
|
|
444
519
|
```
|
|
445
520
|
|
|
521
|
+
Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts
|
|
522
|
+
identifier-free replies only when the payload matches exactly one pending call that expects the
|
|
523
|
+
same result payload shape. Avoid overlapping pending calls that share that shape. When sender
|
|
524
|
+
identity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),
|
|
525
|
+
matching identifier-free replies are accepted for compatibility. If a call times out, a delayed
|
|
526
|
+
identifier-free reply can still match a later sequential call that expects the same shape and
|
|
527
|
+
resolve it with stale data. This default may change in the next Capacitor major version; see
|
|
528
|
+
https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.
|
|
529
|
+
|
|
446
530
|
**Returns:** <code>Promise<{ profiles: string[]; }></code>
|
|
447
531
|
|
|
448
532
|
---
|
|
@@ -453,6 +537,15 @@ getProfilesList() => Promise<{ profiles: string[]; }>
|
|
|
453
537
|
getScannerStatus() => Promise<{ status: ScannerStatus | string; }>
|
|
454
538
|
```
|
|
455
539
|
|
|
540
|
+
Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts
|
|
541
|
+
identifier-free replies only when the payload matches exactly one pending call that expects the
|
|
542
|
+
same result payload shape. Avoid overlapping pending calls that share that shape. When sender
|
|
543
|
+
identity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),
|
|
544
|
+
matching identifier-free replies are accepted for compatibility. If a call times out, a delayed
|
|
545
|
+
identifier-free reply can still match a later sequential call that expects the same shape and
|
|
546
|
+
resolve it with stale data. This default may change in the next Capacitor major version; see
|
|
547
|
+
https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.
|
|
548
|
+
|
|
456
549
|
**Returns:** <code>Promise<{ status: string; }></code>
|
|
457
550
|
|
|
458
551
|
---
|
|
@@ -463,6 +556,15 @@ getScannerStatus() => Promise<{ status: ScannerStatus | string; }>
|
|
|
463
556
|
getVersionInfo() => Promise<ZebraDeviceVersionInfo>
|
|
464
557
|
```
|
|
465
558
|
|
|
559
|
+
Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts
|
|
560
|
+
identifier-free replies only when the payload matches exactly one pending call that expects the
|
|
561
|
+
same result payload shape. Avoid overlapping pending calls that share that shape. When sender
|
|
562
|
+
identity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),
|
|
563
|
+
matching identifier-free replies are accepted for compatibility. If a call times out, a delayed
|
|
564
|
+
identifier-free reply can still match a later sequential call that expects the same shape and
|
|
565
|
+
resolve it with stale data. This default may change in the next Capacitor major version; see
|
|
566
|
+
https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.
|
|
567
|
+
|
|
466
568
|
**Returns:** <code>Promise<<a href="#zebradeviceversioninfo">ZebraDeviceVersionInfo</a>></code>
|
|
467
569
|
|
|
468
570
|
---
|
|
@@ -505,6 +607,15 @@ enableScannerInput() => Promise<void>
|
|
|
505
607
|
enumerateTriggers() => Promise<{ triggers: string[]; }>
|
|
506
608
|
```
|
|
507
609
|
|
|
610
|
+
Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts
|
|
611
|
+
identifier-free replies only when the payload matches exactly one pending call that expects the
|
|
612
|
+
same result payload shape. Avoid overlapping pending calls that share that shape. When sender
|
|
613
|
+
identity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),
|
|
614
|
+
matching identifier-free replies are accepted for compatibility. If a call times out, a delayed
|
|
615
|
+
identifier-free reply can still match a later sequential call that expects the same shape and
|
|
616
|
+
resolve it with stale data. This default may change in the next Capacitor major version; see
|
|
617
|
+
https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.
|
|
618
|
+
|
|
508
619
|
**Returns:** <code>Promise<{ triggers: string[]; }></code>
|
|
509
620
|
|
|
510
621
|
---
|
|
@@ -79,7 +79,7 @@ public final class ZebraDataWedge {
|
|
|
79
79
|
public static final String RESULT_GET_DATAWEDGE_STATUS = "com.symbol.datawedge.api.RESULT_GET_DATAWEDGE_STATUS";
|
|
80
80
|
public static final String RESULT_GET_DISABLED_APP_LIST = "com.symbol.datawedge.api.RESULT_GET_DISABLED_APP_LIST";
|
|
81
81
|
public static final String RESULT_GET_IGNORE_DISABLED_PROFILES = "com.symbol.datawedge.api.RESULT_GET_IGNORE_DISABLED_PROFILES";
|
|
82
|
-
public static final String RESULT_GET_SCANNER_STATUS = "com.symbol.datawedge.api.
|
|
82
|
+
public static final String RESULT_GET_SCANNER_STATUS = "com.symbol.datawedge.api.RESULT_SCANNER_STATUS";
|
|
83
83
|
public static final String RESULT_ENUMERATE_SCANNERS = "com.symbol.datawedge.api.RESULT_ENUMERATE_SCANNERS";
|
|
84
84
|
public static final String RESULT_ENUMERATED_SCANNER_LIST = "DWAPI_KEY_ENUMERATEDSCANNERLIST";
|
|
85
85
|
public static final String RESULT_ENUMERATE_TRIGGERS = "com.symbol.datawedge.api.RESULT_ENUMERATE_TRIGGERS";
|
|
@@ -4,9 +4,11 @@ import android.content.BroadcastReceiver;
|
|
|
4
4
|
import android.content.Context;
|
|
5
5
|
import android.content.Intent;
|
|
6
6
|
import android.content.IntentFilter;
|
|
7
|
+
import android.os.Build;
|
|
7
8
|
import android.os.Bundle;
|
|
8
9
|
import android.os.Handler;
|
|
9
10
|
import android.os.Looper;
|
|
11
|
+
import android.os.Process;
|
|
10
12
|
import androidx.core.content.ContextCompat;
|
|
11
13
|
import com.getcapacitor.JSArray;
|
|
12
14
|
import com.getcapacitor.JSObject;
|
|
@@ -15,6 +17,7 @@ import com.getcapacitor.PluginCall;
|
|
|
15
17
|
import com.getcapacitor.PluginMethod;
|
|
16
18
|
import com.getcapacitor.annotation.CapacitorPlugin;
|
|
17
19
|
import java.util.ArrayList;
|
|
20
|
+
import java.util.Arrays;
|
|
18
21
|
import java.util.Collections;
|
|
19
22
|
import java.util.LinkedHashSet;
|
|
20
23
|
import java.util.List;
|
|
@@ -32,6 +35,28 @@ public class ZebraDataWedgePlugin extends Plugin {
|
|
|
32
35
|
private static final long REQUEST_TIMEOUT_MS = 8000L;
|
|
33
36
|
private static final long SCAN_TIMEOUT_MS = 15000L;
|
|
34
37
|
|
|
38
|
+
// Correlation and parsing share the same keys, including documented alternatives and existing fallbacks.
|
|
39
|
+
private static final String[] ACTIVE_PROFILE_RESULTS = { ZebraDataWedge.RESULT_GET_ACTIVE_PROFILE, "PROFILE_NAME" };
|
|
40
|
+
private static final String[] CONFIG_RESULTS = {
|
|
41
|
+
ZebraDataWedge.RESULT_GET_CONFIG,
|
|
42
|
+
"com.symbol.datawedge.api.GET_CONFIG_RESULT",
|
|
43
|
+
ZebraDataWedge.RESULT_GET_CONFIG_LEGACY
|
|
44
|
+
};
|
|
45
|
+
private static final String[] DATAWEDGE_STATUS_RESULTS = { ZebraDataWedge.RESULT_GET_DATAWEDGE_STATUS, "DATAWEDGE_STATUS" };
|
|
46
|
+
private static final String[] PROFILES_LIST_RESULTS = { ZebraDataWedge.RESULT_GET_PROFILES_LIST };
|
|
47
|
+
private static final String[] SCANNER_STATUS_RESULTS = { ZebraDataWedge.RESULT_GET_SCANNER_STATUS, "SCANNER_STATUS" };
|
|
48
|
+
private static final String[] VERSION_INFO_RESULTS = { ZebraDataWedge.RESULT_GET_VERSION_INFO, "GET_VERSION_INFO_RESULT" };
|
|
49
|
+
private static final String[] DISABLED_APPS_RESULTS = { ZebraDataWedge.RESULT_GET_DISABLED_APP_LIST };
|
|
50
|
+
private static final String[] IGNORE_DISABLED_RESULTS = {
|
|
51
|
+
ZebraDataWedge.RESULT_GET_IGNORE_DISABLED_PROFILES,
|
|
52
|
+
"IGNORE_DISABLED_PROFILES"
|
|
53
|
+
};
|
|
54
|
+
private static final String[] TRIGGER_RESULTS = { ZebraDataWedge.RESULT_ENUMERATE_TRIGGERS, "ENUMERATE_TRIGGERS" };
|
|
55
|
+
private static final String[] SCANNER_ENUMERATION_RESULTS = {
|
|
56
|
+
ZebraDataWedge.RESULT_ENUMERATE_SCANNERS,
|
|
57
|
+
ZebraDataWedge.RESULT_ENUMERATED_SCANNER_LIST
|
|
58
|
+
};
|
|
59
|
+
|
|
35
60
|
private final Handler handler = new Handler(Looper.getMainLooper());
|
|
36
61
|
private final Map<String, PendingRequest> pendingRequests = new ConcurrentHashMap<>();
|
|
37
62
|
private final Map<String, ScanRequest> pendingScans = new ConcurrentHashMap<>();
|
|
@@ -530,7 +555,13 @@ public class ZebraDataWedgePlugin extends Plugin {
|
|
|
530
555
|
receiver = new BroadcastReceiver() {
|
|
531
556
|
@Override
|
|
532
557
|
public void onReceive(Context context, Intent intent) {
|
|
533
|
-
|
|
558
|
+
int sentFromUid = Process.INVALID_UID;
|
|
559
|
+
String sentFromPackage = null;
|
|
560
|
+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
|
|
561
|
+
sentFromUid = getSentFromUid();
|
|
562
|
+
sentFromPackage = getSentFromPackage();
|
|
563
|
+
}
|
|
564
|
+
handleIntent(context, intent, sentFromUid, sentFromPackage);
|
|
534
565
|
}
|
|
535
566
|
};
|
|
536
567
|
}
|
|
@@ -615,20 +646,37 @@ public class ZebraDataWedgePlugin extends Plugin {
|
|
|
615
646
|
receiverRegistered = true;
|
|
616
647
|
}
|
|
617
648
|
|
|
618
|
-
|
|
649
|
+
void deliverResultIntentForTest(Context context, Intent intent, int sentFromUid, String sentFromPackage) {
|
|
650
|
+
handleIntent(context, intent, sentFromUid, sentFromPackage);
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
private void handleIntent(Context context, Intent intent, int sentFromUid, String sentFromPackage) {
|
|
619
654
|
String action = intent.getAction();
|
|
620
655
|
if (action == null) {
|
|
621
656
|
return;
|
|
622
657
|
}
|
|
623
658
|
if (ZebraDataWedge.RESULT_ACTION.equals(action)) {
|
|
624
659
|
String commandId = intent.getStringExtra(ZebraDataWedge.EXTRA_COMMAND_IDENTIFIER);
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
if (
|
|
628
|
-
handler.removeCallbacks(request.timeoutRunnable);
|
|
629
|
-
resolvePendingRequest(request, intent);
|
|
660
|
+
PendingRequest request = commandId == null ? null : pendingRequests.get(commandId);
|
|
661
|
+
if (request == null && commandId == null) {
|
|
662
|
+
if (!allowIdentifierFreeQueryCorrelation(context, sentFromUid, sentFromPackage)) {
|
|
630
663
|
return;
|
|
631
664
|
}
|
|
665
|
+
for (Map.Entry<String, PendingRequest> entry : pendingRequests.entrySet()) {
|
|
666
|
+
if (entry.getValue().hasQueryPayload(intent)) {
|
|
667
|
+
if (request != null) return; // Never guess between concurrent query owners.
|
|
668
|
+
commandId = entry.getKey();
|
|
669
|
+
request = entry.getValue();
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
if (request != null) {
|
|
674
|
+
boolean failure = ZebraDataWedge.RESULT_FAILURE.equalsIgnoreCase(intent.getStringExtra(ZebraDataWedge.EXTRA_RESULT));
|
|
675
|
+
if (!failure && request.resultExtras.length > 0 && !request.hasQueryPayload(intent)) return;
|
|
676
|
+
if (!pendingRequests.remove(commandId, request)) return;
|
|
677
|
+
handler.removeCallbacks(request.timeoutRunnable);
|
|
678
|
+
resolvePendingRequest(request, intent);
|
|
679
|
+
return;
|
|
632
680
|
}
|
|
633
681
|
}
|
|
634
682
|
|
|
@@ -643,6 +691,46 @@ public class ZebraDataWedgePlugin extends Plugin {
|
|
|
643
691
|
}
|
|
644
692
|
}
|
|
645
693
|
|
|
694
|
+
/**
|
|
695
|
+
* Identifier-free typed query replies use payload correlation, not sender authentication.
|
|
696
|
+
* When the platform exposes sender identity (API 34+), require the DataWedge package.
|
|
697
|
+
* When identity is unavailable (API 24-33, or API 34+ without shared identity), keep
|
|
698
|
+
* documented identifier-free compatibility and rely on ambiguity guards below. Residual
|
|
699
|
+
* spoofing risk for that mode is tracked in https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25
|
|
700
|
+
*/
|
|
701
|
+
private boolean allowIdentifierFreeQueryCorrelation(Context context, int sentFromUid, String sentFromPackage) {
|
|
702
|
+
if (isTrustedDataWedgeSender(context, sentFromUid, sentFromPackage)) {
|
|
703
|
+
return true;
|
|
704
|
+
}
|
|
705
|
+
return isSenderIdentityUnavailable(sentFromUid, sentFromPackage);
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
private boolean isSenderIdentityUnavailable(int sentFromUid, String sentFromPackage) {
|
|
709
|
+
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
|
|
710
|
+
return true;
|
|
711
|
+
}
|
|
712
|
+
return (sentFromUid == Process.INVALID_UID || sentFromUid == -1) && sentFromPackage == null;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
private boolean isTrustedDataWedgeSender(Context context, int sentFromUid, String sentFromPackage) {
|
|
716
|
+
if (ZebraDataWedge.DATAWEDGE_PACKAGE.equals(sentFromPackage)) {
|
|
717
|
+
return true;
|
|
718
|
+
}
|
|
719
|
+
if (sentFromUid == Process.INVALID_UID || sentFromUid == -1) {
|
|
720
|
+
return false;
|
|
721
|
+
}
|
|
722
|
+
String[] packages = context.getPackageManager().getPackagesForUid(sentFromUid);
|
|
723
|
+
if (packages == null) {
|
|
724
|
+
return false;
|
|
725
|
+
}
|
|
726
|
+
for (String packageName : packages) {
|
|
727
|
+
if (ZebraDataWedge.DATAWEDGE_PACKAGE.equals(packageName)) {
|
|
728
|
+
return true;
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
return false;
|
|
732
|
+
}
|
|
733
|
+
|
|
646
734
|
private void sendCommand(PluginCall call, Intent intent, String prefix, ResponseParser parser) {
|
|
647
735
|
String commandId = ZebraDataWedge.newCommandIdentifier(prefix);
|
|
648
736
|
intent.putExtra(ZebraDataWedge.EXTRA_SEND_RESULT, ZebraDataWedge.VALUE_LAST_RESULT);
|
|
@@ -650,12 +738,32 @@ public class ZebraDataWedgePlugin extends Plugin {
|
|
|
650
738
|
Runnable timeout = () -> {
|
|
651
739
|
PendingRequest removed = pendingRequests.remove(commandId);
|
|
652
740
|
if (removed != null) {
|
|
653
|
-
removed.call.reject("Timed out waiting for DataWedge response.");
|
|
741
|
+
removed.call.reject("Timed out waiting for DataWedge response.", "DATAWEDGE_TIMEOUT");
|
|
654
742
|
}
|
|
655
743
|
};
|
|
656
|
-
pendingRequests.put(commandId, new PendingRequest(call, parser, timeout));
|
|
744
|
+
pendingRequests.put(commandId, new PendingRequest(call, parser, timeout, queryResultExtras(intent)));
|
|
657
745
|
handler.postDelayed(timeout, REQUEST_TIMEOUT_MS);
|
|
658
|
-
|
|
746
|
+
try {
|
|
747
|
+
getContext().sendBroadcast(intent);
|
|
748
|
+
} catch (Exception exception) {
|
|
749
|
+
pendingRequests.remove(commandId);
|
|
750
|
+
handler.removeCallbacks(timeout);
|
|
751
|
+
call.reject("Failed to communicate with Zebra DataWedge.", "DATAWEDGE_TRANSPORT", exception);
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
private String[] queryResultExtras(Intent intent) {
|
|
756
|
+
if (intent.hasExtra(ZebraDataWedge.CMD_GET_ACTIVE_PROFILE)) return ACTIVE_PROFILE_RESULTS;
|
|
757
|
+
if (intent.hasExtra(ZebraDataWedge.CMD_GET_CONFIG)) return CONFIG_RESULTS;
|
|
758
|
+
if (intent.hasExtra(ZebraDataWedge.CMD_GET_DATAWEDGE_STATUS)) return DATAWEDGE_STATUS_RESULTS;
|
|
759
|
+
if (intent.hasExtra(ZebraDataWedge.CMD_GET_PROFILES_LIST)) return PROFILES_LIST_RESULTS;
|
|
760
|
+
if (intent.hasExtra(ZebraDataWedge.CMD_GET_SCANNER_STATUS)) return SCANNER_STATUS_RESULTS;
|
|
761
|
+
if (intent.hasExtra(ZebraDataWedge.CMD_GET_VERSION_INFO)) return VERSION_INFO_RESULTS;
|
|
762
|
+
if (intent.hasExtra(ZebraDataWedge.CMD_GET_DISABLED_APP_LIST)) return DISABLED_APPS_RESULTS;
|
|
763
|
+
if (intent.hasExtra(ZebraDataWedge.CMD_GET_IGNORE_DISABLED_PROFILES)) return IGNORE_DISABLED_RESULTS;
|
|
764
|
+
if (intent.hasExtra(ZebraDataWedge.CMD_ENUMERATE_TRIGGERS)) return TRIGGER_RESULTS;
|
|
765
|
+
if (intent.hasExtra(ZebraDataWedge.CMD_ENUMERATE_SCANNERS)) return SCANNER_ENUMERATION_RESULTS;
|
|
766
|
+
return new String[0];
|
|
659
767
|
}
|
|
660
768
|
|
|
661
769
|
private void dispatchNotification(Intent intent, PluginCall call) {
|
|
@@ -736,7 +844,7 @@ public class ZebraDataWedgePlugin extends Plugin {
|
|
|
736
844
|
}
|
|
737
845
|
|
|
738
846
|
private JSObject parseProfilesList(Intent intent) {
|
|
739
|
-
String[] profiles = firstStringArray(intent,
|
|
847
|
+
String[] profiles = firstStringArray(intent, PROFILES_LIST_RESULTS);
|
|
740
848
|
JSObject ret = new JSObject();
|
|
741
849
|
ret.put("profiles", ZebraDataWedge.stringArrayToJSArray(profiles));
|
|
742
850
|
return ret;
|
|
@@ -744,19 +852,19 @@ public class ZebraDataWedgePlugin extends Plugin {
|
|
|
744
852
|
|
|
745
853
|
private JSObject parseActiveProfile(Intent intent) {
|
|
746
854
|
JSObject ret = new JSObject();
|
|
747
|
-
ret.put("profileName", firstString(intent,
|
|
855
|
+
ret.put("profileName", firstString(intent, ACTIVE_PROFILE_RESULTS));
|
|
748
856
|
return ret;
|
|
749
857
|
}
|
|
750
858
|
|
|
751
859
|
private JSObject parseDataWedgeStatus(Intent intent) {
|
|
752
|
-
String rawStatus = firstString(intent,
|
|
860
|
+
String rawStatus = firstString(intent, DATAWEDGE_STATUS_RESULTS);
|
|
753
861
|
JSObject ret = new JSObject();
|
|
754
862
|
ret.put("isEnabled", rawStatus != null && ("enabled".equalsIgnoreCase(rawStatus) || Boolean.parseBoolean(rawStatus)));
|
|
755
863
|
return ret;
|
|
756
864
|
}
|
|
757
865
|
|
|
758
866
|
private JSObject parseIgnoreDisabledProfiles(Intent intent) {
|
|
759
|
-
String rawValue = firstString(intent,
|
|
867
|
+
String rawValue = firstString(intent, IGNORE_DISABLED_RESULTS);
|
|
760
868
|
JSObject ret = new JSObject();
|
|
761
869
|
ret.put("enabled", rawValue != null && ("true".equalsIgnoreCase(rawValue) || "enabled".equalsIgnoreCase(rawValue)));
|
|
762
870
|
return ret;
|
|
@@ -764,12 +872,12 @@ public class ZebraDataWedgePlugin extends Plugin {
|
|
|
764
872
|
|
|
765
873
|
private JSObject parseScannerStatus(Intent intent) {
|
|
766
874
|
JSObject ret = new JSObject();
|
|
767
|
-
ret.put("status", firstString(intent,
|
|
875
|
+
ret.put("status", firstString(intent, SCANNER_STATUS_RESULTS));
|
|
768
876
|
return ret;
|
|
769
877
|
}
|
|
770
878
|
|
|
771
879
|
private JSObject parseTriggers(Intent intent) {
|
|
772
|
-
String[] triggers = firstStringArray(intent,
|
|
880
|
+
String[] triggers = firstStringArray(intent, TRIGGER_RESULTS);
|
|
773
881
|
JSObject ret = new JSObject();
|
|
774
882
|
ret.put("triggers", ZebraDataWedge.stringArrayToJSArray(triggers));
|
|
775
883
|
return ret;
|
|
@@ -777,12 +885,12 @@ public class ZebraDataWedgePlugin extends Plugin {
|
|
|
777
885
|
|
|
778
886
|
private JSObject parseDisabledAppList(Intent intent) {
|
|
779
887
|
JSObject ret = new JSObject();
|
|
780
|
-
ret.put("appList", parseAppListResult(extractBundleList(intent,
|
|
888
|
+
ret.put("appList", parseAppListResult(extractBundleList(intent, DISABLED_APPS_RESULTS)));
|
|
781
889
|
return ret;
|
|
782
890
|
}
|
|
783
891
|
|
|
784
892
|
private JSObject parseVersionInfo(Intent intent) {
|
|
785
|
-
Bundle versionInfo = firstBundle(intent,
|
|
893
|
+
Bundle versionInfo = firstBundle(intent, VERSION_INFO_RESULTS);
|
|
786
894
|
JSObject ret = new JSObject();
|
|
787
895
|
if (versionInfo == null) {
|
|
788
896
|
return ret;
|
|
@@ -799,7 +907,7 @@ public class ZebraDataWedgePlugin extends Plugin {
|
|
|
799
907
|
}
|
|
800
908
|
|
|
801
909
|
private JSObject parseConfig(Intent intent) {
|
|
802
|
-
Bundle config = firstBundle(intent,
|
|
910
|
+
Bundle config = firstBundle(intent, CONFIG_RESULTS);
|
|
803
911
|
JSObject ret = new JSObject();
|
|
804
912
|
if (config == null) {
|
|
805
913
|
return ret;
|
|
@@ -1051,12 +1159,42 @@ public class ZebraDataWedgePlugin extends Plugin {
|
|
|
1051
1159
|
final PluginCall call;
|
|
1052
1160
|
final ResponseParser parser;
|
|
1053
1161
|
final Runnable timeoutRunnable;
|
|
1162
|
+
final String[] resultExtras;
|
|
1054
1163
|
|
|
1055
|
-
PendingRequest(PluginCall call, ResponseParser parser, Runnable timeoutRunnable) {
|
|
1164
|
+
PendingRequest(PluginCall call, ResponseParser parser, Runnable timeoutRunnable, String[] resultExtras) {
|
|
1056
1165
|
this.call = call;
|
|
1057
1166
|
this.parser = parser;
|
|
1167
|
+
this.resultExtras = resultExtras;
|
|
1058
1168
|
this.timeoutRunnable = timeoutRunnable;
|
|
1059
1169
|
}
|
|
1170
|
+
|
|
1171
|
+
boolean hasQueryPayload(Intent intent) {
|
|
1172
|
+
Bundle extras = intent.getExtras();
|
|
1173
|
+
if (extras == null) return false;
|
|
1174
|
+
for (String key : resultExtras) {
|
|
1175
|
+
Object value = extras.get(key);
|
|
1176
|
+
if (hasExpectedPayloadType(key, value)) return true;
|
|
1177
|
+
}
|
|
1178
|
+
return false;
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
/** Validate the outer wire type; empty containers remain valid query results. */
|
|
1182
|
+
private boolean hasExpectedPayloadType(String key, Object value) {
|
|
1183
|
+
if (Arrays.equals(resultExtras, VERSION_INFO_RESULTS) || Arrays.equals(resultExtras, CONFIG_RESULTS)) {
|
|
1184
|
+
return value instanceof Bundle;
|
|
1185
|
+
}
|
|
1186
|
+
if (
|
|
1187
|
+
Arrays.equals(resultExtras, PROFILES_LIST_RESULTS) ||
|
|
1188
|
+
Arrays.equals(resultExtras, TRIGGER_RESULTS) ||
|
|
1189
|
+
ZebraDataWedge.RESULT_ENUMERATED_SCANNER_LIST.equals(key)
|
|
1190
|
+
) {
|
|
1191
|
+
return value instanceof String[];
|
|
1192
|
+
}
|
|
1193
|
+
if (Arrays.equals(resultExtras, DISABLED_APPS_RESULTS) || Arrays.equals(resultExtras, SCANNER_ENUMERATION_RESULTS)) {
|
|
1194
|
+
return value instanceof ArrayList<?> || value instanceof android.os.Parcelable[];
|
|
1195
|
+
}
|
|
1196
|
+
return value instanceof String;
|
|
1197
|
+
}
|
|
1060
1198
|
}
|
|
1061
1199
|
|
|
1062
1200
|
private static class ScanRequest {
|
package/dist/docs.json
CHANGED
|
@@ -221,7 +221,7 @@
|
|
|
221
221
|
"parameters": [],
|
|
222
222
|
"returns": "Promise<{ scanners: ZebraDeviceScanner[]; }>",
|
|
223
223
|
"tags": [],
|
|
224
|
-
"docs": "",
|
|
224
|
+
"docs": "Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts\nidentifier-free replies only when the payload matches exactly one pending call that expects the\nsame result payload shape. Avoid overlapping pending calls that share that shape. When sender\nidentity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),\nmatching identifier-free replies are accepted for compatibility. If a call times out, a delayed\nidentifier-free reply can still match a later sequential call that expects the same shape and\nresolve it with stale data. This default may change in the next Capacitor major version; see\nhttps://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.",
|
|
225
225
|
"complexTypes": [
|
|
226
226
|
"ZebraDeviceScanner"
|
|
227
227
|
],
|
|
@@ -233,7 +233,7 @@
|
|
|
233
233
|
"parameters": [],
|
|
234
234
|
"returns": "Promise<{ profileName: string; }>",
|
|
235
235
|
"tags": [],
|
|
236
|
-
"docs": "",
|
|
236
|
+
"docs": "Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts\nidentifier-free replies only when the payload matches exactly one pending call that expects the\nsame result payload shape. Avoid overlapping pending calls that share that shape. When sender\nidentity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),\nmatching identifier-free replies are accepted for compatibility. If a call times out, a delayed\nidentifier-free reply can still match a later sequential call that expects the same shape and\nresolve it with stale data. This default may change in the next Capacitor major version; see\nhttps://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.",
|
|
237
237
|
"complexTypes": [],
|
|
238
238
|
"slug": "getactiveprofile"
|
|
239
239
|
},
|
|
@@ -249,7 +249,7 @@
|
|
|
249
249
|
],
|
|
250
250
|
"returns": "Promise<{ appList: DataWedgeAppConfig[]; }>",
|
|
251
251
|
"tags": [],
|
|
252
|
-
"docs": "",
|
|
252
|
+
"docs": "Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts\nidentifier-free replies only when the payload matches exactly one pending call that expects the\nsame result payload shape. Avoid overlapping pending calls that share that shape. For example,\n`getAssociatedApps()` and `getConfig()` both send `CMD_GET_CONFIG` and expect `CONFIG_RESULTS`, so one\npending call to each overlaps. When sender identity is unavailable (Android API 24 to 33, or API\n34+ when the platform withholds it), matching identifier-free replies are accepted for\ncompatibility. If a call times out, a delayed identifier-free reply can still match a later\nsequential call that expects the same shape and resolve it with stale data. This default may\nchange in the next Capacitor major version; see\nhttps://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.",
|
|
253
253
|
"complexTypes": [
|
|
254
254
|
"DataWedgeAppConfig"
|
|
255
255
|
],
|
|
@@ -267,7 +267,7 @@
|
|
|
267
267
|
],
|
|
268
268
|
"returns": "Promise<ZebraProfileConfiguration>",
|
|
269
269
|
"tags": [],
|
|
270
|
-
"docs": "",
|
|
270
|
+
"docs": "Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts\nidentifier-free replies only when the payload matches exactly one pending call that expects the\nsame result payload shape. Avoid overlapping pending calls that share that shape. For example,\n`getAssociatedApps()` and `getConfig()` both send `CMD_GET_CONFIG` and expect `CONFIG_RESULTS`, so one\npending call to each overlaps. When sender identity is unavailable (Android API 24 to 33, or API\n34+ when the platform withholds it), matching identifier-free replies are accepted for\ncompatibility. If a call times out, a delayed identifier-free reply can still match a later\nsequential call that expects the same shape and resolve it with stale data. This default may\nchange in the next Capacitor major version; see\nhttps://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.",
|
|
271
271
|
"complexTypes": [
|
|
272
272
|
"ZebraProfileConfiguration",
|
|
273
273
|
"GetConfigOptions"
|
|
@@ -280,7 +280,7 @@
|
|
|
280
280
|
"parameters": [],
|
|
281
281
|
"returns": "Promise<DataWedgeStatusResult>",
|
|
282
282
|
"tags": [],
|
|
283
|
-
"docs": "",
|
|
283
|
+
"docs": "Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts\nidentifier-free replies only when the payload matches exactly one pending call that expects the\nsame result payload shape. Avoid overlapping pending calls that share that shape. When sender\nidentity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),\nmatching identifier-free replies are accepted for compatibility. If a call times out, a delayed\nidentifier-free reply can still match a later sequential call that expects the same shape and\nresolve it with stale data. This default may change in the next Capacitor major version; see\nhttps://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.",
|
|
284
284
|
"complexTypes": [
|
|
285
285
|
"DataWedgeStatusResult"
|
|
286
286
|
],
|
|
@@ -292,7 +292,7 @@
|
|
|
292
292
|
"parameters": [],
|
|
293
293
|
"returns": "Promise<{ appList: DataWedgeAppConfig[]; }>",
|
|
294
294
|
"tags": [],
|
|
295
|
-
"docs": "",
|
|
295
|
+
"docs": "Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts\nidentifier-free replies only when the payload matches exactly one pending call that expects the\nsame result payload shape. Avoid overlapping pending calls that share that shape. When sender\nidentity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),\nmatching identifier-free replies are accepted for compatibility. If a call times out, a delayed\nidentifier-free reply can still match a later sequential call that expects the same shape and\nresolve it with stale data. This default may change in the next Capacitor major version; see\nhttps://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.",
|
|
296
296
|
"complexTypes": [
|
|
297
297
|
"DataWedgeAppConfig"
|
|
298
298
|
],
|
|
@@ -304,7 +304,7 @@
|
|
|
304
304
|
"parameters": [],
|
|
305
305
|
"returns": "Promise<IgnoreDisabledProfilesResult>",
|
|
306
306
|
"tags": [],
|
|
307
|
-
"docs": "",
|
|
307
|
+
"docs": "Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts\nidentifier-free replies only when the payload matches exactly one pending call that expects the\nsame result payload shape. Avoid overlapping pending calls that share that shape. When sender\nidentity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),\nmatching identifier-free replies are accepted for compatibility. If a call times out, a delayed\nidentifier-free reply can still match a later sequential call that expects the same shape and\nresolve it with stale data. This default may change in the next Capacitor major version; see\nhttps://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.",
|
|
308
308
|
"complexTypes": [
|
|
309
309
|
"IgnoreDisabledProfilesResult"
|
|
310
310
|
],
|
|
@@ -316,7 +316,7 @@
|
|
|
316
316
|
"parameters": [],
|
|
317
317
|
"returns": "Promise<{ profiles: string[]; }>",
|
|
318
318
|
"tags": [],
|
|
319
|
-
"docs": "",
|
|
319
|
+
"docs": "Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts\nidentifier-free replies only when the payload matches exactly one pending call that expects the\nsame result payload shape. Avoid overlapping pending calls that share that shape. When sender\nidentity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),\nmatching identifier-free replies are accepted for compatibility. If a call times out, a delayed\nidentifier-free reply can still match a later sequential call that expects the same shape and\nresolve it with stale data. This default may change in the next Capacitor major version; see\nhttps://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.",
|
|
320
320
|
"complexTypes": [],
|
|
321
321
|
"slug": "getprofileslist"
|
|
322
322
|
},
|
|
@@ -326,7 +326,7 @@
|
|
|
326
326
|
"parameters": [],
|
|
327
327
|
"returns": "Promise<{ status: string; }>",
|
|
328
328
|
"tags": [],
|
|
329
|
-
"docs": "",
|
|
329
|
+
"docs": "Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts\nidentifier-free replies only when the payload matches exactly one pending call that expects the\nsame result payload shape. Avoid overlapping pending calls that share that shape. When sender\nidentity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),\nmatching identifier-free replies are accepted for compatibility. If a call times out, a delayed\nidentifier-free reply can still match a later sequential call that expects the same shape and\nresolve it with stale data. This default may change in the next Capacitor major version; see\nhttps://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.",
|
|
330
330
|
"complexTypes": [
|
|
331
331
|
"ScannerStatus"
|
|
332
332
|
],
|
|
@@ -338,7 +338,7 @@
|
|
|
338
338
|
"parameters": [],
|
|
339
339
|
"returns": "Promise<ZebraDeviceVersionInfo>",
|
|
340
340
|
"tags": [],
|
|
341
|
-
"docs": "",
|
|
341
|
+
"docs": "Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts\nidentifier-free replies only when the payload matches exactly one pending call that expects the\nsame result payload shape. Avoid overlapping pending calls that share that shape. When sender\nidentity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),\nmatching identifier-free replies are accepted for compatibility. If a call times out, a delayed\nidentifier-free reply can still match a later sequential call that expects the same shape and\nresolve it with stale data. This default may change in the next Capacitor major version; see\nhttps://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.",
|
|
342
342
|
"complexTypes": [
|
|
343
343
|
"ZebraDeviceVersionInfo"
|
|
344
344
|
],
|
|
@@ -390,7 +390,7 @@
|
|
|
390
390
|
"parameters": [],
|
|
391
391
|
"returns": "Promise<{ triggers: string[]; }>",
|
|
392
392
|
"tags": [],
|
|
393
|
-
"docs": "",
|
|
393
|
+
"docs": "Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts\nidentifier-free replies only when the payload matches exactly one pending call that expects the\nsame result payload shape. Avoid overlapping pending calls that share that shape. When sender\nidentity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),\nmatching identifier-free replies are accepted for compatibility. If a call times out, a delayed\nidentifier-free reply can still match a later sequential call that expects the same shape and\nresolve it with stale data. This default may change in the next Capacitor major version; see\nhttps://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.",
|
|
394
394
|
"complexTypes": [],
|
|
395
395
|
"slug": "enumeratetriggers"
|
|
396
396
|
},
|
|
@@ -235,34 +235,148 @@ export interface ZebraDataWedgePlugin extends Plugin {
|
|
|
235
235
|
* Dispose of local listeners separately when using the low-level API.
|
|
236
236
|
*/
|
|
237
237
|
unRegisterForNotification(options: Omit<RegisterForNotificationOptions, 'callback'>): Promise<void>;
|
|
238
|
+
/**
|
|
239
|
+
* Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts
|
|
240
|
+
* identifier-free replies only when the payload matches exactly one pending call that expects the
|
|
241
|
+
* same result payload shape. Avoid overlapping pending calls that share that shape. When sender
|
|
242
|
+
* identity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),
|
|
243
|
+
* matching identifier-free replies are accepted for compatibility. If a call times out, a delayed
|
|
244
|
+
* identifier-free reply can still match a later sequential call that expects the same shape and
|
|
245
|
+
* resolve it with stale data. This default may change in the next Capacitor major version; see
|
|
246
|
+
* https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.
|
|
247
|
+
*/
|
|
238
248
|
enumerateScanners(): Promise<{
|
|
239
249
|
scanners: ZebraDeviceScanner[];
|
|
240
250
|
}>;
|
|
251
|
+
/**
|
|
252
|
+
* Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts
|
|
253
|
+
* identifier-free replies only when the payload matches exactly one pending call that expects the
|
|
254
|
+
* same result payload shape. Avoid overlapping pending calls that share that shape. When sender
|
|
255
|
+
* identity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),
|
|
256
|
+
* matching identifier-free replies are accepted for compatibility. If a call times out, a delayed
|
|
257
|
+
* identifier-free reply can still match a later sequential call that expects the same shape and
|
|
258
|
+
* resolve it with stale data. This default may change in the next Capacitor major version; see
|
|
259
|
+
* https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.
|
|
260
|
+
*/
|
|
241
261
|
getActiveProfile(): Promise<{
|
|
242
262
|
profileName: string;
|
|
243
263
|
}>;
|
|
264
|
+
/**
|
|
265
|
+
* Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts
|
|
266
|
+
* identifier-free replies only when the payload matches exactly one pending call that expects the
|
|
267
|
+
* same result payload shape. Avoid overlapping pending calls that share that shape. For example,
|
|
268
|
+
* `getAssociatedApps()` and `getConfig()` both send `CMD_GET_CONFIG` and expect `CONFIG_RESULTS`, so one
|
|
269
|
+
* pending call to each overlaps. When sender identity is unavailable (Android API 24 to 33, or API
|
|
270
|
+
* 34+ when the platform withholds it), matching identifier-free replies are accepted for
|
|
271
|
+
* compatibility. If a call times out, a delayed identifier-free reply can still match a later
|
|
272
|
+
* sequential call that expects the same shape and resolve it with stale data. This default may
|
|
273
|
+
* change in the next Capacitor major version; see
|
|
274
|
+
* https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.
|
|
275
|
+
*/
|
|
244
276
|
getAssociatedApps(options: {
|
|
245
277
|
profileName: string;
|
|
246
278
|
}): Promise<{
|
|
247
279
|
appList: DataWedgeAppConfig[];
|
|
248
280
|
}>;
|
|
281
|
+
/**
|
|
282
|
+
* Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts
|
|
283
|
+
* identifier-free replies only when the payload matches exactly one pending call that expects the
|
|
284
|
+
* same result payload shape. Avoid overlapping pending calls that share that shape. For example,
|
|
285
|
+
* `getAssociatedApps()` and `getConfig()` both send `CMD_GET_CONFIG` and expect `CONFIG_RESULTS`, so one
|
|
286
|
+
* pending call to each overlaps. When sender identity is unavailable (Android API 24 to 33, or API
|
|
287
|
+
* 34+ when the platform withholds it), matching identifier-free replies are accepted for
|
|
288
|
+
* compatibility. If a call times out, a delayed identifier-free reply can still match a later
|
|
289
|
+
* sequential call that expects the same shape and resolve it with stale data. This default may
|
|
290
|
+
* change in the next Capacitor major version; see
|
|
291
|
+
* https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.
|
|
292
|
+
*/
|
|
249
293
|
getConfig(options: GetConfigOptions): Promise<ZebraProfileConfiguration>;
|
|
294
|
+
/**
|
|
295
|
+
* Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts
|
|
296
|
+
* identifier-free replies only when the payload matches exactly one pending call that expects the
|
|
297
|
+
* same result payload shape. Avoid overlapping pending calls that share that shape. When sender
|
|
298
|
+
* identity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),
|
|
299
|
+
* matching identifier-free replies are accepted for compatibility. If a call times out, a delayed
|
|
300
|
+
* identifier-free reply can still match a later sequential call that expects the same shape and
|
|
301
|
+
* resolve it with stale data. This default may change in the next Capacitor major version; see
|
|
302
|
+
* https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.
|
|
303
|
+
*/
|
|
250
304
|
getDatawedgeStatus(): Promise<DataWedgeStatusResult>;
|
|
305
|
+
/**
|
|
306
|
+
* Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts
|
|
307
|
+
* identifier-free replies only when the payload matches exactly one pending call that expects the
|
|
308
|
+
* same result payload shape. Avoid overlapping pending calls that share that shape. When sender
|
|
309
|
+
* identity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),
|
|
310
|
+
* matching identifier-free replies are accepted for compatibility. If a call times out, a delayed
|
|
311
|
+
* identifier-free reply can still match a later sequential call that expects the same shape and
|
|
312
|
+
* resolve it with stale data. This default may change in the next Capacitor major version; see
|
|
313
|
+
* https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.
|
|
314
|
+
*/
|
|
251
315
|
getDisabledAppList(): Promise<{
|
|
252
316
|
appList: DataWedgeAppConfig[];
|
|
253
317
|
}>;
|
|
318
|
+
/**
|
|
319
|
+
* Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts
|
|
320
|
+
* identifier-free replies only when the payload matches exactly one pending call that expects the
|
|
321
|
+
* same result payload shape. Avoid overlapping pending calls that share that shape. When sender
|
|
322
|
+
* identity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),
|
|
323
|
+
* matching identifier-free replies are accepted for compatibility. If a call times out, a delayed
|
|
324
|
+
* identifier-free reply can still match a later sequential call that expects the same shape and
|
|
325
|
+
* resolve it with stale data. This default may change in the next Capacitor major version; see
|
|
326
|
+
* https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.
|
|
327
|
+
*/
|
|
254
328
|
getIgnoreDisabledProfiles(): Promise<IgnoreDisabledProfilesResult>;
|
|
329
|
+
/**
|
|
330
|
+
* Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts
|
|
331
|
+
* identifier-free replies only when the payload matches exactly one pending call that expects the
|
|
332
|
+
* same result payload shape. Avoid overlapping pending calls that share that shape. When sender
|
|
333
|
+
* identity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),
|
|
334
|
+
* matching identifier-free replies are accepted for compatibility. If a call times out, a delayed
|
|
335
|
+
* identifier-free reply can still match a later sequential call that expects the same shape and
|
|
336
|
+
* resolve it with stale data. This default may change in the next Capacitor major version; see
|
|
337
|
+
* https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.
|
|
338
|
+
*/
|
|
255
339
|
getProfilesList(): Promise<{
|
|
256
340
|
profiles: string[];
|
|
257
341
|
}>;
|
|
342
|
+
/**
|
|
343
|
+
* Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts
|
|
344
|
+
* identifier-free replies only when the payload matches exactly one pending call that expects the
|
|
345
|
+
* same result payload shape. Avoid overlapping pending calls that share that shape. When sender
|
|
346
|
+
* identity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),
|
|
347
|
+
* matching identifier-free replies are accepted for compatibility. If a call times out, a delayed
|
|
348
|
+
* identifier-free reply can still match a later sequential call that expects the same shape and
|
|
349
|
+
* resolve it with stale data. This default may change in the next Capacitor major version; see
|
|
350
|
+
* https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.
|
|
351
|
+
*/
|
|
258
352
|
getScannerStatus(): Promise<{
|
|
259
353
|
status: ScannerStatus | string;
|
|
260
354
|
}>;
|
|
355
|
+
/**
|
|
356
|
+
* Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts
|
|
357
|
+
* identifier-free replies only when the payload matches exactly one pending call that expects the
|
|
358
|
+
* same result payload shape. Avoid overlapping pending calls that share that shape. When sender
|
|
359
|
+
* identity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),
|
|
360
|
+
* matching identifier-free replies are accepted for compatibility. If a call times out, a delayed
|
|
361
|
+
* identifier-free reply can still match a later sequential call that expects the same shape and
|
|
362
|
+
* resolve it with stale data. This default may change in the next Capacitor major version; see
|
|
363
|
+
* https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.
|
|
364
|
+
*/
|
|
261
365
|
getVersionInfo(): Promise<ZebraDeviceVersionInfo>;
|
|
262
366
|
disableDatawedge(): Promise<void>;
|
|
263
367
|
disableScannerInput(): Promise<void>;
|
|
264
368
|
enableDatawedge(): Promise<void>;
|
|
265
369
|
enableScannerInput(): Promise<void>;
|
|
370
|
+
/**
|
|
371
|
+
* Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts
|
|
372
|
+
* identifier-free replies only when the payload matches exactly one pending call that expects the
|
|
373
|
+
* same result payload shape. Avoid overlapping pending calls that share that shape. When sender
|
|
374
|
+
* identity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),
|
|
375
|
+
* matching identifier-free replies are accepted for compatibility. If a call times out, a delayed
|
|
376
|
+
* identifier-free reply can still match a later sequential call that expects the same shape and
|
|
377
|
+
* resolve it with stale data. This default may change in the next Capacitor major version; see
|
|
378
|
+
* https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.
|
|
379
|
+
*/
|
|
266
380
|
enumerateTriggers(): Promise<{
|
|
267
381
|
triggers: string[];
|
|
268
382
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAMA,MAAM,CAAN,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC7B,kEAA2C,CAAA;IAC3C,8CAAuB,CAAA;IACvB,wCAAiB,CAAA;IACjB,wCAAiB,CAAA;AACnB,CAAC,EALW,mBAAmB,KAAnB,mBAAmB,QAK9B;AAED,MAAM,CAAN,IAAY,yBAIX;AAJD,WAAY,yBAAyB;IACnC,0EAA6C,CAAA;IAC7C,8DAAiC,CAAA;IACjC,8DAAiC,CAAA;AACnC,CAAC,EAJW,yBAAyB,KAAzB,yBAAyB,QAIpC;AAED,MAAM,CAAN,IAAY,eAcX;AAdD,WAAY,eAAe;IACzB,8BAAW,CAAA;IACX,sCAAmB,CAAA;IACnB,8BAAW,CAAA;IACX,8BAAW,CAAA;IACX,8BAAW,CAAA;IACX,oCAAiB,CAAA;IACjB,4BAAS,CAAA;IACT,0CAAuB,CAAA;IACvB,8BAAW,CAAA;IACX,gCAAa,CAAA;IACb,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;IACjB,kCAAe,CAAA;AACjB,CAAC,EAdW,eAAe,KAAf,eAAe,QAc1B;AAED,MAAM,CAAN,IAAY,iBAYX;AAZD,WAAY,iBAAiB;IAC3B,kCAAa,CAAA;IACb,0DAAqC,CAAA;IACrC,0DAAqC,CAAA;IACrC,oDAA+B,CAAA;IAC/B,wDAAmC,CAAA;IACnC,wDAAmC,CAAA;IACnC,sDAAiC,CAAA;IACjC,kDAA6B,CAAA;IAC7B,gEAA2C,CAAA;IAC3C,8CAAyB,CAAA;IACzB,sDAAiC,CAAA;AACnC,CAAC,EAZW,iBAAiB,KAAjB,iBAAiB,QAY5B;AAED,MAAM,CAAN,IAAY,aAOX;AAPD,WAAY,aAAa;IACvB,wCAAuB,CAAA;IACvB,sCAAqB,CAAA;IACrB,8CAA6B,CAAA;IAC7B,8BAAa,CAAA;IACb,sCAAqB,CAAA;IACrB,oCAAmB,CAAA;AACrB,CAAC,EAPW,aAAa,KAAb,aAAa,QAOxB;AAED,MAAM,CAAN,IAAY,eAgCX;AAhCD,WAAY,eAAe;IACzB,oEAAiD,CAAA;IACjD,gFAA6D,CAAA;IAC7D,gDAA6B,CAAA;IAC7B,wDAAqC,CAAA;IACrC,kEAA+C,CAAA;IAC/C,4EAAyD,CAAA;IACzD,0EAAuD,CAAA;IACvD,4DAAyC,CAAA;IACzC,gEAA6C,CAAA;IAC7C,gEAA6C,CAAA;IAC7C,0DAAuC,CAAA;IACvC,8DAA2C,CAAA;IAC3C,0DAAuC,CAAA;IACvC,8DAA2C,CAAA;IAC3C,kEAA+C,CAAA;IAC/C,0DAAuC,CAAA;IACvC,kEAA+C,CAAA;IAC/C,sDAAmC,CAAA;IACnC,0EAAuD,CAAA;IACvD,gEAA6C,CAAA;IAC7C,oEAAiD,CAAA;IACjD,8DAA2C,CAAA;IAC3C,wDAAqC,CAAA;IACrC,8EAA2D,CAAA;IAC3D,4DAAyC,CAAA;IACzC,0DAAuC,CAAA;IACvC,wEAAqD,CAAA;IACrD,sEAAmD,CAAA;IACnD,oEAAiD,CAAA;IACjD,kEAA+C,CAAA;IAC/C,sCAAmB,CAAA;AACrB,CAAC,EAhCW,eAAe,KAAf,eAAe,QAgC1B","sourcesContent":["import type { Plugin, PluginListenerHandle } from '@capacitor/core';\n\nexport interface PluginVersionResult {\n version: string;\n}\n\nexport enum DataWedgeConfigMode {\n CREATE_IF_NOT_EXIST = 'CREATE_IF_NOT_EXIST',\n OVERWRITE = 'OVERWRITE',\n REMOVE = 'REMOVE',\n UPDATE = 'UPDATE',\n}\n\nexport enum DataWedgeNotificationType {\n CONFIGURATION_UPDATE = 'CONFIGURATION_UPDATE',\n PROFILE_SWITCH = 'PROFILE_SWITCH',\n SCANNER_STATUS = 'SCANNER_STATUS',\n}\n\nexport enum DataWedgePlugin {\n ADF = 'ADF',\n BARCODE = 'BARCODE',\n BDF = 'BDF',\n DCP = 'DCP',\n EKB = 'EKB',\n INTENT = 'INTENT',\n IP = 'IP',\n KEYSTROKE = 'KEYSTROKE',\n MSR = 'MSR',\n RFID = 'RFID',\n SERIAL = 'SERIAL',\n TOKENS = 'TOKENS',\n VOICE = 'VOICE',\n}\n\nexport enum ScannerIdentifier {\n AUTO = 'AUTO',\n BLUETOOTH_DS3678 = 'BLUETOOTH_DS3678',\n BLUETOOTH_RS6000 = 'BLUETOOTH_RS6000',\n BLUETOOTH_SSI = 'BLUETOOTH_SSI',\n INTERNAL_CAMERA = 'INTERNAL_CAMERA',\n INTERNAL_IMAGER = 'INTERNAL_IMAGER',\n INTERNAL_LASER = 'INTERNAL_LASER',\n PLUGABLE_SSI = 'PLUGABLE_SSI',\n PLUGABLE_SSI_RS5000 = 'PLUGABLE_SSI_RS5000',\n SERIAL_SSI = 'SERIAL_SSI',\n USB_SSI_DS3608 = 'USB_SSI_DS3608',\n}\n\nexport enum ScannerStatus {\n CONNECTED = 'CONNECTED',\n DISABLED = 'DISABLED',\n DISCONNECTED = 'DISCONNECTED',\n IDLE = 'IDLE',\n SCANNING = 'SCANNING',\n WAITING = 'WAITING',\n}\n\nexport enum ZebraErrorCodes {\n APP_ALREADY_ASSOCIATED = 'APP_ALREADY_ASSOCIATED',\n APP_ALREADY_IN_DISABLED_LIST = 'APP_ALREADY_IN_DISABLED_LIST',\n BUNDLE_EMPTY = 'BUNDLE_EMPTY',\n CANNOT_READ_FILE = 'CANNOT_READ_FILE',\n CONFIG_FILE_NOT_EXIST = 'CONFIG_FILE_NOT_EXIST',\n DATAWEDGE_ALREADY_DISABLED = 'DATAWEDGE_ALREADY_DISABLED',\n DATAWEDGE_ALREADY_ENABLED = 'DATAWEDGE_ALREADY_ENABLED',\n DATAWEDGE_DISABLED = 'DATAWEDGE_DISABLED',\n DEVICE_NOT_CONNECTED = 'DEVICE_NOT_CONNECTED',\n DEVICE_NOT_SUPPORTED = 'DEVICE_NOT_SUPPORTED',\n INPUT_NOT_ENABLED = 'INPUT_NOT_ENABLED',\n INVALID_CONFIG_FILE = 'INVALID_CONFIG_FILE',\n INVALID_FILE_NAME = 'INVALID_FILE_NAME',\n INVALID_FOLDER_PATH = 'INVALID_FOLDER_PATH',\n OPERATION_NOT_ALLOWED = 'OPERATION_NOT_ALLOWED',\n PARAMETER_INVALID = 'PARAMETER_INVALID',\n PLUGIN_BUNDLE_INVALID = 'PLUGIN_BUNDLE_INVALID',\n PLUGIN_DISABLED = 'PLUGIN_DISABLED',\n PLUGIN_DISABLED_IN_CONFIG = 'PLUGIN_DISABLED_IN_CONFIG',\n PLUGIN_NOT_SUPPORTED = 'PLUGIN_NOT_SUPPORTED',\n PROFILE_ALREADY_EXISTS = 'PROFILE_ALREADY_EXISTS',\n PROFILE_ALREADY_SET = 'PROFILE_ALREADY_SET',\n PROFILE_DISABLED = 'PROFILE_DISABLED',\n PROFILE_HAS_APP_ASSOCIATION = 'PROFILE_HAS_APP_ASSOCIATION',\n PROFILE_NAME_EMPTY = 'PROFILE_NAME_EMPTY',\n PROFILE_NOT_FOUND = 'PROFILE_NOT_FOUND',\n SCANNER_ALREADY_DISABLED = 'SCANNER_ALREADY_DISABLED',\n SCANNER_ALREADY_ENABLED = 'SCANNER_ALREADY_ENABLED',\n SCANNER_DISABLE_FAILED = 'SCANNER_DISABLE_FAILED',\n SCANNER_ENABLE_FAILED = 'SCANNER_ENABLE_FAILED',\n UNKNOWN = 'UNKNOWN',\n}\n\nexport type DataWedgeScalar = string | number | boolean | null;\nexport type DataWedgeParameterValue =\n | DataWedgeScalar\n | DataWedgeScalar[]\n | DataWedgePluginParameters\n | DataWedgePluginParameters[];\n\nexport interface DataWedgePluginParameters {\n [key: string]: DataWedgeParameterValue;\n}\n\nexport interface CloneProfileOptions {\n destProfileName: string;\n sourceProfileName: string;\n}\n\nexport interface CreateProfileOptions {\n profileName: string;\n}\n\nexport interface DataWedgeAppConfig {\n activityList: string[];\n packageName: string;\n}\n\nexport interface DataWedgeNotifyOptions {\n deviceIdentifier: string;\n notificationSettings: number[];\n}\n\nexport interface DataWedgePluginConfig {\n outputPluginName?: DataWedgePlugin;\n paramList: DataWedgePluginParameters;\n pluginName: DataWedgePlugin;\n resetConfig?: boolean;\n}\n\nexport interface DeleteProfileOptions {\n profileNames: string[];\n}\n\nexport interface PluginConfigOptions {\n outputPluginName?: DataWedgePlugin;\n pluginName: DataWedgePlugin;\n}\n\nexport interface GetConfigOptions {\n pluginConfigs?: PluginConfigOptions[];\n profileName: string;\n}\n\nexport interface ImportConfigOptions {\n fileList?: string[];\n folderPath: string;\n}\n\nexport interface RegisterForNotificationOptions {\n appName?: string;\n callback?: (notification: ZebraNotificationEvent) => void;\n intentAction?: string;\n notificationType: DataWedgeNotificationType;\n}\n\nexport interface RegisterScanIntentActionOptions {\n /** DataWedge intent action used for barcode scan broadcasts (physical trigger or soft scan). */\n intentAction: string;\n}\n\nexport interface RenameProfileOptions {\n currentProfileName: string;\n newProfileName: string;\n}\n\nexport interface ReportingOptions {\n reportingEnabled: boolean;\n reportingGenerateOption?: 'manual' | 'auto' | 'both';\n reportingShowForManualImport?: boolean;\n}\n\nexport interface SetConfigOptions {\n appList?: DataWedgeAppConfig[];\n configMode?: DataWedgeConfigMode;\n pluginConfigs?: DataWedgePluginConfig[];\n profileEnabled?: boolean;\n profileName: string;\n /**\n * Registers this intent action in the plugin receiver after a successful `setConfig` (runtime only;\n * call again on every app start). `INTENT` entries in `pluginConfigs` also register their\n * `intent_action` values automatically after a successful `setConfig`, whether or not\n * `scanIntentAction` is supplied.\n */\n scanIntentAction?: string;\n}\n\nexport interface SetDisabledAppListOptions {\n appList?: DataWedgeAppConfig[];\n configMode: DataWedgeConfigMode;\n}\n\nexport interface SwitchScannerParamsOptions {\n scannerIdentifier: ScannerIdentifier;\n scannerParams: DataWedgePluginParameters;\n}\n\nexport interface ZebraDeviceScanner {\n connectionState: boolean;\n id?: string;\n index: number;\n name: string;\n}\n\nexport interface ZebraDeviceVersionInfo {\n barcodeVersion?: string;\n dataWedgeVersion?: string;\n decoderVersion?: string;\n scannerFirmwareVersions?: string[];\n simulScanVersion?: string;\n}\n\nexport interface ZebraError {\n code: ZebraErrorCodes | string;\n message: string;\n}\n\nexport interface ZebraProfileConfiguration {\n appList?: DataWedgeAppConfig[];\n pluginConfigList: DataWedgePluginConfig[];\n profileEnabled: boolean;\n profileName: string;\n}\n\nexport interface ZebraScanResult {\n data: string;\n decodedMode?: string;\n intentAction?: string;\n labelType?: string;\n source?: string;\n}\n\nexport interface ZebraNotificationEvent {\n notificationType: string;\n profileName?: string;\n scannerStatus?: ScannerStatus | string;\n status?: string;\n raw: Record<string, unknown>;\n}\n\nexport interface DataWedgeStatusResult {\n isEnabled: boolean;\n}\n\nexport interface IgnoreDisabledProfilesResult {\n enabled: boolean;\n}\n\nexport interface ZebraDataWedgePlugin extends Plugin {\n cloneProfile(options: CloneProfileOptions): Promise<void>;\n createProfile(options: CreateProfileOptions): Promise<void>;\n deleteProfile(options: DeleteProfileOptions): Promise<void>;\n importConfig(options: ImportConfigOptions): Promise<void>;\n renameProfile(options: RenameProfileOptions): Promise<void>;\n restoreConfig(): Promise<void>;\n setConfig(options: SetConfigOptions): Promise<void>;\n setDisabledAppList(options: SetDisabledAppListOptions): Promise<void>;\n setIgnoreDisabledProfiles(options: IgnoreDisabledProfilesResult): Promise<void>;\n /**\n * Completes when the notification command is dispatched to DataWedge.\n * This does not confirm registration, policy approval, or scanner readiness;\n * observe notification events to determine the scanner's state.\n */\n registerForNotification(options: Omit<RegisterForNotificationOptions, 'callback'>): Promise<void>;\n /**\n * Registers a DataWedge scan broadcast intent action in the Android plugin receiver (runtime only;\n * call again on every app start). Use when your profile uses a custom `intent_action` and scans\n * come from the physical trigger.\n */\n registerScanIntentAction(options: RegisterScanIntentActionOptions): Promise<void>;\n /**\n * Completes when the unregistration command is dispatched to DataWedge.\n * This does not confirm unregistration or policy approval; notifications may already be queued.\n * Dispose of local listeners separately when using the low-level API.\n */\n unRegisterForNotification(options: Omit<RegisterForNotificationOptions, 'callback'>): Promise<void>;\n enumerateScanners(): Promise<{ scanners: ZebraDeviceScanner[] }>;\n getActiveProfile(): Promise<{ profileName: string }>;\n getAssociatedApps(options: { profileName: string }): Promise<{ appList: DataWedgeAppConfig[] }>;\n getConfig(options: GetConfigOptions): Promise<ZebraProfileConfiguration>;\n getDatawedgeStatus(): Promise<DataWedgeStatusResult>;\n getDisabledAppList(): Promise<{ appList: DataWedgeAppConfig[] }>;\n getIgnoreDisabledProfiles(): Promise<IgnoreDisabledProfilesResult>;\n getProfilesList(): Promise<{ profiles: string[] }>;\n getScannerStatus(): Promise<{ status: ScannerStatus | string }>;\n getVersionInfo(): Promise<ZebraDeviceVersionInfo>;\n disableDatawedge(): Promise<void>;\n disableScannerInput(): Promise<void>;\n enableDatawedge(): Promise<void>;\n enableScannerInput(): Promise<void>;\n enumerateTriggers(): Promise<{ triggers: string[] }>;\n notify(options: DataWedgeNotifyOptions): Promise<void>;\n resetDefaultProfile(): Promise<void>;\n setDefaultProfile(options: { profileName: string }): Promise<void>;\n setReportingOptions(options: ReportingOptions): Promise<void>;\n softRfidTrigger(): Promise<ZebraScanResult>;\n softScanTrigger(options: { intentAction: string }): Promise<ZebraScanResult>;\n switchScanner(options: { scannerIndex?: string; scannerIdentifier?: ScannerIdentifier }): Promise<void>;\n switchScannerParams(options: SwitchScannerParamsOptions): Promise<void>;\n switchToProfile(options: { profileName: string }): Promise<void>;\n getPluginVersion(): Promise<PluginVersionResult>;\n addListener(eventName: 'scan', listenerFunc: (event: ZebraScanResult) => void): Promise<PluginListenerHandle>;\n addListener(\n eventName: 'notification',\n listenerFunc: (event: ZebraNotificationEvent) => void,\n ): Promise<PluginListenerHandle>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAMA,MAAM,CAAN,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC7B,kEAA2C,CAAA;IAC3C,8CAAuB,CAAA;IACvB,wCAAiB,CAAA;IACjB,wCAAiB,CAAA;AACnB,CAAC,EALW,mBAAmB,KAAnB,mBAAmB,QAK9B;AAED,MAAM,CAAN,IAAY,yBAIX;AAJD,WAAY,yBAAyB;IACnC,0EAA6C,CAAA;IAC7C,8DAAiC,CAAA;IACjC,8DAAiC,CAAA;AACnC,CAAC,EAJW,yBAAyB,KAAzB,yBAAyB,QAIpC;AAED,MAAM,CAAN,IAAY,eAcX;AAdD,WAAY,eAAe;IACzB,8BAAW,CAAA;IACX,sCAAmB,CAAA;IACnB,8BAAW,CAAA;IACX,8BAAW,CAAA;IACX,8BAAW,CAAA;IACX,oCAAiB,CAAA;IACjB,4BAAS,CAAA;IACT,0CAAuB,CAAA;IACvB,8BAAW,CAAA;IACX,gCAAa,CAAA;IACb,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;IACjB,kCAAe,CAAA;AACjB,CAAC,EAdW,eAAe,KAAf,eAAe,QAc1B;AAED,MAAM,CAAN,IAAY,iBAYX;AAZD,WAAY,iBAAiB;IAC3B,kCAAa,CAAA;IACb,0DAAqC,CAAA;IACrC,0DAAqC,CAAA;IACrC,oDAA+B,CAAA;IAC/B,wDAAmC,CAAA;IACnC,wDAAmC,CAAA;IACnC,sDAAiC,CAAA;IACjC,kDAA6B,CAAA;IAC7B,gEAA2C,CAAA;IAC3C,8CAAyB,CAAA;IACzB,sDAAiC,CAAA;AACnC,CAAC,EAZW,iBAAiB,KAAjB,iBAAiB,QAY5B;AAED,MAAM,CAAN,IAAY,aAOX;AAPD,WAAY,aAAa;IACvB,wCAAuB,CAAA;IACvB,sCAAqB,CAAA;IACrB,8CAA6B,CAAA;IAC7B,8BAAa,CAAA;IACb,sCAAqB,CAAA;IACrB,oCAAmB,CAAA;AACrB,CAAC,EAPW,aAAa,KAAb,aAAa,QAOxB;AAED,MAAM,CAAN,IAAY,eAgCX;AAhCD,WAAY,eAAe;IACzB,oEAAiD,CAAA;IACjD,gFAA6D,CAAA;IAC7D,gDAA6B,CAAA;IAC7B,wDAAqC,CAAA;IACrC,kEAA+C,CAAA;IAC/C,4EAAyD,CAAA;IACzD,0EAAuD,CAAA;IACvD,4DAAyC,CAAA;IACzC,gEAA6C,CAAA;IAC7C,gEAA6C,CAAA;IAC7C,0DAAuC,CAAA;IACvC,8DAA2C,CAAA;IAC3C,0DAAuC,CAAA;IACvC,8DAA2C,CAAA;IAC3C,kEAA+C,CAAA;IAC/C,0DAAuC,CAAA;IACvC,kEAA+C,CAAA;IAC/C,sDAAmC,CAAA;IACnC,0EAAuD,CAAA;IACvD,gEAA6C,CAAA;IAC7C,oEAAiD,CAAA;IACjD,8DAA2C,CAAA;IAC3C,wDAAqC,CAAA;IACrC,8EAA2D,CAAA;IAC3D,4DAAyC,CAAA;IACzC,0DAAuC,CAAA;IACvC,wEAAqD,CAAA;IACrD,sEAAmD,CAAA;IACnD,oEAAiD,CAAA;IACjD,kEAA+C,CAAA;IAC/C,sCAAmB,CAAA;AACrB,CAAC,EAhCW,eAAe,KAAf,eAAe,QAgC1B","sourcesContent":["import type { Plugin, PluginListenerHandle } from '@capacitor/core';\n\nexport interface PluginVersionResult {\n version: string;\n}\n\nexport enum DataWedgeConfigMode {\n CREATE_IF_NOT_EXIST = 'CREATE_IF_NOT_EXIST',\n OVERWRITE = 'OVERWRITE',\n REMOVE = 'REMOVE',\n UPDATE = 'UPDATE',\n}\n\nexport enum DataWedgeNotificationType {\n CONFIGURATION_UPDATE = 'CONFIGURATION_UPDATE',\n PROFILE_SWITCH = 'PROFILE_SWITCH',\n SCANNER_STATUS = 'SCANNER_STATUS',\n}\n\nexport enum DataWedgePlugin {\n ADF = 'ADF',\n BARCODE = 'BARCODE',\n BDF = 'BDF',\n DCP = 'DCP',\n EKB = 'EKB',\n INTENT = 'INTENT',\n IP = 'IP',\n KEYSTROKE = 'KEYSTROKE',\n MSR = 'MSR',\n RFID = 'RFID',\n SERIAL = 'SERIAL',\n TOKENS = 'TOKENS',\n VOICE = 'VOICE',\n}\n\nexport enum ScannerIdentifier {\n AUTO = 'AUTO',\n BLUETOOTH_DS3678 = 'BLUETOOTH_DS3678',\n BLUETOOTH_RS6000 = 'BLUETOOTH_RS6000',\n BLUETOOTH_SSI = 'BLUETOOTH_SSI',\n INTERNAL_CAMERA = 'INTERNAL_CAMERA',\n INTERNAL_IMAGER = 'INTERNAL_IMAGER',\n INTERNAL_LASER = 'INTERNAL_LASER',\n PLUGABLE_SSI = 'PLUGABLE_SSI',\n PLUGABLE_SSI_RS5000 = 'PLUGABLE_SSI_RS5000',\n SERIAL_SSI = 'SERIAL_SSI',\n USB_SSI_DS3608 = 'USB_SSI_DS3608',\n}\n\nexport enum ScannerStatus {\n CONNECTED = 'CONNECTED',\n DISABLED = 'DISABLED',\n DISCONNECTED = 'DISCONNECTED',\n IDLE = 'IDLE',\n SCANNING = 'SCANNING',\n WAITING = 'WAITING',\n}\n\nexport enum ZebraErrorCodes {\n APP_ALREADY_ASSOCIATED = 'APP_ALREADY_ASSOCIATED',\n APP_ALREADY_IN_DISABLED_LIST = 'APP_ALREADY_IN_DISABLED_LIST',\n BUNDLE_EMPTY = 'BUNDLE_EMPTY',\n CANNOT_READ_FILE = 'CANNOT_READ_FILE',\n CONFIG_FILE_NOT_EXIST = 'CONFIG_FILE_NOT_EXIST',\n DATAWEDGE_ALREADY_DISABLED = 'DATAWEDGE_ALREADY_DISABLED',\n DATAWEDGE_ALREADY_ENABLED = 'DATAWEDGE_ALREADY_ENABLED',\n DATAWEDGE_DISABLED = 'DATAWEDGE_DISABLED',\n DEVICE_NOT_CONNECTED = 'DEVICE_NOT_CONNECTED',\n DEVICE_NOT_SUPPORTED = 'DEVICE_NOT_SUPPORTED',\n INPUT_NOT_ENABLED = 'INPUT_NOT_ENABLED',\n INVALID_CONFIG_FILE = 'INVALID_CONFIG_FILE',\n INVALID_FILE_NAME = 'INVALID_FILE_NAME',\n INVALID_FOLDER_PATH = 'INVALID_FOLDER_PATH',\n OPERATION_NOT_ALLOWED = 'OPERATION_NOT_ALLOWED',\n PARAMETER_INVALID = 'PARAMETER_INVALID',\n PLUGIN_BUNDLE_INVALID = 'PLUGIN_BUNDLE_INVALID',\n PLUGIN_DISABLED = 'PLUGIN_DISABLED',\n PLUGIN_DISABLED_IN_CONFIG = 'PLUGIN_DISABLED_IN_CONFIG',\n PLUGIN_NOT_SUPPORTED = 'PLUGIN_NOT_SUPPORTED',\n PROFILE_ALREADY_EXISTS = 'PROFILE_ALREADY_EXISTS',\n PROFILE_ALREADY_SET = 'PROFILE_ALREADY_SET',\n PROFILE_DISABLED = 'PROFILE_DISABLED',\n PROFILE_HAS_APP_ASSOCIATION = 'PROFILE_HAS_APP_ASSOCIATION',\n PROFILE_NAME_EMPTY = 'PROFILE_NAME_EMPTY',\n PROFILE_NOT_FOUND = 'PROFILE_NOT_FOUND',\n SCANNER_ALREADY_DISABLED = 'SCANNER_ALREADY_DISABLED',\n SCANNER_ALREADY_ENABLED = 'SCANNER_ALREADY_ENABLED',\n SCANNER_DISABLE_FAILED = 'SCANNER_DISABLE_FAILED',\n SCANNER_ENABLE_FAILED = 'SCANNER_ENABLE_FAILED',\n UNKNOWN = 'UNKNOWN',\n}\n\nexport type DataWedgeScalar = string | number | boolean | null;\nexport type DataWedgeParameterValue =\n | DataWedgeScalar\n | DataWedgeScalar[]\n | DataWedgePluginParameters\n | DataWedgePluginParameters[];\n\nexport interface DataWedgePluginParameters {\n [key: string]: DataWedgeParameterValue;\n}\n\nexport interface CloneProfileOptions {\n destProfileName: string;\n sourceProfileName: string;\n}\n\nexport interface CreateProfileOptions {\n profileName: string;\n}\n\nexport interface DataWedgeAppConfig {\n activityList: string[];\n packageName: string;\n}\n\nexport interface DataWedgeNotifyOptions {\n deviceIdentifier: string;\n notificationSettings: number[];\n}\n\nexport interface DataWedgePluginConfig {\n outputPluginName?: DataWedgePlugin;\n paramList: DataWedgePluginParameters;\n pluginName: DataWedgePlugin;\n resetConfig?: boolean;\n}\n\nexport interface DeleteProfileOptions {\n profileNames: string[];\n}\n\nexport interface PluginConfigOptions {\n outputPluginName?: DataWedgePlugin;\n pluginName: DataWedgePlugin;\n}\n\nexport interface GetConfigOptions {\n pluginConfigs?: PluginConfigOptions[];\n profileName: string;\n}\n\nexport interface ImportConfigOptions {\n fileList?: string[];\n folderPath: string;\n}\n\nexport interface RegisterForNotificationOptions {\n appName?: string;\n callback?: (notification: ZebraNotificationEvent) => void;\n intentAction?: string;\n notificationType: DataWedgeNotificationType;\n}\n\nexport interface RegisterScanIntentActionOptions {\n /** DataWedge intent action used for barcode scan broadcasts (physical trigger or soft scan). */\n intentAction: string;\n}\n\nexport interface RenameProfileOptions {\n currentProfileName: string;\n newProfileName: string;\n}\n\nexport interface ReportingOptions {\n reportingEnabled: boolean;\n reportingGenerateOption?: 'manual' | 'auto' | 'both';\n reportingShowForManualImport?: boolean;\n}\n\nexport interface SetConfigOptions {\n appList?: DataWedgeAppConfig[];\n configMode?: DataWedgeConfigMode;\n pluginConfigs?: DataWedgePluginConfig[];\n profileEnabled?: boolean;\n profileName: string;\n /**\n * Registers this intent action in the plugin receiver after a successful `setConfig` (runtime only;\n * call again on every app start). `INTENT` entries in `pluginConfigs` also register their\n * `intent_action` values automatically after a successful `setConfig`, whether or not\n * `scanIntentAction` is supplied.\n */\n scanIntentAction?: string;\n}\n\nexport interface SetDisabledAppListOptions {\n appList?: DataWedgeAppConfig[];\n configMode: DataWedgeConfigMode;\n}\n\nexport interface SwitchScannerParamsOptions {\n scannerIdentifier: ScannerIdentifier;\n scannerParams: DataWedgePluginParameters;\n}\n\nexport interface ZebraDeviceScanner {\n connectionState: boolean;\n id?: string;\n index: number;\n name: string;\n}\n\nexport interface ZebraDeviceVersionInfo {\n barcodeVersion?: string;\n dataWedgeVersion?: string;\n decoderVersion?: string;\n scannerFirmwareVersions?: string[];\n simulScanVersion?: string;\n}\n\nexport interface ZebraError {\n code: ZebraErrorCodes | string;\n message: string;\n}\n\nexport interface ZebraProfileConfiguration {\n appList?: DataWedgeAppConfig[];\n pluginConfigList: DataWedgePluginConfig[];\n profileEnabled: boolean;\n profileName: string;\n}\n\nexport interface ZebraScanResult {\n data: string;\n decodedMode?: string;\n intentAction?: string;\n labelType?: string;\n source?: string;\n}\n\nexport interface ZebraNotificationEvent {\n notificationType: string;\n profileName?: string;\n scannerStatus?: ScannerStatus | string;\n status?: string;\n raw: Record<string, unknown>;\n}\n\nexport interface DataWedgeStatusResult {\n isEnabled: boolean;\n}\n\nexport interface IgnoreDisabledProfilesResult {\n enabled: boolean;\n}\n\nexport interface ZebraDataWedgePlugin extends Plugin {\n cloneProfile(options: CloneProfileOptions): Promise<void>;\n createProfile(options: CreateProfileOptions): Promise<void>;\n deleteProfile(options: DeleteProfileOptions): Promise<void>;\n importConfig(options: ImportConfigOptions): Promise<void>;\n renameProfile(options: RenameProfileOptions): Promise<void>;\n restoreConfig(): Promise<void>;\n setConfig(options: SetConfigOptions): Promise<void>;\n setDisabledAppList(options: SetDisabledAppListOptions): Promise<void>;\n setIgnoreDisabledProfiles(options: IgnoreDisabledProfilesResult): Promise<void>;\n /**\n * Completes when the notification command is dispatched to DataWedge.\n * This does not confirm registration, policy approval, or scanner readiness;\n * observe notification events to determine the scanner's state.\n */\n registerForNotification(options: Omit<RegisterForNotificationOptions, 'callback'>): Promise<void>;\n /**\n * Registers a DataWedge scan broadcast intent action in the Android plugin receiver (runtime only;\n * call again on every app start). Use when your profile uses a custom `intent_action` and scans\n * come from the physical trigger.\n */\n registerScanIntentAction(options: RegisterScanIntentActionOptions): Promise<void>;\n /**\n * Completes when the unregistration command is dispatched to DataWedge.\n * This does not confirm unregistration or policy approval; notifications may already be queued.\n * Dispose of local listeners separately when using the low-level API.\n */\n unRegisterForNotification(options: Omit<RegisterForNotificationOptions, 'callback'>): Promise<void>;\n /**\n * Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts\n * identifier-free replies only when the payload matches exactly one pending call that expects the\n * same result payload shape. Avoid overlapping pending calls that share that shape. When sender\n * identity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),\n * matching identifier-free replies are accepted for compatibility. If a call times out, a delayed\n * identifier-free reply can still match a later sequential call that expects the same shape and\n * resolve it with stale data. This default may change in the next Capacitor major version; see\n * https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.\n */\n enumerateScanners(): Promise<{ scanners: ZebraDeviceScanner[] }>;\n /**\n * Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts\n * identifier-free replies only when the payload matches exactly one pending call that expects the\n * same result payload shape. Avoid overlapping pending calls that share that shape. When sender\n * identity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),\n * matching identifier-free replies are accepted for compatibility. If a call times out, a delayed\n * identifier-free reply can still match a later sequential call that expects the same shape and\n * resolve it with stale data. This default may change in the next Capacitor major version; see\n * https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.\n */\n getActiveProfile(): Promise<{ profileName: string }>;\n /**\n * Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts\n * identifier-free replies only when the payload matches exactly one pending call that expects the\n * same result payload shape. Avoid overlapping pending calls that share that shape. For example,\n * `getAssociatedApps()` and `getConfig()` both send `CMD_GET_CONFIG` and expect `CONFIG_RESULTS`, so one\n * pending call to each overlaps. When sender identity is unavailable (Android API 24 to 33, or API\n * 34+ when the platform withholds it), matching identifier-free replies are accepted for\n * compatibility. If a call times out, a delayed identifier-free reply can still match a later\n * sequential call that expects the same shape and resolve it with stale data. This default may\n * change in the next Capacitor major version; see\n * https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.\n */\n getAssociatedApps(options: { profileName: string }): Promise<{ appList: DataWedgeAppConfig[] }>;\n /**\n * Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts\n * identifier-free replies only when the payload matches exactly one pending call that expects the\n * same result payload shape. Avoid overlapping pending calls that share that shape. For example,\n * `getAssociatedApps()` and `getConfig()` both send `CMD_GET_CONFIG` and expect `CONFIG_RESULTS`, so one\n * pending call to each overlaps. When sender identity is unavailable (Android API 24 to 33, or API\n * 34+ when the platform withholds it), matching identifier-free replies are accepted for\n * compatibility. If a call times out, a delayed identifier-free reply can still match a later\n * sequential call that expects the same shape and resolve it with stale data. This default may\n * change in the next Capacitor major version; see\n * https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.\n */\n getConfig(options: GetConfigOptions): Promise<ZebraProfileConfiguration>;\n /**\n * Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts\n * identifier-free replies only when the payload matches exactly one pending call that expects the\n * same result payload shape. Avoid overlapping pending calls that share that shape. When sender\n * identity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),\n * matching identifier-free replies are accepted for compatibility. If a call times out, a delayed\n * identifier-free reply can still match a later sequential call that expects the same shape and\n * resolve it with stale data. This default may change in the next Capacitor major version; see\n * https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.\n */\n getDatawedgeStatus(): Promise<DataWedgeStatusResult>;\n /**\n * Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts\n * identifier-free replies only when the payload matches exactly one pending call that expects the\n * same result payload shape. Avoid overlapping pending calls that share that shape. When sender\n * identity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),\n * matching identifier-free replies are accepted for compatibility. If a call times out, a delayed\n * identifier-free reply can still match a later sequential call that expects the same shape and\n * resolve it with stale data. This default may change in the next Capacitor major version; see\n * https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.\n */\n getDisabledAppList(): Promise<{ appList: DataWedgeAppConfig[] }>;\n /**\n * Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts\n * identifier-free replies only when the payload matches exactly one pending call that expects the\n * same result payload shape. Avoid overlapping pending calls that share that shape. When sender\n * identity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),\n * matching identifier-free replies are accepted for compatibility. If a call times out, a delayed\n * identifier-free reply can still match a later sequential call that expects the same shape and\n * resolve it with stale data. This default may change in the next Capacitor major version; see\n * https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.\n */\n getIgnoreDisabledProfiles(): Promise<IgnoreDisabledProfilesResult>;\n /**\n * Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts\n * identifier-free replies only when the payload matches exactly one pending call that expects the\n * same result payload shape. Avoid overlapping pending calls that share that shape. When sender\n * identity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),\n * matching identifier-free replies are accepted for compatibility. If a call times out, a delayed\n * identifier-free reply can still match a later sequential call that expects the same shape and\n * resolve it with stale data. This default may change in the next Capacitor major version; see\n * https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.\n */\n getProfilesList(): Promise<{ profiles: string[] }>;\n /**\n * Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts\n * identifier-free replies only when the payload matches exactly one pending call that expects the\n * same result payload shape. Avoid overlapping pending calls that share that shape. When sender\n * identity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),\n * matching identifier-free replies are accepted for compatibility. If a call times out, a delayed\n * identifier-free reply can still match a later sequential call that expects the same shape and\n * resolve it with stale data. This default may change in the next Capacitor major version; see\n * https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.\n */\n getScannerStatus(): Promise<{ status: ScannerStatus | string }>;\n /**\n * Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts\n * identifier-free replies only when the payload matches exactly one pending call that expects the\n * same result payload shape. Avoid overlapping pending calls that share that shape. When sender\n * identity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),\n * matching identifier-free replies are accepted for compatibility. If a call times out, a delayed\n * identifier-free reply can still match a later sequential call that expects the same shape and\n * resolve it with stale data. This default may change in the next Capacitor major version; see\n * https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.\n */\n getVersionInfo(): Promise<ZebraDeviceVersionInfo>;\n disableDatawedge(): Promise<void>;\n disableScannerInput(): Promise<void>;\n enableDatawedge(): Promise<void>;\n enableScannerInput(): Promise<void>;\n /**\n * Android only. DataWedge may omit `COMMAND_IDENTIFIER` on query replies. The plugin accepts\n * identifier-free replies only when the payload matches exactly one pending call that expects the\n * same result payload shape. Avoid overlapping pending calls that share that shape. When sender\n * identity is unavailable (Android API 24 to 33, or API 34+ when the platform withholds it),\n * matching identifier-free replies are accepted for compatibility. If a call times out, a delayed\n * identifier-free reply can still match a later sequential call that expects the same shape and\n * resolve it with stale data. This default may change in the next Capacitor major version; see\n * https://github.com/Cap-go/capacitor-zebra-datawedge/issues/25/.\n */\n enumerateTriggers(): Promise<{ triggers: string[] }>;\n notify(options: DataWedgeNotifyOptions): Promise<void>;\n resetDefaultProfile(): Promise<void>;\n setDefaultProfile(options: { profileName: string }): Promise<void>;\n setReportingOptions(options: ReportingOptions): Promise<void>;\n softRfidTrigger(): Promise<ZebraScanResult>;\n softScanTrigger(options: { intentAction: string }): Promise<ZebraScanResult>;\n switchScanner(options: { scannerIndex?: string; scannerIdentifier?: ScannerIdentifier }): Promise<void>;\n switchScannerParams(options: SwitchScannerParamsOptions): Promise<void>;\n switchToProfile(options: { profileName: string }): Promise<void>;\n getPluginVersion(): Promise<PluginVersionResult>;\n addListener(eventName: 'scan', listenerFunc: (event: ZebraScanResult) => void): Promise<PluginListenerHandle>;\n addListener(\n eventName: 'notification',\n listenerFunc: (event: ZebraNotificationEvent) => void,\n ): Promise<PluginListenerHandle>;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/capacitor-zebra-datawedge",
|
|
3
|
-
"version": "8.2.
|
|
3
|
+
"version": "8.2.4",
|
|
4
4
|
"description": "Capacitor plugin for Zebra DataWedge profile management, notifications, queries, and soft scanning on Zebra Android devices.",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|