devtools-protocol 0.0.1574117 → 0.0.1577676

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.
@@ -106,6 +106,8 @@ export namespace ProtocolTestsProxyApi {
106
106
 
107
107
  ServiceWorker: ServiceWorkerApi;
108
108
 
109
+ SmartCardEmulation: SmartCardEmulationApi;
110
+
109
111
  Storage: StorageApi;
110
112
 
111
113
  SystemInfo: SystemInfoApi;
@@ -2546,6 +2548,13 @@ export namespace ProtocolTestsProxyApi {
2546
2548
  }
2547
2549
 
2548
2550
  export interface ExtensionsApi {
2551
+ /**
2552
+ * Runs an extension default action.
2553
+ * Available if the client is connected using the --remote-debugging-pipe
2554
+ * flag and the --enable-unsafe-extension-debugging flag is set.
2555
+ */
2556
+ triggerAction(params: Protocol.Extensions.TriggerActionRequest): Promise<{id: number, result: void, sessionId: string}>;
2557
+
2549
2558
  /**
2550
2559
  * Installs an unpacked extension from the filesystem similar to
2551
2560
  * --load-extension CLI flags. Returns extension ID once the extension
@@ -4802,6 +4811,284 @@ export namespace ProtocolTestsProxyApi {
4802
4811
 
4803
4812
  }
4804
4813
 
4814
+ export interface SmartCardEmulationApi {
4815
+ /**
4816
+ * Enables the |SmartCardEmulation| domain.
4817
+ */
4818
+ enable(): Promise<{id: number, result: void, sessionId: string}>;
4819
+
4820
+ /**
4821
+ * Disables the |SmartCardEmulation| domain.
4822
+ */
4823
+ disable(): Promise<{id: number, result: void, sessionId: string}>;
4824
+
4825
+ /**
4826
+ * Reports the successful result of a |SCardEstablishContext| call.
4827
+ *
4828
+ * This maps to:
4829
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaa1b8970169fd4883a6dc4a8f43f19b67
4830
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardestablishcontext
4831
+ */
4832
+ reportEstablishContextResult(params: Protocol.SmartCardEmulation.ReportEstablishContextResultRequest): Promise<{id: number, result: void, sessionId: string}>;
4833
+
4834
+ /**
4835
+ * Reports the successful result of a |SCardReleaseContext| call.
4836
+ *
4837
+ * This maps to:
4838
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga6aabcba7744c5c9419fdd6404f73a934
4839
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardreleasecontext
4840
+ */
4841
+ reportReleaseContextResult(params: Protocol.SmartCardEmulation.ReportReleaseContextResultRequest): Promise<{id: number, result: void, sessionId: string}>;
4842
+
4843
+ /**
4844
+ * Reports the successful result of a |SCardListReaders| call.
4845
+ *
4846
+ * This maps to:
4847
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga93b07815789b3cf2629d439ecf20f0d9
4848
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardlistreadersa
4849
+ */
4850
+ reportListReadersResult(params: Protocol.SmartCardEmulation.ReportListReadersResultRequest): Promise<{id: number, result: void, sessionId: string}>;
4851
+
4852
+ /**
4853
+ * Reports the successful result of a |SCardGetStatusChange| call.
4854
+ *
4855
+ * This maps to:
4856
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga33247d5d1257d59e55647c3bb717db24
4857
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetstatuschangea
4858
+ */
4859
+ reportGetStatusChangeResult(params: Protocol.SmartCardEmulation.ReportGetStatusChangeResultRequest): Promise<{id: number, result: void, sessionId: string}>;
4860
+
4861
+ /**
4862
+ * Reports the result of a |SCardBeginTransaction| call.
4863
+ * On success, this creates a new transaction object.
4864
+ *
4865
+ * This maps to:
4866
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaddb835dce01a0da1d6ca02d33ee7d861
4867
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardbegintransaction
4868
+ */
4869
+ reportBeginTransactionResult(params: Protocol.SmartCardEmulation.ReportBeginTransactionResultRequest): Promise<{id: number, result: void, sessionId: string}>;
4870
+
4871
+ /**
4872
+ * Reports the successful result of a call that returns only a result code.
4873
+ * Used for: |SCardCancel|, |SCardDisconnect|, |SCardSetAttrib|, |SCardEndTransaction|.
4874
+ *
4875
+ * This maps to:
4876
+ * 1. SCardCancel
4877
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaacbbc0c6d6c0cbbeb4f4debf6fbeeee6
4878
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcancel
4879
+ *
4880
+ * 2. SCardDisconnect
4881
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga4be198045c73ec0deb79e66c0ca1738a
4882
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scarddisconnect
4883
+ *
4884
+ * 3. SCardSetAttrib
4885
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga060f0038a4ddfd5dd2b8fadf3c3a2e4f
4886
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardsetattrib
4887
+ *
4888
+ * 4. SCardEndTransaction
4889
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gae8742473b404363e5c587f570d7e2f3b
4890
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardendtransaction
4891
+ */
4892
+ reportPlainResult(params: Protocol.SmartCardEmulation.ReportPlainResultRequest): Promise<{id: number, result: void, sessionId: string}>;
4893
+
4894
+ /**
4895
+ * Reports the successful result of a |SCardConnect| call.
4896
+ *
4897
+ * This maps to:
4898
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga4e515829752e0a8dbc4d630696a8d6a5
4899
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardconnecta
4900
+ */
4901
+ reportConnectResult(params: Protocol.SmartCardEmulation.ReportConnectResultRequest): Promise<{id: number, result: void, sessionId: string}>;
4902
+
4903
+ /**
4904
+ * Reports the successful result of a call that sends back data on success.
4905
+ * Used for |SCardTransmit|, |SCardControl|, and |SCardGetAttrib|.
4906
+ *
4907
+ * This maps to:
4908
+ * 1. SCardTransmit
4909
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga9a2d77242a271310269065e64633ab99
4910
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardtransmit
4911
+ *
4912
+ * 2. SCardControl
4913
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gac3454d4657110fd7f753b2d3d8f4e32f
4914
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcontrol
4915
+ *
4916
+ * 3. SCardGetAttrib
4917
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaacfec51917255b7a25b94c5104961602
4918
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetattrib
4919
+ */
4920
+ reportDataResult(params: Protocol.SmartCardEmulation.ReportDataResultRequest): Promise<{id: number, result: void, sessionId: string}>;
4921
+
4922
+ /**
4923
+ * Reports the successful result of a |SCardStatus| call.
4924
+ *
4925
+ * This maps to:
4926
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gae49c3c894ad7ac12a5b896bde70d0382
4927
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardstatusa
4928
+ */
4929
+ reportStatusResult(params: Protocol.SmartCardEmulation.ReportStatusResultRequest): Promise<{id: number, result: void, sessionId: string}>;
4930
+
4931
+ /**
4932
+ * Reports an error result for the given request.
4933
+ */
4934
+ reportError(params: Protocol.SmartCardEmulation.ReportErrorRequest): Promise<{id: number, result: void, sessionId: string}>;
4935
+
4936
+ /**
4937
+ * Fired when |SCardEstablishContext| is called.
4938
+ *
4939
+ * This maps to:
4940
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaa1b8970169fd4883a6dc4a8f43f19b67
4941
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardestablishcontext
4942
+ */
4943
+ onEstablishContextRequested(listener: (event: { params: Protocol.SmartCardEmulation.EstablishContextRequestedEvent }) => void): void;
4944
+ offEstablishContextRequested(listener: (event: { params: Protocol.SmartCardEmulation.EstablishContextRequestedEvent }) => void): void;
4945
+ onceEstablishContextRequested(eventMatcher?: (event: { params: Protocol.SmartCardEmulation.EstablishContextRequestedEvent }) => boolean): Promise<{ params: Protocol.SmartCardEmulation.EstablishContextRequestedEvent }>;
4946
+
4947
+ /**
4948
+ * Fired when |SCardReleaseContext| is called.
4949
+ *
4950
+ * This maps to:
4951
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga6aabcba7744c5c9419fdd6404f73a934
4952
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardreleasecontext
4953
+ */
4954
+ onReleaseContextRequested(listener: (event: { params: Protocol.SmartCardEmulation.ReleaseContextRequestedEvent }) => void): void;
4955
+ offReleaseContextRequested(listener: (event: { params: Protocol.SmartCardEmulation.ReleaseContextRequestedEvent }) => void): void;
4956
+ onceReleaseContextRequested(eventMatcher?: (event: { params: Protocol.SmartCardEmulation.ReleaseContextRequestedEvent }) => boolean): Promise<{ params: Protocol.SmartCardEmulation.ReleaseContextRequestedEvent }>;
4957
+
4958
+ /**
4959
+ * Fired when |SCardListReaders| is called.
4960
+ *
4961
+ * This maps to:
4962
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga93b07815789b3cf2629d439ecf20f0d9
4963
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardlistreadersa
4964
+ */
4965
+ onListReadersRequested(listener: (event: { params: Protocol.SmartCardEmulation.ListReadersRequestedEvent }) => void): void;
4966
+ offListReadersRequested(listener: (event: { params: Protocol.SmartCardEmulation.ListReadersRequestedEvent }) => void): void;
4967
+ onceListReadersRequested(eventMatcher?: (event: { params: Protocol.SmartCardEmulation.ListReadersRequestedEvent }) => boolean): Promise<{ params: Protocol.SmartCardEmulation.ListReadersRequestedEvent }>;
4968
+
4969
+ /**
4970
+ * Fired when |SCardGetStatusChange| is called. Timeout is specified in milliseconds.
4971
+ *
4972
+ * This maps to:
4973
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga33247d5d1257d59e55647c3bb717db24
4974
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetstatuschangea
4975
+ */
4976
+ onGetStatusChangeRequested(listener: (event: { params: Protocol.SmartCardEmulation.GetStatusChangeRequestedEvent }) => void): void;
4977
+ offGetStatusChangeRequested(listener: (event: { params: Protocol.SmartCardEmulation.GetStatusChangeRequestedEvent }) => void): void;
4978
+ onceGetStatusChangeRequested(eventMatcher?: (event: { params: Protocol.SmartCardEmulation.GetStatusChangeRequestedEvent }) => boolean): Promise<{ params: Protocol.SmartCardEmulation.GetStatusChangeRequestedEvent }>;
4979
+
4980
+ /**
4981
+ * Fired when |SCardCancel| is called.
4982
+ *
4983
+ * This maps to:
4984
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaacbbc0c6d6c0cbbeb4f4debf6fbeeee6
4985
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcancel
4986
+ */
4987
+ onCancelRequested(listener: (event: { params: Protocol.SmartCardEmulation.CancelRequestedEvent }) => void): void;
4988
+ offCancelRequested(listener: (event: { params: Protocol.SmartCardEmulation.CancelRequestedEvent }) => void): void;
4989
+ onceCancelRequested(eventMatcher?: (event: { params: Protocol.SmartCardEmulation.CancelRequestedEvent }) => boolean): Promise<{ params: Protocol.SmartCardEmulation.CancelRequestedEvent }>;
4990
+
4991
+ /**
4992
+ * Fired when |SCardConnect| is called.
4993
+ *
4994
+ * This maps to:
4995
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga4e515829752e0a8dbc4d630696a8d6a5
4996
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardconnecta
4997
+ */
4998
+ onConnectRequested(listener: (event: { params: Protocol.SmartCardEmulation.ConnectRequestedEvent }) => void): void;
4999
+ offConnectRequested(listener: (event: { params: Protocol.SmartCardEmulation.ConnectRequestedEvent }) => void): void;
5000
+ onceConnectRequested(eventMatcher?: (event: { params: Protocol.SmartCardEmulation.ConnectRequestedEvent }) => boolean): Promise<{ params: Protocol.SmartCardEmulation.ConnectRequestedEvent }>;
5001
+
5002
+ /**
5003
+ * Fired when |SCardDisconnect| is called.
5004
+ *
5005
+ * This maps to:
5006
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga4be198045c73ec0deb79e66c0ca1738a
5007
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scarddisconnect
5008
+ */
5009
+ onDisconnectRequested(listener: (event: { params: Protocol.SmartCardEmulation.DisconnectRequestedEvent }) => void): void;
5010
+ offDisconnectRequested(listener: (event: { params: Protocol.SmartCardEmulation.DisconnectRequestedEvent }) => void): void;
5011
+ onceDisconnectRequested(eventMatcher?: (event: { params: Protocol.SmartCardEmulation.DisconnectRequestedEvent }) => boolean): Promise<{ params: Protocol.SmartCardEmulation.DisconnectRequestedEvent }>;
5012
+
5013
+ /**
5014
+ * Fired when |SCardTransmit| is called.
5015
+ *
5016
+ * This maps to:
5017
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga9a2d77242a271310269065e64633ab99
5018
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardtransmit
5019
+ */
5020
+ onTransmitRequested(listener: (event: { params: Protocol.SmartCardEmulation.TransmitRequestedEvent }) => void): void;
5021
+ offTransmitRequested(listener: (event: { params: Protocol.SmartCardEmulation.TransmitRequestedEvent }) => void): void;
5022
+ onceTransmitRequested(eventMatcher?: (event: { params: Protocol.SmartCardEmulation.TransmitRequestedEvent }) => boolean): Promise<{ params: Protocol.SmartCardEmulation.TransmitRequestedEvent }>;
5023
+
5024
+ /**
5025
+ * Fired when |SCardControl| is called.
5026
+ *
5027
+ * This maps to:
5028
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gac3454d4657110fd7f753b2d3d8f4e32f
5029
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcontrol
5030
+ */
5031
+ onControlRequested(listener: (event: { params: Protocol.SmartCardEmulation.ControlRequestedEvent }) => void): void;
5032
+ offControlRequested(listener: (event: { params: Protocol.SmartCardEmulation.ControlRequestedEvent }) => void): void;
5033
+ onceControlRequested(eventMatcher?: (event: { params: Protocol.SmartCardEmulation.ControlRequestedEvent }) => boolean): Promise<{ params: Protocol.SmartCardEmulation.ControlRequestedEvent }>;
5034
+
5035
+ /**
5036
+ * Fired when |SCardGetAttrib| is called.
5037
+ *
5038
+ * This maps to:
5039
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaacfec51917255b7a25b94c5104961602
5040
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetattrib
5041
+ */
5042
+ onGetAttribRequested(listener: (event: { params: Protocol.SmartCardEmulation.GetAttribRequestedEvent }) => void): void;
5043
+ offGetAttribRequested(listener: (event: { params: Protocol.SmartCardEmulation.GetAttribRequestedEvent }) => void): void;
5044
+ onceGetAttribRequested(eventMatcher?: (event: { params: Protocol.SmartCardEmulation.GetAttribRequestedEvent }) => boolean): Promise<{ params: Protocol.SmartCardEmulation.GetAttribRequestedEvent }>;
5045
+
5046
+ /**
5047
+ * Fired when |SCardSetAttrib| is called.
5048
+ *
5049
+ * This maps to:
5050
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga060f0038a4ddfd5dd2b8fadf3c3a2e4f
5051
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardsetattrib
5052
+ */
5053
+ onSetAttribRequested(listener: (event: { params: Protocol.SmartCardEmulation.SetAttribRequestedEvent }) => void): void;
5054
+ offSetAttribRequested(listener: (event: { params: Protocol.SmartCardEmulation.SetAttribRequestedEvent }) => void): void;
5055
+ onceSetAttribRequested(eventMatcher?: (event: { params: Protocol.SmartCardEmulation.SetAttribRequestedEvent }) => boolean): Promise<{ params: Protocol.SmartCardEmulation.SetAttribRequestedEvent }>;
5056
+
5057
+ /**
5058
+ * Fired when |SCardStatus| is called.
5059
+ *
5060
+ * This maps to:
5061
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gae49c3c894ad7ac12a5b896bde70d0382
5062
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardstatusa
5063
+ */
5064
+ onStatusRequested(listener: (event: { params: Protocol.SmartCardEmulation.StatusRequestedEvent }) => void): void;
5065
+ offStatusRequested(listener: (event: { params: Protocol.SmartCardEmulation.StatusRequestedEvent }) => void): void;
5066
+ onceStatusRequested(eventMatcher?: (event: { params: Protocol.SmartCardEmulation.StatusRequestedEvent }) => boolean): Promise<{ params: Protocol.SmartCardEmulation.StatusRequestedEvent }>;
5067
+
5068
+ /**
5069
+ * Fired when |SCardBeginTransaction| is called.
5070
+ *
5071
+ * This maps to:
5072
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaddb835dce01a0da1d6ca02d33ee7d861
5073
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardbegintransaction
5074
+ */
5075
+ onBeginTransactionRequested(listener: (event: { params: Protocol.SmartCardEmulation.BeginTransactionRequestedEvent }) => void): void;
5076
+ offBeginTransactionRequested(listener: (event: { params: Protocol.SmartCardEmulation.BeginTransactionRequestedEvent }) => void): void;
5077
+ onceBeginTransactionRequested(eventMatcher?: (event: { params: Protocol.SmartCardEmulation.BeginTransactionRequestedEvent }) => boolean): Promise<{ params: Protocol.SmartCardEmulation.BeginTransactionRequestedEvent }>;
5078
+
5079
+ /**
5080
+ * Fired when |SCardEndTransaction| is called.
5081
+ *
5082
+ * This maps to:
5083
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gae8742473b404363e5c587f570d7e2f3b
5084
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardendtransaction
5085
+ */
5086
+ onEndTransactionRequested(listener: (event: { params: Protocol.SmartCardEmulation.EndTransactionRequestedEvent }) => void): void;
5087
+ offEndTransactionRequested(listener: (event: { params: Protocol.SmartCardEmulation.EndTransactionRequestedEvent }) => void): void;
5088
+ onceEndTransactionRequested(eventMatcher?: (event: { params: Protocol.SmartCardEmulation.EndTransactionRequestedEvent }) => boolean): Promise<{ params: Protocol.SmartCardEmulation.EndTransactionRequestedEvent }>;
5089
+
5090
+ }
5091
+
4805
5092
  export interface StorageApi {
4806
5093
  /**
4807
5094
  * Returns a storage key given a frame id.
@@ -9798,11 +9798,26 @@ export namespace Protocol {
9798
9798
  */
9799
9799
  export type StorageArea = ('session' | 'local' | 'sync' | 'managed');
9800
9800
 
9801
+ export interface TriggerActionRequest {
9802
+ /**
9803
+ * Extension id.
9804
+ */
9805
+ id: string;
9806
+ /**
9807
+ * A tab target ID to trigger the default extension action on.
9808
+ */
9809
+ targetId: string;
9810
+ }
9811
+
9801
9812
  export interface LoadUnpackedRequest {
9802
9813
  /**
9803
9814
  * Absolute file path.
9804
9815
  */
9805
9816
  path: string;
9817
+ /**
9818
+ * Enable the extension in incognito
9819
+ */
9820
+ enableInIncognito?: boolean;
9806
9821
  }
9807
9822
 
9808
9823
  export interface LoadUnpackedResponse {
@@ -19071,6 +19086,316 @@ export namespace Protocol {
19071
19086
  }
19072
19087
  }
19073
19088
 
19089
+ /**
19090
+ * @experimental
19091
+ */
19092
+ export namespace SmartCardEmulation {
19093
+
19094
+ /**
19095
+ * Indicates the PC/SC error code.
19096
+ *
19097
+ * This maps to:
19098
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__ErrorCodes.html
19099
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/secauthn/authentication-return-values
19100
+ */
19101
+ export type ResultCode = ('success' | 'removed-card' | 'reset-card' | 'unpowered-card' | 'unresponsive-card' | 'unsupported-card' | 'reader-unavailable' | 'sharing-violation' | 'not-transacted' | 'no-smartcard' | 'proto-mismatch' | 'system-cancelled' | 'not-ready' | 'cancelled' | 'insufficient-buffer' | 'invalid-handle' | 'invalid-parameter' | 'invalid-value' | 'no-memory' | 'timeout' | 'unknown-reader' | 'unsupported-feature' | 'no-readers-available' | 'service-stopped' | 'no-service' | 'comm-error' | 'internal-error' | 'server-too-busy' | 'unexpected' | 'shutdown' | 'unknown-card' | 'unknown');
19102
+
19103
+ /**
19104
+ * Maps to the |SCARD_SHARE_*| values.
19105
+ */
19106
+ export type ShareMode = ('shared' | 'exclusive' | 'direct');
19107
+
19108
+ /**
19109
+ * Indicates what the reader should do with the card.
19110
+ */
19111
+ export type Disposition = ('leave-card' | 'reset-card' | 'unpower-card' | 'eject-card');
19112
+
19113
+ /**
19114
+ * Maps to |SCARD_*| connection state values.
19115
+ */
19116
+ export type ConnectionState = ('absent' | 'present' | 'swallowed' | 'powered' | 'negotiable' | 'specific');
19117
+
19118
+ /**
19119
+ * Maps to the |SCARD_STATE_*| flags.
19120
+ */
19121
+ export interface ReaderStateFlags {
19122
+ unaware?: boolean;
19123
+ ignore?: boolean;
19124
+ changed?: boolean;
19125
+ unknown?: boolean;
19126
+ unavailable?: boolean;
19127
+ empty?: boolean;
19128
+ present?: boolean;
19129
+ exclusive?: boolean;
19130
+ inuse?: boolean;
19131
+ mute?: boolean;
19132
+ unpowered?: boolean;
19133
+ }
19134
+
19135
+ /**
19136
+ * Maps to the |SCARD_PROTOCOL_*| flags.
19137
+ */
19138
+ export interface ProtocolSet {
19139
+ t0?: boolean;
19140
+ t1?: boolean;
19141
+ raw?: boolean;
19142
+ }
19143
+
19144
+ /**
19145
+ * Maps to the |SCARD_PROTOCOL_*| values.
19146
+ */
19147
+ export type Protocol = ('t0' | 't1' | 'raw');
19148
+
19149
+ export interface ReaderStateIn {
19150
+ reader: string;
19151
+ currentState: ReaderStateFlags;
19152
+ currentInsertionCount: integer;
19153
+ }
19154
+
19155
+ export interface ReaderStateOut {
19156
+ reader: string;
19157
+ eventState: ReaderStateFlags;
19158
+ eventCount: integer;
19159
+ atr: string;
19160
+ }
19161
+
19162
+ export interface ReportEstablishContextResultRequest {
19163
+ requestId: string;
19164
+ contextId: integer;
19165
+ }
19166
+
19167
+ export interface ReportReleaseContextResultRequest {
19168
+ requestId: string;
19169
+ }
19170
+
19171
+ export interface ReportListReadersResultRequest {
19172
+ requestId: string;
19173
+ readers: string[];
19174
+ }
19175
+
19176
+ export interface ReportGetStatusChangeResultRequest {
19177
+ requestId: string;
19178
+ readerStates: ReaderStateOut[];
19179
+ }
19180
+
19181
+ export interface ReportBeginTransactionResultRequest {
19182
+ requestId: string;
19183
+ handle: integer;
19184
+ }
19185
+
19186
+ export interface ReportPlainResultRequest {
19187
+ requestId: string;
19188
+ }
19189
+
19190
+ export interface ReportConnectResultRequest {
19191
+ requestId: string;
19192
+ handle: integer;
19193
+ activeProtocol?: Protocol;
19194
+ }
19195
+
19196
+ export interface ReportDataResultRequest {
19197
+ requestId: string;
19198
+ data: string;
19199
+ }
19200
+
19201
+ export interface ReportStatusResultRequest {
19202
+ requestId: string;
19203
+ readerName: string;
19204
+ state: ConnectionState;
19205
+ atr: string;
19206
+ protocol?: Protocol;
19207
+ }
19208
+
19209
+ export interface ReportErrorRequest {
19210
+ requestId: string;
19211
+ resultCode: ResultCode;
19212
+ }
19213
+
19214
+ /**
19215
+ * Fired when |SCardEstablishContext| is called.
19216
+ *
19217
+ * This maps to:
19218
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaa1b8970169fd4883a6dc4a8f43f19b67
19219
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardestablishcontext
19220
+ */
19221
+ export interface EstablishContextRequestedEvent {
19222
+ requestId: string;
19223
+ }
19224
+
19225
+ /**
19226
+ * Fired when |SCardReleaseContext| is called.
19227
+ *
19228
+ * This maps to:
19229
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga6aabcba7744c5c9419fdd6404f73a934
19230
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardreleasecontext
19231
+ */
19232
+ export interface ReleaseContextRequestedEvent {
19233
+ requestId: string;
19234
+ contextId: integer;
19235
+ }
19236
+
19237
+ /**
19238
+ * Fired when |SCardListReaders| is called.
19239
+ *
19240
+ * This maps to:
19241
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga93b07815789b3cf2629d439ecf20f0d9
19242
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardlistreadersa
19243
+ */
19244
+ export interface ListReadersRequestedEvent {
19245
+ requestId: string;
19246
+ contextId: integer;
19247
+ }
19248
+
19249
+ /**
19250
+ * Fired when |SCardGetStatusChange| is called. Timeout is specified in milliseconds.
19251
+ *
19252
+ * This maps to:
19253
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga33247d5d1257d59e55647c3bb717db24
19254
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetstatuschangea
19255
+ */
19256
+ export interface GetStatusChangeRequestedEvent {
19257
+ requestId: string;
19258
+ contextId: integer;
19259
+ readerStates: ReaderStateIn[];
19260
+ /**
19261
+ * in milliseconds, if absent, it means "infinite"
19262
+ */
19263
+ timeout?: integer;
19264
+ }
19265
+
19266
+ /**
19267
+ * Fired when |SCardCancel| is called.
19268
+ *
19269
+ * This maps to:
19270
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaacbbc0c6d6c0cbbeb4f4debf6fbeeee6
19271
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcancel
19272
+ */
19273
+ export interface CancelRequestedEvent {
19274
+ requestId: string;
19275
+ contextId: integer;
19276
+ }
19277
+
19278
+ /**
19279
+ * Fired when |SCardConnect| is called.
19280
+ *
19281
+ * This maps to:
19282
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga4e515829752e0a8dbc4d630696a8d6a5
19283
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardconnecta
19284
+ */
19285
+ export interface ConnectRequestedEvent {
19286
+ requestId: string;
19287
+ contextId: integer;
19288
+ reader: string;
19289
+ shareMode: ShareMode;
19290
+ preferredProtocols: ProtocolSet;
19291
+ }
19292
+
19293
+ /**
19294
+ * Fired when |SCardDisconnect| is called.
19295
+ *
19296
+ * This maps to:
19297
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga4be198045c73ec0deb79e66c0ca1738a
19298
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scarddisconnect
19299
+ */
19300
+ export interface DisconnectRequestedEvent {
19301
+ requestId: string;
19302
+ handle: integer;
19303
+ disposition: Disposition;
19304
+ }
19305
+
19306
+ /**
19307
+ * Fired when |SCardTransmit| is called.
19308
+ *
19309
+ * This maps to:
19310
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga9a2d77242a271310269065e64633ab99
19311
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardtransmit
19312
+ */
19313
+ export interface TransmitRequestedEvent {
19314
+ requestId: string;
19315
+ handle: integer;
19316
+ data: string;
19317
+ protocol?: Protocol;
19318
+ }
19319
+
19320
+ /**
19321
+ * Fired when |SCardControl| is called.
19322
+ *
19323
+ * This maps to:
19324
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gac3454d4657110fd7f753b2d3d8f4e32f
19325
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcontrol
19326
+ */
19327
+ export interface ControlRequestedEvent {
19328
+ requestId: string;
19329
+ handle: integer;
19330
+ controlCode: integer;
19331
+ data: string;
19332
+ }
19333
+
19334
+ /**
19335
+ * Fired when |SCardGetAttrib| is called.
19336
+ *
19337
+ * This maps to:
19338
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaacfec51917255b7a25b94c5104961602
19339
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetattrib
19340
+ */
19341
+ export interface GetAttribRequestedEvent {
19342
+ requestId: string;
19343
+ handle: integer;
19344
+ attribId: integer;
19345
+ }
19346
+
19347
+ /**
19348
+ * Fired when |SCardSetAttrib| is called.
19349
+ *
19350
+ * This maps to:
19351
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga060f0038a4ddfd5dd2b8fadf3c3a2e4f
19352
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardsetattrib
19353
+ */
19354
+ export interface SetAttribRequestedEvent {
19355
+ requestId: string;
19356
+ handle: integer;
19357
+ attribId: integer;
19358
+ data: string;
19359
+ }
19360
+
19361
+ /**
19362
+ * Fired when |SCardStatus| is called.
19363
+ *
19364
+ * This maps to:
19365
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gae49c3c894ad7ac12a5b896bde70d0382
19366
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardstatusa
19367
+ */
19368
+ export interface StatusRequestedEvent {
19369
+ requestId: string;
19370
+ handle: integer;
19371
+ }
19372
+
19373
+ /**
19374
+ * Fired when |SCardBeginTransaction| is called.
19375
+ *
19376
+ * This maps to:
19377
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaddb835dce01a0da1d6ca02d33ee7d861
19378
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardbegintransaction
19379
+ */
19380
+ export interface BeginTransactionRequestedEvent {
19381
+ requestId: string;
19382
+ handle: integer;
19383
+ }
19384
+
19385
+ /**
19386
+ * Fired when |SCardEndTransaction| is called.
19387
+ *
19388
+ * This maps to:
19389
+ * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gae8742473b404363e5c587f570d7e2f3b
19390
+ * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardendtransaction
19391
+ */
19392
+ export interface EndTransactionRequestedEvent {
19393
+ requestId: string;
19394
+ handle: integer;
19395
+ disposition: Disposition;
19396
+ }
19397
+ }
19398
+
19074
19399
  /**
19075
19400
  * @experimental
19076
19401
  */