chrome-types 0.1.273 → 0.1.274

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 (3) hide show
  1. package/_all.d.ts +710 -10
  2. package/index.d.ts +710 -10
  3. package/package.json +2 -2
package/_all.d.ts CHANGED
@@ -14,8 +14,8 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- // Generated on Wed Mar 13 2024 22:28:57 GMT+0000 (Coordinated Universal Time)
18
- // Built at 234817aae8fbd917079408c00e70cfc8d9416b6d
17
+ // Generated on Tue Mar 19 2024 21:58:29 GMT+0000 (Coordinated Universal Time)
18
+ // Built at a732d94bc71ad98bdfb0441c5cc2a4b7ef180ac0
19
19
 
20
20
  // Includes all types, including MV2 + Platform Apps APIs.
21
21
 
@@ -10291,7 +10291,7 @@ declare namespace chrome {
10291
10291
  }
10292
10292
 
10293
10293
  /**
10294
- * Use the `chrome.documentScan` API to discover and retrieve images from attached paper document scanners.
10294
+ * Use the `chrome.documentScan` API to discover and retrieve images from attached document scanners.
10295
10295
  *
10296
10296
  * @since Chrome 44
10297
10297
  * @chrome-permission documentScan
@@ -10308,7 +10308,7 @@ declare namespace chrome {
10308
10308
  mimeTypes?: string[];
10309
10309
 
10310
10310
  /**
10311
- * The number of scanned images allowed (defaults to 1).
10311
+ * The number of scanned images allowed. The default is 1.
10312
10312
  */
10313
10313
  maxImages?: number;
10314
10314
  }
@@ -10316,21 +10316,485 @@ declare namespace chrome {
10316
10316
  export interface ScanResults {
10317
10317
 
10318
10318
  /**
10319
- * The data image URLs in a form that can be passed as the "src" value to an image tag.
10319
+ * An array of data image URLs in a form that can be passed as the "src" value to an image tag.
10320
10320
  */
10321
10321
  dataUrls: string[];
10322
10322
 
10323
10323
  /**
10324
- * The MIME type of `dataUrls`.
10324
+ * The MIME type of the `dataUrls`.
10325
10325
  */
10326
10326
  mimeType: string;
10327
10327
  }
10328
10328
 
10329
10329
  /**
10330
- * Performs a document scan. On success, the PNG data will be sent to the callback.
10330
+ * An enum that indicates the result of each operation.
10331
+ *
10332
+ * @chrome-enum "UNKNOWN" An unknown or generic failure occurred.
10333
+ * @chrome-enum "SUCCESS" The operation succeeded.
10334
+ * @chrome-enum "UNSUPPORTED" The operation is not supported.
10335
+ * @chrome-enum "CANCELLED" The operation was cancelled.
10336
+ * @chrome-enum "DEVICE\_BUSY" The device is busy.
10337
+ * @chrome-enum "INVALID" Either the data or an argument passed to the method is not valid.
10338
+ * @chrome-enum "WRONG\_TYPE" The supplied value is the wrong data type for the underlying option.
10339
+ * @chrome-enum "EOF" No more data is available.
10340
+ * @chrome-enum "ADF\_JAMMED" The document feeder is jammed.
10341
+ * @chrome-enum "ADF\_EMPTY" The document feeder is empty.
10342
+ * @chrome-enum "COVER\_OPEN" The flatbed cover is open.
10343
+ * @chrome-enum "IO\_ERROR" An error occurred while communicating with the device.
10344
+ * @chrome-enum "ACCESS\_DENIED" The device requires authentication.
10345
+ * @chrome-enum "NO\_MEMORY" Not enough memory is available on the Chromebook to complete the operation.
10346
+ * @chrome-enum "UNREACHABLE" The device is not reachable.
10347
+ * @chrome-enum "MISSING" The device is disconnected.
10348
+ * @chrome-enum "INTERNAL\_ERROR" An error has occurred somewhere other than the calling application.
10349
+ * @since Pending
10350
+ */
10351
+ export type OperationResult = "UNKNOWN" | "SUCCESS" | "UNSUPPORTED" | "CANCELLED" | "DEVICE_BUSY" | "INVALID" | "WRONG_TYPE" | "EOF" | "ADF_JAMMED" | "ADF_EMPTY" | "COVER_OPEN" | "IO_ERROR" | "ACCESS_DENIED" | "NO_MEMORY" | "UNREACHABLE" | "MISSING" | "INTERNAL_ERROR";
10352
+
10353
+ /**
10354
+ * Indicates how the scanner is connected to the computer.
10355
+ *
10356
+ * @since Pending
10357
+ */
10358
+ export type ConnectionType = "UNSPECIFIED" | "USB" | "NETWORK";
10359
+
10360
+ /**
10361
+ * @since Pending
10362
+ */
10363
+ export interface ScannerInfo {
10364
+
10365
+ /**
10366
+ * The ID of a specific scanner.
10367
+ */
10368
+ scannerId: string;
10369
+
10370
+ /**
10371
+ * A human-readable name for the scanner to display in the UI.
10372
+ */
10373
+ name: string;
10374
+
10375
+ /**
10376
+ * The scanner manufacturer.
10377
+ */
10378
+ manufacturer: string;
10379
+
10380
+ /**
10381
+ * The scanner model if it is available, or a generic description.
10382
+ */
10383
+ model: string;
10384
+
10385
+ /**
10386
+ * For matching against other `ScannerInfo` entries that point to the same physical device.
10387
+ */
10388
+ deviceUuid: string;
10389
+
10390
+ /**
10391
+ * Indicates how the scanner is connected to the computer.
10392
+ */
10393
+ connectionType: ConnectionType;
10394
+
10395
+ /**
10396
+ * If true, the scanner connection's transport cannot be intercepted by a passive listener, such as TLS or USB.
10397
+ */
10398
+ secure: boolean;
10399
+
10400
+ /**
10401
+ * An array of MIME types that can be requested for returned scans.
10402
+ */
10403
+ imageFormats: string[];
10404
+
10405
+ /**
10406
+ * A human-readable description of the protocol or driver used to access the scanner, such as Mopria, WSD, or epsonds. This is primarily useful for allowing a user to choose between protocols if a device supports multiple protocols.
10407
+ */
10408
+ protocolType: string;
10409
+ }
10410
+
10411
+ /**
10412
+ * The data type of an option.
10413
+ *
10414
+ * @chrome-enum "UNKNOWN" The option's data type is unknown. The `value` property will be unset.
10415
+ * @chrome-enum "BOOL" The `value` property will be one of `true`false.
10416
+ * @chrome-enum "INT" A signed 32-bit integer. The `value` property will be long or long\[\], depending on whether the option takes more than one value.
10417
+ * @chrome-enum "FIXED" A double in the range -32768-32767.9999 with a resolution of 1/65535. The `value` property will be double or double\[\] depending on whether the option takes more than one value. Double values that can't be exactly represented will be rounded to the available range and precision.
10418
+ * @chrome-enum "STRING" A sequence of any bytes except NUL ('\\0'). The `value` property will be a DOMString.
10419
+ * @chrome-enum "BUTTON" An option of this type has no value. Instead, setting an option of this type causes an option-specific side effect in the scanner driver. For example, a button-typed option could be used by a scanner driver to provide a means to select default values or to tell an automatic document feeder to advance to the next sheet of paper.
10420
+ * @chrome-enum "GROUP" Grouping option. No value. This is included for compatibility, but will not normally be returned in `ScannerOption` values. Use `getOptionGroups()` to retrieve the list of groups with their member options.
10421
+ * @since Pending
10422
+ */
10423
+ export type OptionType = "UNKNOWN" | "BOOL" | "INT" | "FIXED" | "STRING" | "BUTTON" | "GROUP";
10424
+
10425
+ /**
10426
+ * Indicates the data type for {@link ScannerOption.unit}.
10427
+ *
10428
+ * @chrome-enum "UNITLESS" The value is a unitless number. For example, it can be a threshold.
10429
+ * @chrome-enum "PIXEL" The value is a number of pixels, for example, scan dimensions.
10430
+ * @chrome-enum "BIT" The value is the number of bits, for example, color depth.
10431
+ * @chrome-enum "MM" The value is measured in millimeters, for example, scan dimensions.
10432
+ * @chrome-enum "DPI" The value is measured in dots per inch, for example, resolution.
10433
+ * @chrome-enum "PERCENT" The value is a percent, for example, brightness.
10434
+ * @chrome-enum "MICROSECOND" The value is measured in microseconds, for example, exposure time.
10435
+ * @since Pending
10436
+ */
10437
+ export type OptionUnit = "UNITLESS" | "PIXEL" | "BIT" | "MM" | "DPI" | "PERCENT" | "MICROSECOND";
10438
+
10439
+ /**
10440
+ * The data type of constraint represented by an {@link OptionConstraint}.
10441
+ *
10442
+ * @chrome-enum "INT\_RANGE" The constraint on a range of `OptionType.INT` values. The `min`, `max`, and `quant` properties of `OptionConstraint` will be `long`, and its `list` propety will be unset.
10443
+ * @chrome-enum "FIXED\_RANGE" The constraint on a range of `OptionType.FIXED` values. The `min`, `max`, and `quant` properties of `OptionConstraint` will be `double`, and its `list` property will be unset.
10444
+ * @chrome-enum "INT\_LIST" The constraint on a specific list of `OptionType.INT` values. The `OptionConstraint.list` property will contain `long` values, and the other properties will be unset.
10445
+ * @chrome-enum "FIXED\_LIST" The constraint on a specific list of `OptionType.FIXED` values. The `OptionConstraint.list` property will contain `double` values, and the other properties will be unset.
10446
+ * @chrome-enum "STRING\_LIST" The constraint on a specific list of `OptionType.STRING` values. The `OptionConstraint.list` property will contain `DOMString` values, and the other properties will be unset.
10447
+ * @since Pending
10448
+ */
10449
+ export type ConstraintType = "INT_RANGE" | "FIXED_RANGE" | "INT_LIST" | "FIXED_LIST" | "STRING_LIST";
10450
+
10451
+ /**
10452
+ * @since Pending
10453
+ */
10454
+ export interface OptionConstraint {
10455
+
10456
+ type: ConstraintType;
10457
+
10458
+ min?: number | number;
10459
+
10460
+ max?: number | number;
10461
+
10462
+ quant?: number | number;
10463
+
10464
+ list?: number[] | number[] | string[];
10465
+ }
10466
+
10467
+ /**
10468
+ * How an option can be changed.
10469
+ *
10470
+ * @chrome-enum "NOT\_CONFIGURABLE" The option is read-only.
10471
+ * @chrome-enum "SOFTWARE\_CONFIGURABLE" The option can be set in software.
10472
+ * @chrome-enum "HARDWARE\_CONFIGURABLE" The option can be set by the user toggling or pushing a button on the scanner.
10473
+ * @since Pending
10474
+ */
10475
+ export type Configurability = "NOT_CONFIGURABLE" | "SOFTWARE_CONFIGURABLE" | "HARDWARE_CONFIGURABLE";
10476
+
10477
+ /**
10478
+ * @since Pending
10479
+ */
10480
+ export interface ScannerOption {
10481
+
10482
+ /**
10483
+ * The option name using lowercase ASCII letters, numbers, and dashes. Diacritics are not allowed.
10484
+ */
10485
+ name: string;
10486
+
10487
+ /**
10488
+ * A printable one-line title.
10489
+ */
10490
+ title: string;
10491
+
10492
+ /**
10493
+ * A longer description of the option.
10494
+ */
10495
+ description: string;
10496
+
10497
+ /**
10498
+ * The data type contained in the `value` property, which is needed for setting this option.
10499
+ */
10500
+ type: OptionType;
10501
+
10502
+ /**
10503
+ * The unit of measurement for this option.
10504
+ */
10505
+ unit: OptionUnit;
10506
+
10507
+ /**
10508
+ * The current value of the option, if relevant. Note that the data type of this property must match the data type specified in `type`.
10509
+ */
10510
+ value?: boolean | number | number[] | number | number[] | string;
10511
+
10512
+ /**
10513
+ * Defines {@link OptionConstraint} on the current scanner option.
10514
+ */
10515
+ constraint?: OptionConstraint;
10516
+
10517
+ /**
10518
+ * Indicates that this option can be detected from software.
10519
+ */
10520
+ isDetectable: boolean;
10521
+
10522
+ /**
10523
+ * Indicates whether and how the option can be changed.
10524
+ */
10525
+ configurability: Configurability;
10526
+
10527
+ /**
10528
+ * Can be automatically set by the scanner driver.
10529
+ */
10530
+ isAutoSettable: boolean;
10531
+
10532
+ /**
10533
+ * Emulated by the scanner driver if true.
10534
+ */
10535
+ isEmulated: boolean;
10536
+
10537
+ /**
10538
+ * Indicates the option is active and can be set or retrieved. If false, the `value` property will not be set.
10539
+ */
10540
+ isActive: boolean;
10541
+
10542
+ /**
10543
+ * Indicates that the UI should not display this option by default.
10544
+ */
10545
+ isAdvanced: boolean;
10546
+ }
10547
+
10548
+ /**
10549
+ * @since Pending
10550
+ */
10551
+ export interface DeviceFilter {
10552
+
10553
+ /**
10554
+ * Only return scanners that are directly attached to the computer.
10555
+ */
10556
+ local?: boolean;
10557
+
10558
+ /**
10559
+ * Only return scanners that use a secure transport, such as USB or TLS.
10560
+ */
10561
+ secure?: boolean;
10562
+ }
10563
+
10564
+ /**
10565
+ * @since Pending
10566
+ */
10567
+ export interface OptionGroup {
10568
+
10569
+ /**
10570
+ * Provides a printable title, for example "Geometry options".
10571
+ */
10572
+ title: string;
10573
+
10574
+ /**
10575
+ * An array of option names in driver-provided order.
10576
+ */
10577
+ members: string[];
10578
+ }
10579
+
10580
+ /**
10581
+ * @since Pending
10582
+ */
10583
+ export interface GetScannerListResponse {
10584
+
10585
+ /**
10586
+ * The enumeration result. Note that partial results could be returned even if this indicates an error.
10587
+ */
10588
+ result: OperationResult;
10589
+
10590
+ /**
10591
+ * A possibly-empty list of scanners that match the provided {@link DeviceFilter}.
10592
+ */
10593
+ scanners: ScannerInfo[];
10594
+ }
10595
+
10596
+ /**
10597
+ * @since Pending
10598
+ */
10599
+ export interface OpenScannerResponse {
10600
+
10601
+ /**
10602
+ * The scanner ID passed to `openScanner()`.
10603
+ */
10604
+ scannerId: string;
10605
+
10606
+ /**
10607
+ * The result of opening the scanner. If the value of this is `SUCCESS`, the `scannerHandle` and `options` properties will be populated.
10608
+ */
10609
+ result: OperationResult;
10610
+
10611
+ /**
10612
+ * If `result` is `SUCCESS`, a handle to the scanner that can be used for further operations.
10613
+ */
10614
+ scannerHandle?: string;
10615
+
10616
+ /**
10617
+ * If `result` is `SUCCESS`, provides a key-value mapping where the key is a device-specific option and the value is an instance of {@link ScannerOption}.
10618
+ */
10619
+ options?: {[name: string]: any};
10620
+ }
10621
+
10622
+ /**
10623
+ * @since Pending
10624
+ */
10625
+ export interface GetOptionGroupsResponse {
10626
+
10627
+ /**
10628
+ * The same scanner handle as was passed to {@link getOptionGroups}.
10629
+ */
10630
+ scannerHandle: string;
10631
+
10632
+ /**
10633
+ * The result of getting the option groups. If the value of this is `SUCCESS`, the `groups` property will be populated.
10634
+ */
10635
+ result: OperationResult;
10636
+
10637
+ /**
10638
+ * If `result` is `SUCCESS`, provides a list of option groups in the order supplied by the scanner driver.
10639
+ */
10640
+ groups?: OptionGroup[];
10641
+ }
10642
+
10643
+ /**
10644
+ * @since Pending
10645
+ */
10646
+ export interface CloseScannerResponse {
10647
+
10648
+ /**
10649
+ * The same scanner handle as was passed to {@link closeScanner}.
10650
+ */
10651
+ scannerHandle: string;
10652
+
10653
+ /**
10654
+ * The result of closing the scanner. Even if this value is not `SUCCESS`, the handle will be invalid and should not be used for any further operations.
10655
+ */
10656
+ result: OperationResult;
10657
+ }
10658
+
10659
+ /**
10660
+ * @since Pending
10661
+ */
10662
+ export interface OptionSetting {
10663
+
10664
+ /**
10665
+ * Indicates the name of the option to set.
10666
+ */
10667
+ name: string;
10668
+
10669
+ /**
10670
+ * Indicates the data type of the option. The requested data type must match the real data type of the underlying option.
10671
+ */
10672
+ type: OptionType;
10673
+
10674
+ /**
10675
+ * Indicates the value to set. Leave unset to request automatic setting for options that have `autoSettable` enabled. The data type supplied for `value` must match `type`.
10676
+ */
10677
+ value?: boolean | number | number[] | number | number[] | string;
10678
+ }
10679
+
10680
+ /**
10681
+ * @since Pending
10682
+ */
10683
+ export interface SetOptionResult {
10684
+
10685
+ /**
10686
+ * Indicates the name of the option that was set.
10687
+ */
10688
+ name: string;
10689
+
10690
+ /**
10691
+ * Indicates the result of setting the option.
10692
+ */
10693
+ result: OperationResult;
10694
+ }
10695
+
10696
+ /**
10697
+ * @since Pending
10698
+ */
10699
+ export interface SetOptionsResponse {
10700
+
10701
+ /**
10702
+ * Provides the scanner handle passed to `setOptions()`.
10703
+ */
10704
+ scannerHandle: string;
10705
+
10706
+ /**
10707
+ * An array of results, one each for every passed-in `OptionSetting`.
10708
+ */
10709
+ results: SetOptionResult[];
10710
+
10711
+ /**
10712
+ * An updated key-value mapping from option names to {@link ScannerOption} values containing the new configuration after attempting to set all supplied options. This has the same structure as the `options` property in {@link OpenScannerResponse}.
10713
+ *
10714
+ * This property will be set even if some options were not set successfully, but will be unset if retrieving the updated configuration fails (for example, if the scanner is disconnected in the middle of scanning).
10715
+ */
10716
+ options?: {[name: string]: any};
10717
+ }
10718
+
10719
+ /**
10720
+ * @since Pending
10721
+ */
10722
+ export interface StartScanOptions {
10723
+
10724
+ /**
10725
+ * Specifies the MIME type to return scanned data in.
10726
+ */
10727
+ format: string;
10728
+ }
10729
+
10730
+ /**
10731
+ * @since Pending
10732
+ */
10733
+ export interface StartScanResponse {
10734
+
10735
+ /**
10736
+ * Provides the same scanner handle that was passed to `startScan()`.
10737
+ */
10738
+ scannerHandle: string;
10739
+
10740
+ /**
10741
+ * The result of starting a scan. If the value of this is `SUCCESS`, the `job` property will be populated.
10742
+ */
10743
+ result: OperationResult;
10744
+
10745
+ /**
10746
+ * If `result` is `SUCCESS`, provides a handle that can be used to read scan data or cancel the job.
10747
+ */
10748
+ job?: string;
10749
+ }
10750
+
10751
+ /**
10752
+ * @since Pending
10753
+ */
10754
+ export interface CancelScanResponse {
10755
+
10756
+ /**
10757
+ * Provides the same job handle that was passed to `cancelScan()`.
10758
+ */
10759
+ job: string;
10760
+
10761
+ /**
10762
+ * The backend's cancel scan result. If the result is `OperationResult.SUCCESS` or `OperationResult.CANCELLED`, the scan has been cancelled and the scanner is ready to start a new scan. If the result is `OperationResult.DEVICE_BUSY` , the scanner is still processing the requested cancellation; the caller should wait a short time and try the request again. Other result values indicate a permanent error that should not be retried.
10763
+ */
10764
+ result: OperationResult;
10765
+ }
10766
+
10767
+ /**
10768
+ * @since Pending
10769
+ */
10770
+ export interface ReadScanDataResponse {
10771
+
10772
+ /**
10773
+ * Provides the job handle passed to `readScanData()`.
10774
+ */
10775
+ job: string;
10776
+
10777
+ /**
10778
+ * The result of reading data. If its value is `SUCCESS`, then `data` contains the _next_ (possibly zero-length) chunk of image data that is ready for reading. If its value is `EOF`, the `data` contains the _last_ chunk of image data.
10779
+ */
10780
+ result: OperationResult;
10781
+
10782
+ /**
10783
+ * If `result` is `SUCCESS`, contains the _next_ chunk of scanned image data. If `result` is `EOF`, contains the _last_ chunk of scanned image data.
10784
+ */
10785
+ data?: ArrayBuffer;
10786
+
10787
+ /**
10788
+ * If `result` is `SUCCESS`, an estimate of how much of the total scan data has been delivered so far, in the range 0 to 100.
10789
+ */
10790
+ estimatedCompletion?: number;
10791
+ }
10792
+
10793
+ /**
10794
+ * Performs a document scan and returns a Promise that resolves with a {@link ScanResults} object. If a callback is passed to this function, the returned data is passed to it instead.
10331
10795
  *
10332
10796
  * @chrome-returns-extra since Chrome 96
10333
- * @param options Object containing scan parameters.
10797
+ * @param options An object containing scan parameters.
10334
10798
  */
10335
10799
  export function scan(
10336
10800
 
@@ -10338,9 +10802,9 @@ declare namespace chrome {
10338
10802
  ): Promise<ScanResults>;
10339
10803
 
10340
10804
  /**
10341
- * Performs a document scan. On success, the PNG data will be sent to the callback.
10805
+ * Performs a document scan and returns a Promise that resolves with a {@link ScanResults} object. If a callback is passed to this function, the returned data is passed to it instead.
10342
10806
  *
10343
- * @param options Object containing scan parameters.
10807
+ * @param options An object containing scan parameters.
10344
10808
  * @param callback Called with the result and data from the scan.
10345
10809
  */
10346
10810
  export function scan(
@@ -10351,6 +10815,242 @@ declare namespace chrome {
10351
10815
  result: ScanResults,
10352
10816
  ) => void,
10353
10817
  ): void;
10818
+
10819
+ /**
10820
+ * Gets the list of available scanners and returns a Promise that resolves with a {@link GetScannerListResponse} object. If a callback is passed to this function, returned data is passed to it instead.
10821
+ *
10822
+ * @param filter A {@link DeviceFilter} indicating which types of scanners should be returned.
10823
+ * @since Pending
10824
+ */
10825
+ export function getScannerList(
10826
+
10827
+ filter: DeviceFilter,
10828
+ ): Promise<GetScannerListResponse>;
10829
+
10830
+ /**
10831
+ * Gets the list of available scanners and returns a Promise that resolves with a {@link GetScannerListResponse} object. If a callback is passed to this function, returned data is passed to it instead.
10832
+ *
10833
+ * @param filter A {@link DeviceFilter} indicating which types of scanners should be returned.
10834
+ * @param callback Called with the result and list of scanners.
10835
+ * @since Pending
10836
+ */
10837
+ export function getScannerList(
10838
+
10839
+ filter: DeviceFilter,
10840
+
10841
+ callback?: (
10842
+ response: GetScannerListResponse,
10843
+ ) => void,
10844
+ ): void;
10845
+
10846
+ /**
10847
+ * Opens a scanner for exclusive access and returns a Promise that resolves with an {@link OpenScannerResponse} object. If a callback is passed to this function, returned data is passed to it instead.
10848
+ *
10849
+ * @param scannerId The ID of a scanner to be opened. This value is one returned from a previous call to {@link getScannerList}.
10850
+ * @since Pending
10851
+ */
10852
+ export function openScanner(
10853
+
10854
+ scannerId: string,
10855
+ ): Promise<OpenScannerResponse>;
10856
+
10857
+ /**
10858
+ * Opens a scanner for exclusive access and returns a Promise that resolves with an {@link OpenScannerResponse} object. If a callback is passed to this function, returned data is passed to it instead.
10859
+ *
10860
+ * @param scannerId The ID of a scanner to be opened. This value is one returned from a previous call to {@link getScannerList}.
10861
+ * @param callback Called with the result.
10862
+ * @since Pending
10863
+ */
10864
+ export function openScanner(
10865
+
10866
+ scannerId: string,
10867
+
10868
+ callback?: (
10869
+ response: OpenScannerResponse,
10870
+ ) => void,
10871
+ ): void;
10872
+
10873
+ /**
10874
+ * Gets the group names and member options from a scanner previously opened by {@link openScanner}. This method returns a Promise that resolves with a {@link GetOptionGroupsResponse} object. If a callback is passed to this function, returned data is passed to it instead.
10875
+ *
10876
+ * @param scannerHandle The handle of an open scanner returned from a call to {@link openScanner}.
10877
+ * @since Pending
10878
+ */
10879
+ export function getOptionGroups(
10880
+
10881
+ scannerHandle: string,
10882
+ ): Promise<GetOptionGroupsResponse>;
10883
+
10884
+ /**
10885
+ * Gets the group names and member options from a scanner previously opened by {@link openScanner}. This method returns a Promise that resolves with a {@link GetOptionGroupsResponse} object. If a callback is passed to this function, returned data is passed to it instead.
10886
+ *
10887
+ * @param scannerHandle The handle of an open scanner returned from a call to {@link openScanner}.
10888
+ * @param callback Called with the result.
10889
+ * @since Pending
10890
+ */
10891
+ export function getOptionGroups(
10892
+
10893
+ scannerHandle: string,
10894
+
10895
+ callback?: (
10896
+ response: GetOptionGroupsResponse,
10897
+ ) => void,
10898
+ ): void;
10899
+
10900
+ /**
10901
+ * Closes the scanner with the passed in handle and returns a Promise that resolves with a {@link CloseScannerResponse} object. If a callback is used, the object is passed to it instead. Even if the response is not a success, the supplied handle becomes invalid and should not be used for further operations.
10902
+ *
10903
+ * @param scannerHandle Specifies the handle of an open scanner that was previously returned from a call to {@link openScanner}.
10904
+ * @since Pending
10905
+ */
10906
+ export function closeScanner(
10907
+
10908
+ scannerHandle: string,
10909
+ ): Promise<CloseScannerResponse>;
10910
+
10911
+ /**
10912
+ * Closes the scanner with the passed in handle and returns a Promise that resolves with a {@link CloseScannerResponse} object. If a callback is used, the object is passed to it instead. Even if the response is not a success, the supplied handle becomes invalid and should not be used for further operations.
10913
+ *
10914
+ * @param scannerHandle Specifies the handle of an open scanner that was previously returned from a call to {@link openScanner}.
10915
+ * @param callback Called with the result.
10916
+ * @since Pending
10917
+ */
10918
+ export function closeScanner(
10919
+
10920
+ scannerHandle: string,
10921
+
10922
+ callback?: (
10923
+ response: CloseScannerResponse,
10924
+ ) => void,
10925
+ ): void;
10926
+
10927
+ /**
10928
+ * Sets options on the specified scanner and returns a Promise that resolves with a {@link SetOptionsResponse} object containing the result of trying to set every value in the order of the passed-in {@link OptionSetting} object. If a callback is used, the object is passed to it instead.
10929
+ *
10930
+ * @param scannerHandle The handle of the scanner to set options on. This should be a value previously returned from a call to {@link openScanner}.
10931
+ * @param options A list of `OptionSetting` objects to be applied to the scanner.
10932
+ * @since Pending
10933
+ */
10934
+ export function setOptions(
10935
+
10936
+ scannerHandle: string,
10937
+
10938
+ options: OptionSetting[],
10939
+ ): Promise<SetOptionsResponse>;
10940
+
10941
+ /**
10942
+ * Sets options on the specified scanner and returns a Promise that resolves with a {@link SetOptionsResponse} object containing the result of trying to set every value in the order of the passed-in {@link OptionSetting} object. If a callback is used, the object is passed to it instead.
10943
+ *
10944
+ * @param scannerHandle The handle of the scanner to set options on. This should be a value previously returned from a call to {@link openScanner}.
10945
+ * @param options A list of `OptionSetting` objects to be applied to the scanner.
10946
+ * @param callback Called with the result.
10947
+ * @since Pending
10948
+ */
10949
+ export function setOptions(
10950
+
10951
+ scannerHandle: string,
10952
+
10953
+ options: OptionSetting[],
10954
+
10955
+ callback?: (
10956
+ response: SetOptionsResponse,
10957
+ ) => void,
10958
+ ): void;
10959
+
10960
+ /**
10961
+ * Starts a scan on the specified scanner and returns a Promise that resolves with a {@link StartScanResponse}. If a callback is used, the object is passed to it instead. If the call was successful, the response includes a job handle that can be used in subsequent calls to read scan data or cancel a scan.
10962
+ *
10963
+ * @param scannerHandle The handle of an open scanner. This should be a value previously returned from a call to {@link openScanner}.
10964
+ * @param options A {@link StartScanOptions} object indicating the options to be used for the scan. The `StartScanOptions.format` property must match one of the entries returned in the scanner's `ScannerInfo`.
10965
+ * @since Pending
10966
+ */
10967
+ export function startScan(
10968
+
10969
+ scannerHandle: string,
10970
+
10971
+ options: StartScanOptions,
10972
+ ): Promise<StartScanResponse>;
10973
+
10974
+ /**
10975
+ * Starts a scan on the specified scanner and returns a Promise that resolves with a {@link StartScanResponse}. If a callback is used, the object is passed to it instead. If the call was successful, the response includes a job handle that can be used in subsequent calls to read scan data or cancel a scan.
10976
+ *
10977
+ * @param scannerHandle The handle of an open scanner. This should be a value previously returned from a call to {@link openScanner}.
10978
+ * @param options A {@link StartScanOptions} object indicating the options to be used for the scan. The `StartScanOptions.format` property must match one of the entries returned in the scanner's `ScannerInfo`.
10979
+ * @param callback Called with the result.
10980
+ * @since Pending
10981
+ */
10982
+ export function startScan(
10983
+
10984
+ scannerHandle: string,
10985
+
10986
+ options: StartScanOptions,
10987
+
10988
+ callback?: (
10989
+ response: StartScanResponse,
10990
+ ) => void,
10991
+ ): void;
10992
+
10993
+ /**
10994
+ * Cancels a started scan and returns a Promise that resolves with a {@link CancelScanResponse} object. If a callback is used, the object is passed to it instead.
10995
+ *
10996
+ * @param job The handle of an active scan job previously returned from a call to {@link startScan}.
10997
+ * @since Pending
10998
+ */
10999
+ export function cancelScan(
11000
+
11001
+ job: string,
11002
+ ): Promise<CancelScanResponse>;
11003
+
11004
+ /**
11005
+ * Cancels a started scan and returns a Promise that resolves with a {@link CancelScanResponse} object. If a callback is used, the object is passed to it instead.
11006
+ *
11007
+ * @param job The handle of an active scan job previously returned from a call to {@link startScan}.
11008
+ * @param callback Called with the result.
11009
+ * @since Pending
11010
+ */
11011
+ export function cancelScan(
11012
+
11013
+ job: string,
11014
+
11015
+ callback?: (
11016
+ response: CancelScanResponse,
11017
+ ) => void,
11018
+ ): void;
11019
+
11020
+ /**
11021
+ * Reads the next chunk of available image data from an active job handle, and returns a Promise that resolves with a {@link ReadScanDataResponse} object. If a callback is used, the object is passed to it instead.
11022
+ *
11023
+ * **Note:**It is valid for a response result to be `SUCCESS` with a zero-length `data` member. This means the scanner is still working but does not yet have additional data ready. The caller should wait a short time and try again.
11024
+ *
11025
+ * When the scan job completes, the response will have the result value of `EOF`. This response may contain a final non-zero `data` member.
11026
+ *
11027
+ * @param job Active job handle previously returned from {@link startScan}.
11028
+ * @since Pending
11029
+ */
11030
+ export function readScanData(
11031
+
11032
+ job: string,
11033
+ ): Promise<ReadScanDataResponse>;
11034
+
11035
+ /**
11036
+ * Reads the next chunk of available image data from an active job handle, and returns a Promise that resolves with a {@link ReadScanDataResponse} object. If a callback is used, the object is passed to it instead.
11037
+ *
11038
+ * **Note:**It is valid for a response result to be `SUCCESS` with a zero-length `data` member. This means the scanner is still working but does not yet have additional data ready. The caller should wait a short time and try again.
11039
+ *
11040
+ * When the scan job completes, the response will have the result value of `EOF`. This response may contain a final non-zero `data` member.
11041
+ *
11042
+ * @param job Active job handle previously returned from {@link startScan}.
11043
+ * @param callback Called with the result.
11044
+ * @since Pending
11045
+ */
11046
+ export function readScanData(
11047
+
11048
+ job: string,
11049
+
11050
+ callback?: (
11051
+ response: ReadScanDataResponse,
11052
+ ) => void,
11053
+ ): void;
10354
11054
  }
10355
11055
 
10356
11056
  /**