diff options
author | Jonathan Stewmon <jstewmon@gmail.com> | 2020-11-24 17:09:35 -0600 |
---|---|---|
committer | Jonathan Stewmon <jstewmon@gmail.com> | 2020-11-26 10:49:09 -0600 |
commit | 4bdcd1d13ae7127fa541b5cbef03b57355db5819 (patch) | |
tree | 6e0b420eb6d845b66def651198e353363144df03 /packages/typescript-types/src | |
parent | c707d9c02bab395141fb053bdcd7f26460cc7366 (diff) |
build: extract-dom-types script to generate dom.ts
Diffstat (limited to 'packages/typescript-types/src')
-rw-r--r-- | packages/typescript-types/src/dom.ts | 120 |
1 files changed, 62 insertions, 58 deletions
diff --git a/packages/typescript-types/src/dom.ts b/packages/typescript-types/src/dom.ts index 8369427..6ec8148 100644 --- a/packages/typescript-types/src/dom.ts +++ b/packages/typescript-types/src/dom.ts @@ -1,6 +1,14 @@ -export interface txAuthGenericArg { - content: ArrayBuffer; - contentType: string; +// Generated from typescript@3.9.7 typescript/lib/lib.dom.d.ts +// To regenerate, run the following command from the project root: +// npx lerna --scope=@simplewebauthn/typescript-types exec -- npm run extract-dom-types +export interface AuthenticatorAssertionResponse extends AuthenticatorResponse { + readonly authenticatorData: ArrayBuffer; + readonly signature: ArrayBuffer; + readonly userHandle: ArrayBuffer | null; +} + +export interface AuthenticatorAttestationResponse extends AuthenticatorResponse { + readonly attestationObject: ArrayBuffer; } export interface AuthenticationExtensionsClientInputs { @@ -14,52 +22,12 @@ export interface AuthenticationExtensionsClientInputs { uvm?: boolean; } -export interface AuthenticationExtensionsClientOutputs { - appid?: boolean; - authnSel?: boolean; - exts?: AuthenticationExtensionsSupported; - loc?: Coordinates; - txAuthGeneric?: ArrayBuffer; - txAuthSimple?: string; - uvi?: ArrayBuffer; - uvm?: UvmEntries; -} - -export interface AuthenticatorAssertionResponse extends AuthenticatorResponse { - readonly authenticatorData: ArrayBuffer; - readonly signature: ArrayBuffer; - readonly userHandle: ArrayBuffer | null; -} - -export interface AuthenticatorAttestationResponse extends AuthenticatorResponse { - readonly attestationObject: ArrayBuffer; -} - -export interface AuthenticatorResponse { - readonly clientDataJSON: ArrayBuffer; -} - export interface AuthenticatorSelectionCriteria { authenticatorAttachment?: AuthenticatorAttachment; requireResidentKey?: boolean; userVerification?: UserVerificationRequirement; } -export interface Coordinates { - readonly accuracy: number; - readonly altitude: number | null; - readonly altitudeAccuracy: number | null; - readonly heading: number | null; - readonly latitude: number; - readonly longitude: number; - readonly speed: number | null; -} - -export interface Credential { - readonly id: string; - readonly type: string; -} - export interface PublicKeyCredential extends Credential { readonly rawId: ArrayBuffer; readonly response: AuthenticatorResponse; @@ -84,11 +52,6 @@ export interface PublicKeyCredentialDescriptor { type: PublicKeyCredentialType; } -export interface PublicKeyCredentialEntity { - icon?: string; - name: string; -} - export interface PublicKeyCredentialParameters { alg: COSEAlgorithmIdentifier; type: PublicKeyCredentialType; @@ -103,24 +66,65 @@ export interface PublicKeyCredentialRequestOptions { userVerification?: UserVerificationRequirement; } +export interface PublicKeyCredentialUserEntity extends PublicKeyCredentialEntity { + displayName: string; + id: BufferSource; +} + +export interface AuthenticatorResponse { + readonly clientDataJSON: ArrayBuffer; +} + +export interface txAuthGenericArg { + content: ArrayBuffer; + contentType: string; +} + +export interface Credential { + readonly id: string; + readonly type: string; +} + +export interface AuthenticationExtensionsClientOutputs { + appid?: boolean; + authnSel?: boolean; + exts?: AuthenticationExtensionsSupported; + loc?: Coordinates; + txAuthGeneric?: ArrayBuffer; + txAuthSimple?: string; + uvi?: ArrayBuffer; + uvm?: UvmEntries; +} + export interface PublicKeyCredentialRpEntity extends PublicKeyCredentialEntity { id?: string; } -export interface PublicKeyCredentialUserEntity extends PublicKeyCredentialEntity { - displayName: string; - id: BufferSource; +export interface PublicKeyCredentialEntity { + icon?: string; + name: string; +} + +/** The position and altitude of the device on Earth, as well as the accuracy with which these properties are calculated. */ +export interface Coordinates { + readonly accuracy: number; + readonly altitude: number | null; + readonly altitudeAccuracy: number | null; + readonly heading: number | null; + readonly latitude: number; + readonly longitude: number; + readonly speed: number | null; } -export type AAGUID = BufferSource; export type AttestationConveyancePreference = 'direct' | 'indirect' | 'none'; -export type AuthenticationExtensionsSupported = string[]; -export type AuthenticatorAttachment = 'cross-platform' | 'platform'; -export type AuthenticatorSelectionList = AAGUID[]; export type AuthenticatorTransport = 'ble' | 'internal' | 'nfc' | 'usb'; -export type BufferSource = ArrayBuffer | ArrayBufferView; export type COSEAlgorithmIdentifier = number; -export type PublicKeyCredentialType = 'public-key'; export type UserVerificationRequirement = 'discouraged' | 'preferred' | 'required'; -export type UvmEntry = number[]; +export type AuthenticatorSelectionList = AAGUID[]; +export type AuthenticatorAttachment = 'cross-platform' | 'platform'; +export type BufferSource = ArrayBufferView | ArrayBuffer; +export type PublicKeyCredentialType = 'public-key'; +export type AAGUID = BufferSource; +export type AuthenticationExtensionsSupported = string[]; export type UvmEntries = UvmEntry[]; +export type UvmEntry = number[]; |