diff options
author | Jonathan Stewmon <jstewmon@gmail.com> | 2020-11-26 11:05:23 -0600 |
---|---|---|
committer | Jonathan Stewmon <jstewmon@gmail.com> | 2020-11-26 11:05:23 -0600 |
commit | dd5c803ce2914da49ad5f9462c05b49026c6c377 (patch) | |
tree | 3d4abb84cdd5fd8ef3553e50946ccfb187f217ff /packages/typescript-types | |
parent | 4bdcd1d13ae7127fa541b5cbef03b57355db5819 (diff) |
chore(typescript-types): always generate dom.ts
Diffstat (limited to 'packages/typescript-types')
-rw-r--r-- | packages/typescript-types/package.json | 2 | ||||
-rw-r--r-- | packages/typescript-types/src/dom.ts | 130 |
2 files changed, 1 insertions, 131 deletions
diff --git a/packages/typescript-types/package.json b/packages/typescript-types/package.json index cd361a7..a05db68 100644 --- a/packages/typescript-types/package.json +++ b/packages/typescript-types/package.json @@ -16,7 +16,7 @@ "access": "public" }, "scripts": { - "build": "rimraf dist && tsc", + "build": "rimraf dist && npm run extract-dom-types && tsc", "extract-dom-types": "ts-node extract-dom-types.ts", "prepublish": "npm run build" }, diff --git a/packages/typescript-types/src/dom.ts b/packages/typescript-types/src/dom.ts deleted file mode 100644 index 6ec8148..0000000 --- a/packages/typescript-types/src/dom.ts +++ /dev/null @@ -1,130 +0,0 @@ -// 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 { - appid?: string; - authnSel?: AuthenticatorSelectionList; - exts?: boolean; - loc?: boolean; - txAuthGeneric?: txAuthGenericArg; - txAuthSimple?: string; - uvi?: boolean; - uvm?: boolean; -} - -export interface AuthenticatorSelectionCriteria { - authenticatorAttachment?: AuthenticatorAttachment; - requireResidentKey?: boolean; - userVerification?: UserVerificationRequirement; -} - -export interface PublicKeyCredential extends Credential { - readonly rawId: ArrayBuffer; - readonly response: AuthenticatorResponse; - getClientExtensionResults(): AuthenticationExtensionsClientOutputs; -} - -export interface PublicKeyCredentialCreationOptions { - attestation?: AttestationConveyancePreference; - authenticatorSelection?: AuthenticatorSelectionCriteria; - challenge: BufferSource; - excludeCredentials?: PublicKeyCredentialDescriptor[]; - extensions?: AuthenticationExtensionsClientInputs; - pubKeyCredParams: PublicKeyCredentialParameters[]; - rp: PublicKeyCredentialRpEntity; - timeout?: number; - user: PublicKeyCredentialUserEntity; -} - -export interface PublicKeyCredentialDescriptor { - id: BufferSource; - transports?: AuthenticatorTransport[]; - type: PublicKeyCredentialType; -} - -export interface PublicKeyCredentialParameters { - alg: COSEAlgorithmIdentifier; - type: PublicKeyCredentialType; -} - -export interface PublicKeyCredentialRequestOptions { - allowCredentials?: PublicKeyCredentialDescriptor[]; - challenge: BufferSource; - extensions?: AuthenticationExtensionsClientInputs; - rpId?: string; - timeout?: number; - 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 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 AttestationConveyancePreference = 'direct' | 'indirect' | 'none'; -export type AuthenticatorTransport = 'ble' | 'internal' | 'nfc' | 'usb'; -export type COSEAlgorithmIdentifier = number; -export type UserVerificationRequirement = 'discouraged' | 'preferred' | 'required'; -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[]; |