@types/dns-packet
Advanced tools
Comparing version 5.2.1 to 5.2.2
@@ -56,5 +56,8 @@ // Type definitions for dns-packet 5.2 | ||
export type RecordClass = "IN" | "CS" | "CH" | "HS" | "ANY"; | ||
export interface Question { | ||
type: RecordType; | ||
name: string; | ||
class?: RecordClass | undefined; | ||
} | ||
@@ -74,2 +77,26 @@ | ||
export interface SoaData { | ||
mname: string; | ||
rname: string; | ||
serial?: number | undefined; | ||
refresh?: number | undefined; | ||
retry?: number | undefined; | ||
expire?: number | undefined; | ||
minimum?: number | undefined; | ||
} | ||
export type TxtData = string | Buffer | Array<string | Buffer>; | ||
export interface CaaData { | ||
issuerCritical?: boolean | undefined; | ||
flags?: number | undefined; | ||
tag: string; | ||
value: string; | ||
} | ||
export interface MxData { | ||
preference?: number | undefined; | ||
exchange: string; | ||
} | ||
export interface BaseAnswer<T, D> { | ||
@@ -79,2 +106,3 @@ type: T; | ||
ttl?: number | undefined; | ||
class?: RecordClass | undefined; | ||
data: D; | ||
@@ -86,3 +114,3 @@ } | ||
*/ | ||
export type StringRecordType = "A" | "AAAA" | "CNAME" | "DNAME" | "PTR"; | ||
export type StringRecordType = "A" | "AAAA" | "CNAME" | "DNAME" | "NS" | "PTR"; | ||
@@ -97,3 +125,2 @@ /** | ||
| "AXFR" | ||
| "CAA" | ||
| "CDNSKEY" | ||
@@ -112,5 +139,3 @@ | "CDS" | ||
| "LOC" | ||
| "MX" | ||
| "NAPTR" | ||
| "NS" | ||
| "NSEC" | ||
@@ -124,3 +149,2 @@ | "NSEC3" | ||
| "SIG" | ||
| "SOA" | ||
| "SSHFP" | ||
@@ -131,3 +155,2 @@ | "TA" | ||
| "TSIG" | ||
| "TXT" | ||
| "URI"; | ||
@@ -138,5 +161,17 @@ | ||
export type HInfoAnswer = BaseAnswer<"HINFO", HInfoData>; | ||
export type SoaAnswer = BaseAnswer<"SOA", SoaData>; | ||
export type TxtAnswer = BaseAnswer<"TXT", TxtData>; | ||
export type CaaAnswer = BaseAnswer<"CAA", CaaData>; | ||
export type MxAnswer = BaseAnswer<"MX", MxData>; | ||
export type BufferAnswer = BaseAnswer<OtherRecordType, Buffer>; | ||
export type Answer = StringAnswer | SrvAnswer | HInfoAnswer | BufferAnswer; | ||
export type Answer = | ||
| StringAnswer | ||
| SrvAnswer | ||
| HInfoAnswer | ||
| SoaAnswer | ||
| TxtAnswer | ||
| CaaAnswer | ||
| MxAnswer | ||
| BufferAnswer; | ||
@@ -143,0 +178,0 @@ export interface Packet { |
{ | ||
"name": "@types/dns-packet", | ||
"version": "5.2.1", | ||
"version": "5.2.2", | ||
"description": "TypeScript definitions for dns-packet", | ||
@@ -25,4 +25,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/dns-packet", | ||
}, | ||
"typesPublisherContentHash": "0b79047cea479d33e52340e16d6c0bf8e792eafffa0f90cb9bcb980aa265334e", | ||
"typesPublisherContentHash": "304e3768f80caa27e1ba21f0eb48984413eb85556b1bb93996944b1134d5980d", | ||
"typeScriptVersion": "3.6" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Tue, 06 Jul 2021 20:32:45 GMT | ||
* Last updated: Tue, 06 Jul 2021 22:32:41 GMT | ||
* Dependencies: [@types/node](https://npmjs.com/package/@types/node) | ||
@@ -14,0 +14,0 @@ * Global values: none |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6956
184